Skip to content

Tips and tricks submission: using paracol to make choir training aids #117

@MRoth1910

Description

@MRoth1910

I know that you have a lot on your plate, but for your consideration, I submit this. I also offer tangentially a suggested way to improve typesetting and make code easier to read: use NewDocumentCommand (or as the case may be, NewDocumentEnvironment) originally documented via the xparse package (but explicitly loading this isn't needed on more recent LaTeX installations, including Overleaf).

Matthias Bry gave me the tip to use custom macros to avoid magic numbers as much as possible when changing any sort of font size or space and where copying and pasting more than three times becomes a problem, including both arguments that change but where the text has the same formatting or where the same text is repeated over and over. I have made that a part of my routine production of chant documents.

My fellow schola member who helps me out made this and thought of using the parallel-colum functionality. It's quite clever. I just cleaned it up to avoid repeating the same commands with numbers over and over.

I mention these peripheral things because I'm entirely self-taught and not from a CS, math, etc. background. Without Matthias, I'd have done OK, but I'd have struggled a lot longer.

NB: I do my work entirely on a Mac with TeXShop as my editor and with MacTeX as the installation, so I insert the following lines ("magic comments" — a lot of people like me wouldn't know what that means) to make it run twice. I recommend everyone find a way to use latexmk for LuaLaTeX and the shell-escape functionality without needing to explicitly click buttons if using an editor (I'm going to say that instead of IDE; I think that most of us use an editor, and while I troubleshoot or sometimess work on something where typesetting and waiting for compilation in TeXShop would distract me, the command line breaks SyncTeX so I'm loathe to use it, and there you really do need to learn the syntax or have a key binding).

Anyway, here are those magic comments

% !TEX parameter =  --shell-escape

and my source file for our devs to test. You can clean the LaTeX up more, I think, but this is a good start.

\documentclass[12pt,twoside,letterpaper]{article}

\usepackage[hmargin=1in,vmargin=2cm]{geometry}
\usepackage[autocompile]{gregoriotex}
\usepackage{fontspec} %%needed to space caps
\usepackage{paracol}
\usepackage{ebgaramond}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setlength{\columnsep}{2.025cm}

\grechangestyle{initial}{\fontsize{12}{12}\selectfont}
\grechangestyle{annotation}{\fontsize{20}{20}\selectfont}
\grechangedim{beforeinitialshift}{0 cm}{fixed}\grechangedim{afterinitialshift}{0 cm}{fixed}
\grechangedim{manualinitialwidth}{1.05 cm}{fixed}
\grechangedim{annotationraise}{-0.372 cm}{fixed}
\grechangedim{spacelinestext}{3.3 ex}{fixed}
\gresetannotationvalign{top}
\gresetclivisalignment{always}
\grechangestaffsize{20}

\NewDocumentCommand\scspace{m}{\textsc{{{\addfontfeature{LetterSpace=5.0}{#1}}}}}

%%spacing of capitals is aesthetic preference and font-dependent but it is recommended so as to avoid serifs clashing with one another

\NewDocumentCommand{\sniphspace}{}{\hspace{3.67pt}%
}

%%if we decide to change these values, we can just replace the number in the definition instead of a dozen or more replacements with ctrl+f (cmd+f on a Mac).

\NewDocumentCommand{\myvspace}{}{\vspace{1.5cm}%
}

\pagestyle{empty}

\begin{document}
\fontsize{14}{14}\selectfont

\begin{center}{\scspace{Practice Intervals}}\\\vspace{3mm}\begin{small}{for Ear-Training}\end{small}\end{center}\myvspace

\begin{paracol}{4}
\greannotation{1.}
\gabcsnippet{(c4) ~do{<v>\sniphspace</v>}ti(ji) (::)}\myvspace\switchcolumn

\greannotation{2.}
\gabcsnippet{(c3) ~do{<v>\sniphspace</v>}la(hf) (::)}\myvspace\switchcolumn

\greannotation{3.}
\gabcsnippet{(c4) ~do{<v>\sniphspace</v>}so(jg) (::)}\myvspace\switchcolumn

\greannotation{4.}
\gabcsnippet{(c4) ~do{<v>\sniphspace</v>}fa(jf) (::)}\myvspace\switchcolumn

\greannotation{5.}%\vspace*{1.7mm}%space needed to align with c4 staves on same row
\gabcsnippet{(c3) ~fa{<v>\sniphspace</v>}so(de) (::)}\myvspace\switchcolumn

\greannotation{6.}%\vspace*{1.7mm}
\gabcsnippet{(c3) ~fa{<v>\sniphspace</v>}la(df) (::)}\myvspace\switchcolumn

\greannotation{7.}%\vspace*{1.7mm}
\gabcsnippet{(c3) ~fa{<v>\sniphspace</v>}te(gxdg) (::)}\myvspace\switchcolumn

\greannotation{8.}%\vspace*{1.7mm}
\gabcsnippet{(c3) ~fa{<v>\sniphspace</v>}do(dh) (::)}\myvspace\switchcolumn

\greannotation{9.}
\gabcsnippet{(c4) ~la{<v>\sniphspace</v>}so(hg) (::)}\myvspace\switchcolumn

\greannotation{10.}
\gabcsnippet{(c4) ~la{<v>\sniphspace</v>}fa(hf) (::)}\myvspace\switchcolumn

\greannotation{11.}
\gabcsnippet{(c4) ~la{<v>\sniphspace</v>}mi(he) (::)}\myvspace\switchcolumn

\greannotation{12.}
\gabcsnippet{(c4) ~la{<v>\sniphspace</v>}re(hd) (::)}\myvspace\switchcolumn

\greannotation{13.}
\gabcsnippet{(c4) ~mi{<v>\sniphspace</v>}fa(ef) (::)}\switchcolumn

\greannotation{14.}
\gabcsnippet{(c4) ~mi{<v>\sniphspace</v>}so(eg) (::)}\switchcolumn

\greannotation{15.}
\gabcsnippet{(c4) ~fa{<v>\sniphspace</v>}mi(fe) (::)}\switchcolumn

\greannotation{16.}
\gabcsnippet{(c4) ~fa{<v>\sniphspace</v>}re(fd) (::)}\end{paracol}

\end{document}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions