forked from gregrs-uk/anglican-chant-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpsalm.sty
107 lines (72 loc) · 2.45 KB
/
psalm.sty
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
\usepackage{array}
% HORIZONTAL SPACING
\setlength\parindent{0pt}
% amount of space for notes e.g. dynamics and Full
\newlength\notesamount
\setlength\notesamount{4.5em}
% amount of space for verse numbers
\newlength\versenumamount
\setlength\versenumamount{1.5em}
% amount of space for verse text
\newlength\textamount
\setlength\textamount{20cm}
% amount to indent second half of each verse
\newlength\indentamount
\setlength\indentamount{1em}
% VERTICAL SPACING
% vertical space between verses
\newlength\versesepamount
\setlength\versesepamount{0.7em}
% vertical space between sections of psalm
\newlength\stanzagapamount
\setlength\stanzagapamount{1.2em}
% define right-aligned paragraph column for use below
\newcolumntype{R}[1]
{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}p{#1}}
% verse number
\newcounter{VerseCounter}
% environment for psalm text
\newenvironment{psalm}[1][1]
{
% number of first verse
\setcounter{VerseCounter}{#1}
\begin{tabular}{ R{\notesamount} R{\versenumamount} p{\textamount} }
}
{
\end{tabular}
}
% below we set some characters as 'active' characters,
% allowing them to be defined as macros
% bar line
\catcode`|=\active
\newcommand{|}{\textbar}
% dot for change of note (use instead of space between words)
\catcode`_=\active
\newcommand{_}
{\hspace{0.15em}$\vcenter{\hbox{\tiny$\bullet$}}$\hspace{0.15em}}
% pause between words
\newcommand{\ps}
{*\space}
% dynamics style
\newcommand{\dyn}[1]{\textbf{\textit{#1}}}
% second half of chant
\newcommand{\second}{$\dagger$}
% dot above letter to denote syllable
\newcommand{\syl}[1]{$\dot{\textrm{#1}}$}
% verses use the following columns:
% dynamics and full markings | verse numbers | verse text
% normal verse
\newcommand{\vs}[4]{#1 & \theVerseCounter.\stepcounter{VerseCounter} &
#2\thinspace :\\
#3 & &\hspace{\indentamount}#4\\[\versesepamount]}
% verse without gap in middle
\newcommand{\vscontinue}[4]{#1 & \theVerseCounter.\stepcounter{VerseCounter} &
#2\thinspace : \raisebox{-0.08em}{\large{$\longrightarrow$}}\\
#3 & &\hspace{\indentamount}#4\\[\versesepamount]}
% verse without verse number e.g. Gloria
\newcommand{\vsnonums}[4]{#1 & & #2\thinspace :\\
#3 & &\hspace{\indentamount}#4\\[\versesepamount]}
% break a long line and indent appropriately
\newcommand{\breaklongline}{\newline\hbox{}\hspace{2\indentamount}}
% gap to signify a new section of the psalm
\newcommand{\stanzagap}{\vspace{\stanzagapamount}\\[-12pt]}