-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tex
167 lines (137 loc) · 4.14 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
% Set paper variant
% Build command '\newcommand{\papersizeoption}{VALUE}\input{main.tex}'
% Possible VALUE:
% - afiveVersion — A5 formatted
% - ninebythirteenVersion — 9x13cm custom formatted
% - bfiveVersion — B5 formatted
% \listfiles
\ifdefined\papersizeoption
\else
\newcommand{\papersizeoption}{bfiveVersion}
\fi
\typeout{Set \protect\papersizeoption{} to \papersizeoption}
% Add hyperlinks and illustrations, to be used with afiveVersion \papersizeoption
% Build command:
% '\newcommand{\papersizeoption}{afiveVersion}\newcommand{\isdigitalversion}{}\input{main.tex}'
\ifdefined\isdigitalversion
\newcommand{\digitaloption}{digitalVersion}
\else
\newcommand{\digitaloption}{}
\fi
\typeout{Set \protect\digitaloption{} to \digitaloption}
% todo ask bergen to make showtims a togglable condition for b5 and 9x13 only
\documentclass[
final,
babelLanguage=british,
showtrims,
\papersizeoption,
\digitaloption,
]{anecdote}
% Define graphics path for images
\graphicspath{
{./assets/illustrations/A5}
{./assets/illustrations/9x13}
{./assets/illustrations/B5}
{./assets/graphics}
}
% Loads formatting for selected ddocument class
\ifninebythirteenversion \usepackage{9x13} \fi
\ifafiveversion \usepackage{A5} \fi
\ifbfiveversion \usepackage{B5} \fi
% Set metadata for the document
\title{SBS Pāli-English Recitations}
\subtitle{Monk Training Centre}
\author{SBS Monk Training Centre}
\publisher{Sāsanārakkha Buddhist Sanctuary}
\date{2021-10-30}
\editionInfo{\textit{First Edition}, 2025}
\ISBN{000-0-00000-000-0}
% Set metadata for PDF properties
\hypersetup{
pdftitle={\thetitle},
pdfauthor={\theauthor},
pdfcopyright={Copyright (C) 2025, \thePublisher},
pdfsubject={},
pdfkeywords={},
pdflicenseurl={https://creativecommons.org/licenses/by-nc-nd/4.0/},
pdfcontacturl={},
pdflang={en},
}
% Load further packages
\RequirePackage[yyyymmdd,hhmmss]{datetime} % Adds the time to version creation
\makepagenote
\continuousnotenums % Ensure continuous endnote numbering
% Define hyphenation exceptions and corrections
\hyphenation{London re-lin-quishes de-ter-mines}
\ifdigitalversion
\openany
\fi
% Begin document
\begin{document}
% Front matter
\frontmatter
% Digital version cover
\ifdigitalversion
\digitalCover{\includegraphics[height=\paperheight]{./assets/illustrations/A5/front_cover_compressed_A5.jpg}}
\fi
\ifninebythirteenversion
\photoFullBleed{./assets/illustrations/9x13/front_cover_9x13.jpg}
\clearpage
\fi
\ifbfiveversion
\photoFullBleed{./assets/illustrations/B5/front_cover_B5.jpg}
\clearpage
\fi
% Title page, copyright, acknowledgments
\pagestyle{empty}
\input{./tex/titlepage.tex}
\input{./tex/copyright.tex}
\input{./tex/acknowledgments.tex}
% Table of contents, schedule, purpose and benefits, abbreviations
\cleartorecto
\pagestyle{toponerow-frontmatter}
\chapterstyle{adrasteia-toc}
\pdfbookmark[section]{\contentsname}{toc}
\tableofcontents*
\input{./tex/schedule.tex}
\input{./tex/purpose-and-benefits.tex}
\input{./tex/abbreviations.tex}
\chapterstyle{adrasteia-frontmatter}
% Main matter
\mainmatter
\pagestyle{toponerow}
\cleartorecto
% Chapters
{\raggedright
\input{./tex/recitations/homage.tex}
\input{./tex/recitations/verses.tex}
\input{./tex/recitations/teachings.tex}
\input{./tex/recitations/reflections.tex}
\input{./tex/recitations/cardinal-suttas.tex}
\input{./tex/recitations/thanksgiving-recitations.tex}
\input{./tex/recitations/protective-recitations.tex}
\input{./tex/recitations/funeral-recitations.tex}
\input{./tex/recitations/sharing-of-merits.tex}
}
% Appendix
\appendix
\input{./tex/appendix.tex}
\input{./tex/refuge-trainings.tex}
\input{./tex/phonetics-pronunciation.tex}
\input{./tex/guidelines.tex}
% Back matter
\backmatter
\printpagenotes % Print endnotes
\input{./tex/copyright-details.tex}
\emptyUntilEven % Add blank page if necessary
\ifdigitalversion
\clearpage
\digitalCover{\includegraphics[height=\paperheight]{./assets/illustrations/A5/back_cover_compressed_A5.jpg}}
\fi
\ifninebythirteenversion
\photoFullBleed{./assets/illustrations/9x13/back_cover_9x13.jpg}
\fi
\ifbfiveversion
\photoFullBleed{./assets/illustrations/B5/back_cover_B5.jpg}
\fi
\end{document}