|
| 1 | +\documentclass[coverheight=9in,coverwidth=3in,pagecolor=backgroundcolor,bleedwidth=3.5mm,marklength=0in,12pt]{bookcover}% |
| 2 | +% |
| 3 | +% |
| 4 | +\usepackage{setspace} |
| 5 | +\usepackage[12pt]{moresize} |
| 6 | +\usepackage{microtype} |
| 7 | +\usepackage{fontspec} |
| 8 | +\usepackage[code=Code39]{makebarcode} |
| 9 | +\usepackage{contour} |
| 10 | +\usepackage{graphicx} |
| 11 | +\usepackage{polyglossia} |
| 12 | + |
| 13 | + |
| 14 | +\setdefaultlanguage[]{english} |
| 15 | +\setotherlanguage[script=Latin]{sanskrit} |
| 16 | + |
| 17 | +\newcommand*{\z}[1]{\contourlength{2pt}\contour{backgroundcolor}{#1}}% |
| 18 | + |
| 19 | +\newcommand*{\fronttranslationtitle}[1]{\flushleft\setstretch{3.5}\Lightfont{\fontsize{60pt}{80pt}\selectfont{#1}}}% |
| 20 | + |
| 21 | +\newcommand*{\fronttranslationsubtitle}[1]{\flushleft\normalfont\setstretch{2}{\Huge{\color{secondarytextcolor}{#1}}}\vspace{0em}}% |
| 22 | + |
| 23 | +\newcommand*{\frontbyline}[1]{\flushright\setstretch{1}{\textit{\Large{\color{secondarytextcolor}{#1}}}}\vspace{-.75em}}% |
| 24 | + |
| 25 | +\newcommand*{\frontcreatorname}[1]{\flushright\setstretch{1}{\Huge{#1}}}% |
| 26 | + |
| 27 | +\newcommand*{\frontvolumenumber}[1]{\flushleft{\lowercase{\scshape\Large{\color{secondarytextcolor}{#1}}}}\\\vspace{-1.6em}}% |
| 28 | + |
| 29 | +\newcommand*{\frontvolumeacronym}[1]{\flushleft{\huge{#1}\\\vspace{-.4em}}}% |
| 30 | + |
| 31 | +\newcommand*{\frontvolumetranslationtitle}[1]{\flushleft{\setstretch{.2}{\large{#1}}\\\vspace{-.8em}}}% |
| 32 | + |
| 33 | +\newcommand*{\frontvolumeroottitle}[1]{\flushleft{\setstretch{.2}{\large\itshape{\color{secondarytextcolor}{#1}}}}}% |
| 34 | + |
| 35 | +\setmainfont[Numbers=OldStyle]{Arno Pro} |
| 36 | + |
| 37 | +\newfontfamily\Lightfont[]{Arno Pro Light Display} |
| 38 | + |
| 39 | +\newfontfamily\Noligaturecaptionfont[Renderer=Basic]{Arno Pro Caption} |
| 40 | + |
| 41 | +% use a small amount of tracking on small caps |
| 42 | +\SetTracking[ spacing = {25*,166, } ]{ encoding = *, shape = sc }{ 50 } |
| 43 | + |
| 44 | +% hang quotes (requires microtype) |
| 45 | +\microtypesetup{ |
| 46 | + protrusion = true, |
| 47 | + expansion = true, |
| 48 | + tracking = true, |
| 49 | + factor = 1000, |
| 50 | + patch = all, |
| 51 | + final |
| 52 | +} |
| 53 | + |
| 54 | +% Custom protrusion rules to allow hanging punctuation |
| 55 | +\SetProtrusion |
| 56 | +{ encoding = *} |
| 57 | +{ |
| 58 | +% char right left |
| 59 | + {-} = { , 500 }, |
| 60 | + % Double Quotes |
| 61 | + \textquotedblleft |
| 62 | + = {1000, }, |
| 63 | + \textquotedblright |
| 64 | + = { , 1000}, |
| 65 | + \quotedblbase |
| 66 | + = {1000, }, |
| 67 | + % Single Quotes |
| 68 | + \textquoteleft |
| 69 | + = {1000, }, |
| 70 | + \textquoteright |
| 71 | + = { , 1000}, |
| 72 | + \quotesinglbase |
| 73 | + = {1000, } |
| 74 | +} |
| 75 | + |
| 76 | +\setstretch{1.05} |
| 77 | + |
| 78 | +% individual |
| 79 | +% orange colors |
| 80 | + |
| 81 | +\providecolor{textcolor}{HTML}{170F03} |
| 82 | + |
| 83 | +\providecolor{secondarytextcolor}{HTML}{684D25} |
| 84 | + |
| 85 | +\providecolor{backgroundcolor}{HTML}{E48C07} |
| 86 | + |
| 87 | +\color{textcolor} |
| 88 | + |
| 89 | +% images. position of cover image can be adjusted if necessary |
| 90 | + |
| 91 | +\newcommand*{\backlogo}[1]{\normalsize\Logofont{\color{secondarytextcolor}{#1}}} |
| 92 | + |
| 93 | +\newcommand*{\spinelogo}[1]{\centering{\Large\Logofont{\color{secondarytextcolor}{#1}}}} |
| 94 | + |
| 95 | +% block with if condition required for generating cover background image |
| 96 | +\newcommand*{\coverimage}[1]{\vspace*{3in}\hspace*{2in}{\includegraphics[height=8in]{/app/sutta_publisher/images/orange2.png}}} |
| 97 | +% |
| 98 | +% |
| 99 | +\begin{document}% |
| 100 | +\pagestyle{empty}% |
| 101 | +\normalsize% |
| 102 | +\begin{bookcover} |
| 103 | + |
| 104 | +\bookcovercomponent{normal}{bg whole}{ |
| 105 | +\vspace*{3in} |
| 106 | +\hspace*{2in}{\coverimage{}} |
| 107 | +} |
| 108 | + |
| 109 | +\bookcovercomponent{normal}{whole}[.95in,.92in,1in,.75in]{ |
| 110 | + |
| 111 | +\fronttranslationtitle{\z{Anthology} \z{of} \z{Discourses}} |
| 112 | + |
| 113 | +\fronttranslationsubtitle{\z{A} \z{refreshing} \z{translation} \z{of} \z{the} \z{{Suttanipāta}}} |
| 114 | + |
| 115 | +\hfil{\color{secondarytextcolor}{\rule{4in}{1pt}}}\hfil |
| 116 | + |
| 117 | +\frontbyline{\z{translated} \z{by}} |
| 118 | +\frontcreatorname{\z{Bhikkhu} \z{Sujato}} |
| 119 | + |
| 120 | +\vfill |
| 121 | + |
| 122 | +\setstretch{1.05} |
| 123 | + |
| 124 | +\frontvolumeacronym{\z{Snp}}} |
| 125 | + |
| 126 | +\end{bookcover}% |
| 127 | +\end{document} |
0 commit comments