summaryrefslogtreecommitdiff
path: root/macros/xetex/latex/book-of-common-prayer/book-of-common-prayer.sty
blob: 168e95e56ae9985e5940ddbe1ab499bd5f212eb6 (plain)
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
% Author: Arlie Coles
% License: LaTeX Project Public License 1.3c
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{book-of-common-prayer}[2021/06/27 Liturgical documents in the style of the Book of Common Prayer]

\RequirePackage[no-math]{fontspec}
\RequirePackage[left=0.5in, right=0.5in, vmargin=0.5in]{geometry}
\RequirePackage{titlesec}
\RequirePackage{graphicx}
\RequirePackage{titling}
\RequirePackage{alltt}
\RequirePackage{paracol}
\RequirePackage{framed}
\RequirePackage{makecell}
\RequirePackage{xtab}
\RequirePackage{tocloft}
\RequirePackage{xcolor}
\RequirePackage[object=vectorian]{pgfornament}
\RequirePackage{enumitem}
\RequirePackage{pgf}
\RequirePackage{pgfopts}
\RequirePackage{bilingualpages}

% The BCP font is Sabon, so allow this option
\DeclareOption{sabon}{\setmainfont[Ligatures=TeX]{Sabon LT Std}}
\ProcessOptions\relax
\newcommand{\sabon}[1]{{\fontspec{Sabon LT Std}#1}}

% Page setup
\geometry{
  paperheight=8.5in,
  paperwidth=5.5in,
  heightrounded,
}
\setlength\parindent{0pt}
\setlength{\parskip}{11pt}
\renewcommand{\arraystretch}{1.1}
\setlength{\footskip}{15pt}
\linespread{0.97}
\titlespacing*{\section}{0pt}{*0}{0pt}
\titlespacing*{\subsection}{0pt}{*0}{0pt}
\titlespacing*{\subsubsection}{0pt}{*0}{0pt}


% Spacing between music staves
\newcommand{\betweenLilyPondSystem}[1]{\vspace{1mm}\linebreak} 

% Manual spacing
\newcommand{\tab}{\hspace*{1em}}
\newcommand{\blankline}{\vspace{\parskip}}
\newcommand{\deleteline}{\vspace{-\parskip}}

% Cover image
\usepackage{graphicx}
\newcommand{\munepsfig}[3][scale=1.0]{% <===============================
    \begin{figure}[!htbp]
        \centering
        \vspace{2mm}
        \setlength{\fboxrule}{#3} % <===================================
        \setlength{\fboxsep}{0pt} % <===================================
        \framebox{\includegraphics[#1]{#2}} % <=====================
    \end{figure}
}

% Instructions formatting: italicize
\newcommand{\instruct}[1]{ {\small \textit{#1}} }
\newcommand{\instructsmall}[1]{ {\footnotesize \textit{#1}} }

% Versicle and response - for use in inline text (not music)
\newcommand{\versiclefont}{Junicode}
\newcommand{\textjuni}[1]{{\fontspec{\versiclefont}#1}}
\newcommand{\versicle}{\textjuni{\char"2123} }
\newcommand{\response}{\textjuni{\char"211F} }

% Responses with full titles (in text)
\xentrystretch{-0.99}
\newenvironment{responses}
  {\begin{xtabular}{@{}p{0.1\linewidth}p{0.85\linewidth}@{}}}
  {\end{xtabular}}

\newenvironment{responsesex}
  {\begin{xtabular}{p{0.1\linewidth}p{0.25\linewidth}}}
  {\end{xtabular}}

% Responses with V/R (in text)
\xentrystretch{-0.99}
\newenvironment{vresponses}
  {\begin{xtabular}{@{}p{0.05\linewidth}p{0.9\linewidth}@{}}}
  {\end{xtabular}}

\newenvironment{vresponsesex}
  {\begin{xtabular}{p{0.05\linewidth}p{0.25\linewidth}}}
  {\end{xtabular}}

% Multi-line response
\newcommand{\rlong}[1]{\makecell[lt]{#1}}

% Responses with V/R (in text) with V/R doubled up per line.
% First arg is width of verse (default 0.45)
\newenvironment{vresponsesdouble}[1][0.45]
  {\begin{xtabular}{@{}p{0.05\linewidth}p{#1\linewidth}p{0.05\linewidth}p{0.45\linewidth}@{}}}
  {\end{xtabular}}
% V/R in one line
\newcommand{\VR}[2]{\versicle & #1 & \response & \textbf{#2} \\}

\newenvironment{vresponsesdoubleex}[1][0.45]
  {\begin{xtabular}{@{}p{0.05\linewidth}p{#1\linewidth}p{0.05\linewidth}p{0.05\linewidth}@{}}}
  {\end{xtabular}}

% Roles to go with the responses - the people are bolded
\newcommand{\priest}[1]{\textit{Priest} & #1 \\}
\newcommand{\deacon}[1]{\textit{Deacon} & #1 \\}
\newcommand{\officiant}[1]{\textit{Officiant} & #1 \\}
\newcommand{\people}[1]{\textit{People} & \textbf{#1} \\}
\newcommand{\servers}[1]{\textit{Servers} & #1 \\}
\newcommand{\contd}[1]{& #1 \\}

% French role equivalents
\newcommand{\pretre}[1]{\textit{Prêtre} & #1 \\}
\newcommand{\diacre}[1]{\textit{Diacre} & #1 \\}
\newcommand{\peuple}[1]{\textit{Peuple} & \textbf{#1} \\}
\newcommand{\servants}[1]{\textit{Servants} & #1 \\}

\newcommand{\V}[1]{\versicle & #1 \\}
\newcommand{\R}[1]{\response & \textbf{#1} \\}

% Large and small signs of the cross - for use in inline text (not music)
\newcommand{\crossfont}{Arial Unicode MS}
\newcommand{\textuni}[1]{{\fontspec{\crossfont}#1}}
\newcommand{\cross}{{\textuni{\char"2720~}}}
\newcommand{\scross}{+ }

% French quotation marks (guillemets)
\newcommand{\gl}{{\textuni{\char"00AB~}}}
\newcommand{\gr}{{\textuni{\char"00BB~}}}

% Historical credit
\newcommand{\hist}[1]{\vspace{-.45cm} \hspace*{\fill}{ \scriptsize \textsc{#1} }\\}

% Monarch name (inline text)
\newcommand{\monarch}[1]{\textit{\MakeUppercase{#1}}}

% Bible verse
\newcommand{\bibleverse}[2]{
  \hspace*{\fill}{ \scriptsize \textsc{#2}}\\
  #1
}

\newcommand{\bibleref}[1]{
  {\mdseries \scriptsize \textsc{#1}}
}

% Frame - put a box around some text
\newcommand{\boxaround}[1]{
  \begin{framed}
  \small
  \textit{#1}
  \end{framed}
  \deleteline
}
\def\boxit#1{%
  \smash{\fboxsep=0pt\llap{\rlap{\fbox{\strut\makebox[#1]{}}}~}}\ignorespaces
}

% Prayer environment
\newenvironment{prayer}
  {\vspace{-2\parskip}
   \begin{alltt}\normalfont}
  {\end{alltt}
  \vspace{-2\parskip}}

% Two-col prayer
\newenvironment{twocolprayer}
  {\begin{table}[h!]
      \centering
      \begin{tabular}{ll}
  }
  {\end{tabular}
    \end{table}
  }

% Three-col prayer
\newenvironment{threecolprayer}
  {\begin{table}[h!]
      \centering
      \begin{tabular}{lll}
  }
  {\end{tabular}
    \end{table}
  }

% Header text
\newcommand{\header}[1]{
  \begin{center}
    {\Large \textit{#1} }
  \end{center}
}

% Smallcaps header text
\newcommand{\smallcapsheader}[1]{
  \begin{center}
    {\large \textsc{#1} }
  \end{center}
}

% Fancy horizontal line
\newcommand{\makesectionline}[2]{%
  \nointerlineskip \vspace{.5\baselineskip}\hspace{\fill}
  {\resizebox{0.5\linewidth}{0.5ex}
    {\pgfornament[color = #1]{#2}
    }}%
    \hspace{\fill}
    \par\nointerlineskip \vspace{.5\baselineskip}
  }
\newcommand{\sectionline}{\makesectionline{black}{88}}