summaryrefslogtreecommitdiff
path: root/support/gregoriotex/doc/examples/main-lualatex.tex
blob: 9bbcb8552adc92d5570cf9dc8bb4190ab5f8e839 (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
% !TEX program = LuaLaTeX+se

% Simple template for using Gregorio scores in a LuaLaTeX document.

\documentclass{scrartcl} % set document class: manual at https://ctan.org/pkg/koma-script

% Load packages:
\usepackage[osf,p]{libertine} % set font
\usepackage{gregoriotex} % enable Gregorio score inclusion
\usepackage[latin]{babel} % set language

\setkomafont{section}{\normalfont\centering\huge\scshape} % section heading style
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering


% Set the space around the initial:
% See http://gregorio-project.github.io/gregoriotex/details.html for more details and options
\grechangedim{beforeinitialshift}{2.2mm}{scalable}
\grechangedim{afterinitialshift}{2.2mm}{scalable}

% Set the initial font (change 43 for a larger size):
\grechangestyle{initial}{\fontsize{43}{43}\selectfont}%

% Make staff lines red; remove for black:
\gresetlinecolor{gregoriocolor}

% Use the "commentary" field of the score in the top right corner:
\gresetheadercapture{commentary}{grecommentary}{string}

% Format annotation above initial
\grechangestyle{annotation}{\small\bfseries}

\begin{document}

\section{Populus Sion}

% Add VII above the initial manually:
\greannotation{Intr.} % first line
\greannotation{\textsc{vii}} % second line

% Include the score; the file must be in the same directory:
\gregorioscore[a]{PopulusSion}

\section{Factus est}

\gregorioscore[a]{FactusEst}

\end{document}