Debian Codegraph @

texmf-dist/doc/latex/liederbuch/liederbuch-documentation.tex

raw
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 % %
3 % Made by Gabriel Ruprecht %
4 % %
5 % This work is published under the %
6 % LaTeX project public license 1.3 %
7 % %
8 % Package version 1.1.0 %
9 % 2025-01-20 %
10 % %
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \documentclass[12pt,a4paper]{scrreprt}
13 \usepackage[utf8]{inputenc}
14 \usepackage[english]{babel}
15 \usepackage{amsmath}
16 \usepackage{amsfonts}
17 \usepackage{amssymb}
18 \usepackage{graphicx}
19 \usepackage[dvipsnames]{xcolor}
20 \usepackage{multicol}
21 \usepackage{tipa}
22 \usepackage{tikz}
23 \usepackage{longtable}
24 \usepackage[parfill]{parskip} % no indendation, though proper paragraph spacing
25 \usepackage{varioref}
26 \usepackage[hidelinks,colorlinks=false,bookmarks=false,
27 pdftitle={The Liederbuch-Package},
28 pdfsubject={LaTeX},
29 pdfkeywords={music,score,scores,notation,notes},
30 pdfauthor={Gabriel Ruprecht},
31 urlcolor=blue,
32 pdfstartview=Fit
33 ]{hyperref}
34 \usepackage{listings}
35 \lstset
36 { %Formatting for code in appendix
37 language=TeX,
38 numbers=left,
39 stepnumber=1,
40 showstringspaces=false,
41 tabsize=1,
42 breaklines=true,
43 breakatwhitespace=false,
44 basicstyle=\ttfamily}
45 %\DeclareUnicodeCharacter{017F}{s}
46
47 \begin{document}
48 {
49 \def\vfill{\vskip 0pt plus 300pt minus 30pt \relax}
50 \begin{center}
51 \pagenumbering{gobble}
52 \mbox{}\vskip 50pt\relax
53 \textsf{\textbf{\huge The Liederbuch-Package}}
54 \vskip 12pt \relax
55 \textipa{\textbf{\large[D@ li:d\textturna bu:x-p\ae kIdZ]}}
56 \vfill\mbox{}
57 \vfill\mbox{}
58 {\Large Gabriel Ruprecht}
59 \vfill\mbox{}
60 \normalsize{created with a lot of help from \LaTeX .SX and the German lilypond-forum}
61 \vfill\mbox{}
62 \vfill\mbox{}
63 {\Large \today}
64 \vfill\mbox{}
65 \vfill\mbox{}
66 \vfill\mbox{}
67 \fbox{\includegraphics[height=0.42\paperheight , page=1]{liederbuch-demo-project/liederbuch-demo-project}}
68 \vskip 40pt\relax
69 Version 1.1.0
70 \mbox{}\vskip -80pt\relax
71 \mbox{}
72 \end{center}
73 \newpage
74 \pagenumbering{arabic}
75 \setcounter{page}{2}
76 }
77
78
79
80 %ſſſ
81
82 \tableofcontents
83
84
85 \chapter{Introduction}
86 \label{Introduction}
87 The Liederbuch-Package originated in the search for a standardized, simple and fast way, to produce small songbooks for my fraternity\footnote{It is a German fraternity and therefore quite different from american ones.}. The idea was to provide a few commands to make a songbook. It should also include some designs and be easily usable by \mbox{non-\TeX -safe} people.
88
89 %\newpage
90 The sample on the title page uses just the following commands:
91 \begin{lstlisting}[breaklines,numbers=left]
92 \documentclass[a5paper, 11pt]{scrartcl}
93 \usepackage[ngerman]{babel}
94 \usepackage[utf8]{inputenc}
95 \usepackage{graphicx}
96 \usepackage{scrlayer-scrpage}
97
98 \usepackage{TestLiederbuch}
99
100
101 \LBHead{%
102 {\Large \textbf{\print{title}}}\hfill\mbox{}\vspace*{5pt}\\
103 \makebox[32pt]{Musik:\hfill} \print{composer} \\\makebox[32pt]{Text:\hfill} \print{lyricist}\vspace*{3pt}
104
105 }
106 \LBFoot{Herausgabedatum: \print{date}\hfill\mbox{}}
107
108 \setSpaceBeforeStropheValue{15pt plus 5pt}
109 \setSpaceAfterStropheValue{0pt plus 5pt}
110 \setSpaceBeforeHeadValue{15pt plus 10pt minus 5pt}
111 \setSpaceBeforeFootValue{15pt plus 10pt minus 5pt}
112
113 \begin{document}
114
115 \LBsong{TestLiederbuch}{1}{nt}
116
117 \end{document}
118 \end{lstlisting}
119
120 As you see, inside begin-end-document, there is only one line, which inserts the whole song of the songbook. The previous statements are just for the appearance of all songs. To access the songbook, here \glqq TestLiederbuch\grqq , you have to include it in the first place, via \verb+\usepackage{ }+ with the songbook name.
121
122 %\newlength\tempheight
123 %\tempheight=\textheight
124 %\textheight=1.05\textheight
125 %\newpage
126 %\textheight=\tempheight
127
128 The songbook looks like the following. The \verb+\ns+, stands for new syllable (German: neue Silbe). The star just adds a dash between the syllables:
129 \begin{lstlisting}[breaklines,numbers=left]
130 \ProvidesPackage{TestLiederbuch}
131 \RequirePackage{liederbuch}
132
133 \begin{liederbuch}[
134 titleOfLargerWork = Test-Liederbuch &
135 date = 2017 &
136 seriesTitle = Demoprojekt
137 ]{TestLiederbuch}
138
139 \begin{lied}[title=Hänschen klein & lyricist=Volkslied \& überliefert & composer = Volkslied]{nt}{1}
140 {%
141 \notenzeile{\includegraphics[width=\linewidth,page=1]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
142 {\nspace{5pt} Häns \ns* chen \ns klein, \ns \ns ging \ns all \ns* ein \ns \ns in \ns die \ns wei \ns* te \nspace{4}}
143 \notenzeile{\includegraphics[width=\linewidth,page=2]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
144 {\nspace{12pt} Welt \ns hin \ns* ein. \ns \ns Stock \ns und \ns Hut \ns steht \ns ihm \ns gut, \nspace{5}}
145 \notenzeile{\includegraphics[width=\linewidth,page=3]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
146 {\nspace{6} ist \ns gar \ns wohl \ns* ge \ns* mut. \nspace{5} Ab \ns* er \ns Mut \ns* ter \nspace{3} }
147 \notenzeile{\includegraphics[width=\linewidth,page=4]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
148 {\nspace{4} wein \ns* et \ns sehr, \ns hat \ns ja \ns wohl \ns kein \ns Häns \ns* chen \ns mehr. \nspace{2} }
149 \notenzeile{\includegraphics[width=\linewidth,page=5]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
150 {\nspace{5} Da \ns be \ns* sinnt \ns \ns sich \ns das \ns Kind, \ns \ns kehr \ns* et \ns heim \ns ge \ns* schwind \nspace{2} }
151 }
152 \end{Lied}
153
154 \end{liederbuch}
155 \end{lstlisting}
156
157
158 As you see, the big frame is the Liederbuch-environment (songbook), inside which several Lieder (songs) can be. Each garnished with some meta data. If you look back to the cover page, you can see, that this meta data can be used in the header and footer of the songs. Each \verb+\notenzeile+ command takes two arguments: The score image and the lyrics.
159
160
161 \chapter{General information}
162 \section{Terminology}
163 The following list is for understanding the structure of the commands.
164 \begin{enumerate}
165 \item \emph{GFM} are the tokens which precede every internal command of the package. They also precede some end-user commands. These are the first letters of all the first names of the original author (Gabriel Franz Maria). If some George Florian Michael in Oklahoma uses the same scheme, I'm really sorry, for the interference and incompability.
166 \item \emph{Lied/Lieder} is German and translates to song/songs.
167 \item \emph{Buch} translates to book
168 \item \emph{Heft} translates to notebook, booklet
169 \item \emph{Liederheft} translates to songbook. It describes a small songbook you use i.e. for weddings and is made out of a few printed pages, stapled together.
170 \item \emph{Liederbuch} translates to songbook also. But it describes the songbook, you copied the songs for the i.e. wedding from.
171 \item \emph{Note(n)} means note(s) as in music.
172 \item \emph{Zeile} means line as in text line.
173 \item All the internal Commands follow the same rule of \\\verb+\GFM@CurrentPackageAbbreviation@CommandName+
174 \end{enumerate}
175
176
177
178
179 %\newpage
180 \section{The Different Parts of the Liederbuch-Package}
181 The following subsections are short descriptions of the packages. The full description is provided in each corresponding chapter.
182 \subsection{Liederbuch}
183 This (main) package provides commands and environments to create songbooks which can be used elsewhere. The features are:
184 \begin{itemize}
185 \item the font of the lyrics appear in the current \LaTeX -font (can be overridden in the songbooks)
186 \item customizeable spaces to change the appearance of the imported song. i.e. space before song head, space after song head etc. These spaces also allow the use of \verb+plus+ and \verb+minus+, the way they are used in skips.
187 \item use predefined head and foot styles for the songs or create your own styles.
188 \item use meta data in the headers and footers. i.e. song title, composer, copyright, etc.
189 \end{itemize}
190 This package is not used in the document but in the sty-file, which serves as the songbook. If you have your songbook defined in the preamble, you need to load the package in the document of course.
191
192
193 \subsection{Liederheft - unfinished, better do not use yet}
194 This is a class, which provides commands and environments to easily create small booklets. This includes several predefined designs. This package is not limited to songbooks. It can be used for anything which has the character of a stapled home made booklet for one time use.
195
196
197 \subsection{Print Liederbuch}
198 This allows you to list all content of a songbook (liederbuch), you created. It is much more comfortable than looking at the source code.
199
200
201 \chapter{Liederbuch-Package}
202 This package provides the commands to create the songbooks, aka databases, where you choose the songs from.
203
204
205 \section{Basics}
206 On figure \vref{abb:LiBa1} you see the layout of each song. The head, notes, songtext and foot is grouped in boxes. These boxes are vertically aligned according to the spaces which can include \verb+plus minus+. Example:
207 \begin{lstlisting}[numbers=none]
208 \setSpaceBeforeHead{30pt plus 1fil minus 2pt}
209 \end{lstlisting}
210 About the songtext and its alignment, we get into detail later.
211
212 \begin{figure}
213 \hskip 0pt plus 3pt minus 3pt\begin{tikzpicture}
214 \tikzset{inner sep=0pt, outer sep= 0pt}
215
216 %\node [above] at (0.5\textwidth, 0) {\parbox{\textwidth}{\texttt{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.}}};
217 %Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem.}};
218
219
220 %\draw [dotted,thin] (\textwidth,0) -- (\textwidth,-19);
221 %\draw [dotted,thin] (0,0) -- (0,-19);
222
223 \draw [dashed,very thick] (0,1.5) -- (\textwidth,1.5);
224 \draw [very thick] (0,1.5) -- (0,0) -- (\textwidth,0) -- (\textwidth,1.5);
225 \node at (0.5\textwidth, 0.75){\verb+some running text+};
226
227
228 \tikzset{shift={(0,-1)}}
229
230 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
231 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeHead+};
232
233 \tikzset{shift={(0,-0.6)}}
234
235 \draw [very thick] (0,0) rectangle (\textwidth,0.6);
236 \node at (0.5\textwidth, 0.3){\verb+head+};
237
238 \tikzset{shift={(0,-1)}}
239
240 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
241 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterHead+};
242
243 \tikzset{shift={(0,-1)}}
244
245 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
246 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeNotes+};
247
248 \tikzset{shift={(0,-0.6)}}
249
250 \draw [very thick] (0,0) rectangle (\textwidth,0.6);
251 \node at (0.5\textwidth, 0.3){\verb+notes+};
252
253 \tikzset{shift={(0,-1)}}
254
255 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
256 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterNotes+};
257
258 \tikzset{shift={(0,-1)}}
259
260 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
261 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeSongLyrics+};
262
263 \tikzset{shift={(0,0)}}
264
265 \draw [very thick] (0,0) rectangle (\textwidth,-2.5);
266 \node at (0.5\textwidth, -0.5){\verb+songtext below notes+};
267
268 \draw [<->, very thick] (0,-2) -- (2, -2);
269 \node at (1, -1.5){\verb+\nspace+};
270
271 \node at (2.5, -2){\verb+word+};
272
273 \draw [<->, very thick] (3,-2) -- (5, -2);
274 \node at (4, -1.5){\verb+\ns+};
275
276 \node at (5.5, -2){\verb+word+};
277
278 \draw [<->, very thick] (6,-2) -- (8, -2);
279 \node at (7, -1.5){\verb+\ns+};
280
281 \node at (9, -2){\verb+syllable+};
282
283 \draw [<->, very thick] (10,-2) -- (10.8, -2);
284 \node at (11, -1.2){\verb+\ns*+};
285
286 \draw [thick](10,-1.85) [out=90, in= -90] to (11,-1.5) [out=-90, in= 90] to (12, -1.85);
287 \node at (11, -2){\verb+-+};
288
289 \draw [<->, very thick] (11.2,-2) -- (12, -2);
290
291 \node at (13, -2){\verb+syllable+};
292
293 \draw [<->, very thick] (14,-2) -- (15.75, -2);
294 \node at (14.875, -1.5){\verb+\nspace+};
295
296 \tikzset{shift={(0,-3.5)}}
297
298 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
299 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterSongLyrics+};
300
301 \tikzset{shift={(0,-1)}}
302
303 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
304 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeNotes+};
305
306 \tikzset{shift={(0,-0.6)}}
307
308 \draw [very thick] (0,0) rectangle (\textwidth,0.6);
309 \node at (0.5\textwidth, 0.3){\verb+notes+};
310
311 \tikzset{shift={(0,-1)}}
312
313 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
314 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterNotes+};
315
316 \tikzset{shift={(0,-1)}}
317
318 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
319 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeSongLyrics+};
320
321 \tikzset{shift={(0,-1.5)}}
322
323 \draw [very thick] (0,0) rectangle (\textwidth,1.5);
324 \node at (0.5\textwidth, 1.0){\verb+songtext below notes+};
325 \node at (0.5\textwidth, 0.4){\verb+like above+};
326
327 \tikzset{shift={(0,-1)}}
328
329 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
330 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterSongLyrics+};
331
332 \tikzset{shift={(0,-1)}}
333
334 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
335 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeFoot+};
336
337 \tikzset{shift={(0,-0.6)}}
338
339 \draw [very thick] (0,0) rectangle (\textwidth,0.6);
340 \node at (0.5\textwidth, 0.3){\verb+foot+};
341
342 \tikzset{shift={(0,-1)}}
343
344 \draw [<->, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
345 \node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterFoot+};
346
347 \tikzset{shift={(0,-1.5)}}
348
349 %\node [below] at (0.5\textwidth, 0) {\parbox{\textwidth}{\texttt{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.}}};
350 %Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.}};
351 %Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem.}};
352
353 \draw [dashed,very thick] (0,0) -- (\textwidth,0);
354 \draw [very thick] (0,0) -- (0,1.5) -- (\textwidth,1.5) -- (\textwidth,0);
355 \node at (0.5\textwidth, 0.75){\verb+some running text+};
356
357 \end{tikzpicture}\hskip 0pt plus 3pt minus 3pt
358 \vskip 10pt plus 10pt minus 10pt
359 \caption{layout and spacing of a page with several musical lines\hskip 0pt plus 1filll\mbox{}}
360 \label{abb:LiBa1}
361 \vskip -14pt
362 \end{figure}
363
364 %%In \varioref{}
365 %
366 %\begin{figure}
367 %\begin{tikzpicture}
368 %\draw [very thick] (0,0) -- (0,1) -- (\textwidth,1) -- (\textwidth,0);
369 %\node at (0.5\textwidth, 0.5){music staff with notes, loaded from image};
370 %
371 %\tikzset{shift={(0,-1.5)}}
372 %
373 %\draw [very thick] (0,0) rectangle (\textwidth,1.5);
374 %
375 %\draw [<->, very thick] (0.0\textwidth, 0.5) -- (0.2\textwidth, 0.5);
376 %\node at (0.1\textwidth, 1){\verb+\nspace{x pt}+};
377 %
378 %\draw [very thick] (0.2\textwidth,0.25) rectangle (0.3\textwidth,0.75);
379 %\node at (0.25\textwidth, 0.5){Word};
380 %
381 %\draw [<->, very thick] (0.3\textwidth, 0.5) -- (0.4\textwidth, 0.5);
382 %\node at (0.35\textwidth, 1){\verb+\ns+};
383 %
384 %\draw [very thick] (0.4\textwidth,0.25) rectangle (0.45\textwidth,0.75);
385 %\node at (0.425\textwidth, 0.5){Syl};
386 %
387 %\draw [<-, very thick] (0.45\textwidth, 0.5) -- (0.49\textwidth, 0.5);
388 %\node at (0.5\textwidth, 1){\verb+\ns*+};
389 %\draw [very thick] (0.49\textwidth, 0.35) rectangle (0.51\textwidth, 0.65);
390 %\node at (0.5\textwidth, 0.5){-};
391 %\draw [->, very thick] (0.51\textwidth, 0.5) -- (0.55\textwidth, 0.5);
392 %
393 %
394 %\draw [very thick] (0.55\textwidth,0.25) rectangle (0.6\textwidth,0.75);
395 %\node at (0.575\textwidth, 0.5){la};
396 %
397 %\draw [<-, very thick] (0.6\textwidth, 0.5) -- (0.64\textwidth, 0.5);
398 %\node at (0.65\textwidth, 1){\verb+\ns*+};
399 %\draw [very thick] (0.64\textwidth, 0.35) rectangle (0.66\textwidth, 0.65);
400 %\node at (0.65\textwidth, 0.5){-};
401 %\draw [->, very thick] (0.66\textwidth, 0.5) -- (0.7\textwidth, 0.5);
402 %
403 %
404 %\draw [very thick] (0.7\textwidth,0.25) rectangle (0.75\textwidth,0.75);
405 %\node at (0.725\textwidth, 0.5){bies};
406 %
407 %\draw [<->, very thick] (0.75\textwidth, 0.5) -- (1.0\textwidth, 0.5);
408 %\node at (0.875\textwidth, 1){\verb+\nspace{y pt}+};
409 %
410 %
411 %\end{tikzpicture}
412 %\caption{layout and spacing of one musical line $\backslash$notezeile\{notes\}\{text\}\hskip 0pt plus 1filll\mbox{}}
413 %\label{abb:LiBa}
414 %\end{figure}
415
416 %\LBsong{Test}{1}{nt}
417
418 \section{What the packages uses}
419 The package makes use of the following packages. This is just for your information and has almost no practical use. It is mostly internals:
420 \begin{itemize}
421 \item xparse\\
422 Used for commands with more than one optional arguments and use of the * for multiple variants for commands.
423 \item graphicx\\
424 Not explicitely necessary, but necessary in most cases. Includes the note-snippets.
425 \item etoolbox\\
426 Used for creating command sequences
427 \item environ\\
428 Used for creating the Environments for the Liederbuch-package
429 \item pgfmath\\
430 Needed for using length in relation to the linewidth. If you do not use any unit for \verb+\nspace{<some value>}+, it is read as percent of linewidth. This is very usefull, as the target linewidth might change a bit, and the alignment of the syllables wouldn't fit to the notes.
431 \end{itemize}
432
433 \section{User Commands}
434
435 \subsection{Building a Songbook}
436 Every songbook consists of at least one sty-file. You can also put the songbook into the preamble like in GFM-Setzhilfe\footnote{This file can be downloaded from the git repo of the package: \href{https://bitbucket.org/maestro-glanz/liederbuch-package/src/master/}{bitbucket--liederbuch-package}} (typesetting helper), but the intended use is to have a separate file. This file contains the actual database (and may call other databases/songbooks itself). Furthermore, there may be score snippets for adding notes to the lyrics, pixel graphics from scans and other resources.
437
438 If you create and package a songbook, it should follow certain rules concerning the folder structure:
439 \begin{lstlisting}[numbers=none]
440 A new folder for all the content:
441 ./this_is_an_example
442
443 And in this folder the sty-file and pdf-snippets (or png-graphics for example):
444 ./this_is_an_example/this_is_an_example_songbook.sty
445 ./this_is_an_example/01_song_snippet.ly
446 ./this_is_an_example/01_song_snippet.pdf
447 ./this_is_an_example/02_another_song_snippet.ly
448 ./this_is_an_example/02_another_song_snippet.pdf
449 ./this_is_an_example/03_summertime_(gershwin).ly
450 ./this_is_an_example/03_summertime_(gershwin).pdf
451 ./this_is_an_example/04_On_the_Road_Again_Version-A.ly
452 ./this_is_an_example/04_On_the_Road_Again_Version-A.pdf
453 ./this_is_an_example/04_On_the_Road_Again_Version-B.ly
454 ./this_is_an_example/04_On_the_Road_Again_Version-B.pdf
455 \end{lstlisting}
456
457 If you have a songbook made by someone else, you are fine. If you haven't, you need to build it yourself. The preamble of the sty-file contains the following lines:
458 \begin{lstlisting}
459 \ProvidesPackage{name of the songbook}
460 \RequirePackage{liederbuch}
461 \end{lstlisting}
462 You may add some of your own packages you want to use in the songbook. For example if you typeset the scores with musixtex, you can add this package. If you want to use tikz instead, you are free to go. Most likely, you will use the graphicx-package, as using pdf-snippets is the imho best way, to use this package.
463
464 To start a songbook, you must first write these lines:
465 \begin{lstlisting}[numbers=left,firstnumber=5]
466 \begin{liederbuch}[<meta data>]{<name of the songbook>}
467 % the songs (Lieder-environments) go here
468 [...]
469 [...]
470 \end{lstlisting}\vskip -13pt\relax
471 \begin{lstlisting}[numbers=left,firstnumber=78]
472 [...]
473 \end{liederbuch}
474 \end{lstlisting}
475 This must contain all songs. This environment is provided by \textit{liederbuch}. What the meta data does, we will come to at a later point. After you created a songbook, you can create songs inside it. Every song number can be included multiple times in different variants. If two songs have the same number and the same variant tag, the later overwrites the first:
476 \begin{lstlisting}[numbers=left,firstnumber=14]
477 \begin{lied}[<meta data>]{<variant>}{<song number>}
478 <the song content>
479 \end{lied}
480 \end{lstlisting}
481 The song number identifies the songs. If you have to different kinds of song number 123 (i.e. piano score and choir score), you can make two different variants. i.e. \verb+ps+ and \verb+cs+. The way, you name the variants, is up to you. At can be anything beside the \verb+\empty+-command-sequence.
482
483 Neither song number, nor variant has to be an actual number. You can write ''One'' instead of ''1''. It will work, but you should be at least consistent over the whole song boook. And writing eight-hundred-sixty-one instead of a numeral is highly depreciated.
484
485
486 \noindent\rule{\textwidth}{1pt}
487
488 {\Large \textbf{Example}}
489
490 \noindent Assuming you have the following songbook created:
491 \begin{lstlisting}[numbers=left,firstnumber=30]
492 \begin{liederbuch}{testSongbook}
493 \begin{lied}[%
494 meta data=this is just a test &%
495 otherData = it really is]%
496 {var1}{144000}
497 No notes and text yet.
498 \end{lied}
499 \end{liederbuch}
500 \end{lstlisting}
501 If you call the song with
502 \begin{lstlisting}[numbers=left,firstnumber=72]
503 \LBsong{testSongbook}{144000}{var1}
504 \end{lstlisting}
505 the ouput will be
506 \begin{lstlisting}[numbers=none]
507 No notes and text yet.
508 \end{lstlisting}
509 The meta data elements are not used yet, but can be used later.\vspace*{-2ex}
510
511 \noindent\rule{\textwidth}{1pt}
512
513 The output should be an actual song of course. To typeset these, there are several commands inside(!) the Lied-environment available.\vspace*{-30pt}
514
515 \newpage
516 \noindent\rule{\textwidth}{1pt}
517
518 {\Large \textbf{Extended example}}
519
520 You start of course with the Liederbuch environment first:
521 \begin{lstlisting}[firstnumber=7]
522 \begin{liederbuch}[%
523 songbook=Old Irish Folk Songs &%
524 author = Travis O'Connor
525 ]
526
527 \begin{lied}[
528 title = What shall we do with a drunken saylor &
529 composer = Traditional &
530 lyricist = Probably a drunken saylor
531 ]{nt}{23}
532 %The notenzeile command goes here
533 \end{lied}
534
535 \begin{lied}[
536 title = My lad got beaten up in the pub &
537 composer = Johnny O'Neeye %
538 lyricist = Jimmy Jailedup
539 ]{nt}{24}
540 %The notenzeile commands goes here
541 \end{lied}
542
543 \end{liederbuch}
544 \end{lstlisting}
545
546 For every combination of notes and text, you use one notenzeile command. If your song score has 5 lines of notes, you need the notenzeile command 5 times, if it is 3 lines, you need it 3 times. The notenzeile command is smart enough to show several strophes of text for one line, if needed:
547 \begin{lstlisting}[firstnumber=15]
548 \notenzeile[linewidth of the line | default:\linewidth]
549 {the part with the notes from the score}%
550 {the text of strophe 1}%
551 [the text of strophe 2]%
552 [the text of strophe 3]%
553 [the text of strophe 4]%
554 [the text of strophe 5]%
555 [the text of strophe 6]%
556 \notenzeile{\includegraphics[width=\linewidth,page=2]{somePath}}%
557 {\nspace{5} This \ns is \ns the \ns line \ns two \nspace{3}}
558 \notenzeile{\includegraphics[width=\linewidth,page=3]{somePath}}%
559 {\nspace{3em} and \ns three \ns of \ns the \ns do \ns* cu \ns* ment \ns of do cu ments\nspace{7pt}}
560 \end{lstlisting}
561
562 As you see, the strophe numbers 2 and above are optional arguments. Standard case should be one line of text for one line of notes, but you can add more. If you need more than 6 strophes below one line of notes, you do something, which you shouldn't do. If you want more, you can hack the source code.
563
564 Inside of the notenzeile command, there are several commands available:
565 \begin{lstlisting}[numbers=none]
566 \songLyrics{}
567 % This in an internal command, but you can use it. It creates a makebox, with the \ns, \ns* and \nspace commands available inside.
568
569 \ns[space correction]
570 % This divides two words. You can optionally add an offset to the command, which shifts the next syllable (positive = right, negative = left). You can use standard length units. If you don't use any unit, percent-linewidth is used.
571
572 \ns*[space correction]
573 % It is exactly like \ns, but it adds a dash in between. It is meant to divide syllables of one word.
574
575 \nspace{length}
576 % This does exactly the same as hspace*, but this command also accepts no unit (just a number without an unit), which is interpreted as percent-linewidth.
577
578 \multiline{0.5\linewidth}{text for strophe 1}{text for str 2}[str. 3][4][5][6]
579 % This is usefull, if your song switches to refrain within one line or only some section of one song line has two text lines. It creates several stacked lines within one line.
580 \end{lstlisting}
581
582 So far, this creates all the notes and text together. Normally, songs are typeset, that only the first strophe is below the notes, the other strophes are printed as text blocks.
583
584 These text blocks are built by the strophe environment:
585 \begin{lstlisting}[numbers=none]
586 \begin{strophe}[strophe number]
587 Some text in any format.
588 \end{strophe}
589 \end{lstlisting}
590 Normally, the strophe numbers are automatically counted up for every use of the strophe environment. So, the first time, you use this environment in each song, you should override this with the optional parameter strophe number. I.e. if the first usage is number 2, then you write \verb+\begin{strophe}[2]+. The next strophe will then be automatically~3.
591
592 \subsection{Using a Songbook}
593 \label{LiUsUs}
594 Using a songbook is pretty easy. You must include the songbooks with
595 \begin{lstlisting}[numbers=none]
596 \usepackage{nameOfSongbook}
597 \end{lstlisting}
598
599 and call the desired song with
600 \begin{lstlisting}[numbers=none]
601 \LBsong{songbook}{number}{variant}
602 \end{lstlisting}
603 Note: The name of the package you use needn't be the same name of the songbook. You can define the songbook \verb+abc+ inside a sty-file called \verb+alphabet+. But it is highly discouraged.
604
605 There are several versions of each songnumber possible. Due to the variant, you can store the piano version of a song in the same songbook as the choir music version.
606 If you use \verb+\LBsong{paradiseSongs}{42}{4voice}+ for example, you get the song number 42 out of the paradiseSongs-songbook in the version for four voices (which of course you must have defined beforehand).
607
608 If some meta data is incorrect and you can not or shouldn't change the source songbook, you can edit the meta data with the
609 \begin{lstlisting}[numbers=none]
610 \tweakMetaData{songbook}{song number}{song variant}{meta data element}
611 \end{lstlisting}
612 command. It just overwrites the meta data element, that was created for that specific song at load time. The principle is the same as in \verb+\GFM@LB@unpackage+.
613
614 %\vskip 20pt plus 20pt\relax
615 %\newpage
616 \subsection{List of Songs (toc)}
617 You can create a list of songs with
618 \begin{lstlisting}[numbers=none]
619 \listofsongs
620 \end{lstlisting}
621
622 \newpage
623 It has by standard the same format as \verb+\listoffigures+. The style can be selected by using
624 \begin{lstlisting}[numbers=none]
625 \listofsongsstyle{<style>}
626 \end{lstlisting}
627
628 The available styles are:
629 \begin{itemize}
630 \item ''simple'' (default)\\
631 \verb+<song title> ...[...]... <page number>+
632 \item ''simple with number''\\
633 \verb+<song number in the songbook> <song title> ...[...]... <page number>+
634 \item ''simple with document number''\\
635 \verb+<song number in the document> <song title> ...[...]... <page number>+
636 \item ''twolines''
637 \item ''semitwolines''
638 \end{itemize}
639
640 The first three work. The other two don't work yet.
641
642
643 \subsection{Refs, References and Hyperref}
644 Hyperref is supported and should work out of the box, if loaded. Each song can be referenced by
645 \begin{lstlisting}[numbers=none]
646 \pageref{LB_lied_<songbook>_<song number>_<variant>}
647 \end{lstlisting}
648
649 If you include a song more than once, each duplicate must have a suffix (a for first duplicate, b for second, c for third,...):
650 \begin{lstlisting}[numbers=none]
651 \pageref{LB_lied_<songbook>_<song number>_<variant>_<letter>}
652 \end{lstlisting}
653 Note: The first occurence has no letter suffix, the second occurence start with suffix ''\_a''.
654
655 \subsection{Babel}
656 The Babel package is supported. The following terms are supported and can be used in the header and footer (see section \nameref{LpUcCa}). The supported terms are:
657 \begin{itemize}
658 \item[] \verb+\listofsongsname+
659 \item[] \verb+\LBsongComposer+
660 \item[] \verb+\LBsongLyricist+
661 \item[] \verb+\LBsongEditor+
662 \item[] \verb+\LBsongYear+
663 \item[] \verb+\LBsongCopyright+
664 \item[] \verb+\LBsongEditorialOffice+
665 \item[] \verb+\LBsongEditon+
666 \item[] \verb+\LBsongPrint+
667 \end{itemize}
668 Each of these terms will be displayed in the selected language. If the alphabet uses upper-lower-case, the first letter is always a capital letter. Except for German of course, which has their own system and English, which uses ''This Kind of Unique Way''. If you find a translation mistake (by ChatGPT, though I checked it) or miss a language, please open a bug report (see
669
670 The supported languages are:
671 \begin{multicols}{3}
672 acadian\\
673 afrikaans\\
674 albanian\\
675 american\\
676 australian\\
677 austrian\\
678 bahasa\\
679 bahasai\\
680 bahasam\\
681 basque\\
682 brazil\\
683 brazilian\\
684 breton\\
685 british\\
686 bulgarian\\
687 canadian\\
688 canadien\\
689 catalan\\
690 croatian\\
691 czech\\
692 danish\\
693 dutch\\
694 english\\
695 esperanto\\
696 estonian\\
697 finnish\\
698 francais\\
699 french\\
700 frenchb\\
701 galician\\
702 german\\
703 germanb\\
704 greek\\
705 hebrew\\
706 hungarian\\
707 icelandic\\
708 indon\\
709 indonesian\\
710 interlingua\\
711 irish\\
712 italian\\
713 latin\\
714 lowersorbian\\
715 magyar\\
716 malay\\
717 meyalu\\
718 naustrian\\
719 newzealand\\
720 ngerman\\
721 norsk\\
722 nynorsk\\
723 polish\\
724 polutonikogreek\\
725 portuges\\
726 portuguese\\
727 romanian\\
728 russian\\
729 samin\\
730 scottish\\
731 serbian\\
732 slovak\\
733 slovene\\
734 spanish\\
735 swedish\\
736 turkish\\
737 ukrainian\\
738 uppersorbian\\
739 welsh\\
740 UKenglish\\
741 USenglish
742 \end{multicols}
743
744 \newpage
745 \subsection{Creating a Theme}
746 \label{LpUcCa}
747 The appearance of the songs consist mainly of three things:
748 \begin{itemize}
749 \item Header
750 \item Footer
751 \item Spacing
752 \end{itemize}
753 Changing the background of the songs isn't supported yet and might never be.
754
755 The header and footer can be edited via
756 \begin{lstlisting}[numbers=none]
757 \LBHead{Definition}
758 \end{lstlisting}
759 and
760 \begin{lstlisting}[numbers=none]
761 \LBFoot{Definition}
762 \end{lstlisting}
763
764 Here you can use the meta data-values given in the song. As you might remember, the songs are defined as i.e.
765
766 \begin{lstlisting}
767 \begin{liederbuch}[
768 titleOfLargerWork = Test-Liederbuch &
769 date = 2017 &
770 seriesTitle = Demoprojekt
771 ]{TestLiederbuch}
772
773 \begin{lied}[
774 title=Hänschen klein &
775 lyricist=Volkslied \& Überliefert &
776 composer = Volkslied
777 ]{nt}{1}
778 ... something ...
779 \end{lied}
780 \end{liederbuch}
781 \end{lstlisting}
782
783 An example header and footer would look like this:
784 \label{LiUsCrEx}
785 \begin{lstlisting}
786 \LBHead{\Large\print{title}\\
787 \normalsize Taken from \print{titleOfLargerWork}\hspace{30pt}\print{composer}}
788
789 \LBFoot{\print{date}\hfill\print{seriesTitle}}
790 \end{lstlisting}
791
792 As you see, the print-command prints any meta data, which had been defined before. If it is undefined, the print-command prints nothing. This example is of course not the peak of human art work, but it showcases the concept. It is possible to include almost anything (no limitations known yet). For the naming of the meta data refer to section \ref{LiUsMe} \vnameref{LiUsMe}.
793
794 For adjusting the spaces, you can use the following commands. They work with \verb+\vskips+ and can optionally take \verb+plus+ and \verb+minus+. These are the commands to edit the spaces with some example values:
795 \begin{lstlisting}[numbers=none]
796 \setSpaceBeforeHeadValue{3pt plus 0pt minus 1.5pt}
797 \setSpaceAfterHeadValue{-1pt plus 4pt}
798 \setSpaceBeforeNotesValue{2pt minus 1pt}
799 \setSpaceAfterNotesValue{4pt}
800 \setSpaceBeforeStropheValue{3em plus 1pt minus 0.2in}
801 \setSpaceAfterStropheValue{0pt}
802 \setSpaceBeforeSongLyricsValue{0pt}
803 \setSpaceAfterSongLyricsValue{0pt}
804 \setSpaceBeforeFootValue{0pt}
805 \setSpaceAfterFootValue{0pt}
806 \end{lstlisting}
807
808 \subsection{Using printliederbuch}
809 If you want to have a catalogue of all your songs in a songbook, you can use \verb+printliederbuch+. You just need a simple document like this:
810 \begin{lstlisting}
811 \documentclass[a5paper, 11pt]{scrartcl}
812 \usepackage[ngerman]{babel}
813 \usepackage[utf8]{inputenc}
814 \usepackage{printliederbuch}
815 \usepackage{TestLiederbuch}
816 \usepackage{AnotherTestLiederbuch}
817
818 \begin{document}
819
820 \tableofcontents
821
822 \printLiederbuch{TestLB}
823 \printLiederbuch{AnotherTestLB}
824
825 \listofsongs
826
827 \end{document}
828 \end{lstlisting}
829 You need a \verb+documentclass+ of your liking, add some packages of your liking and then you need first, the printliederbuch package and second, the songbook, you want to have a catalogue of. The order is important. Your document needs only one command, the \verb+\printLiederbuch+ command. The argument of \verb+\printLiederbuch+ is not the \verb+\usepackage+ name, but the name, defined in \verb+\begin{liederbuch}{LBname}+.
830
831 Currently, the table of contents only shows the song number and the variant, while the list of songs show the name only.
832
833 %\newpage
834 \subsection{Tips and Tricks}
835 \subsubsection{First the outer spacing, then the syllable spacing}
836 Start by doing the outer spacing first. If these are your lyrics
837 \begin{lstlisting}[numbers=none]
838 {Hänschen klein ging allein in die weite}
839 \end{lstlisting}
840 you start by adding the outer space and separating all syllables
841 \begin{lstlisting}[numbers=none]
842 {\nspace{5} \ns Häns \ns* chen \ns klein \ns ging \ns all \ns* ein \ns in \ns die \ns wei \ns* te \ns \nspace{2}}
843 \end{lstlisting}
844 Once the first and last syllable looks good, you can proceed with the adjustment of the space between the syllable (see next sections). If you don't use a \verb+\ns+ after/before \verb+\nspace{x}+, the lyrics are easier to align, but they are less robust against different linelength. If your song shall work well in A4 and A5 either, consider using it.
845
846 \subsubsection{Replacing $\backslash ns*$ with $\backslash ns - \backslash ns$}
847 If \verb*+ \ns* + separates two long syllables like ''Schne-cken'', \verb*+ \ns* + will to its job. But if the syllables are short like ''O-lé'' or the notes are long, you better replace it with \verb*+ \ns - \ns +. If this is a little bit too long, you can use \verb*+\ns -\ns+ instead (no spaces).
848
849 \subsubsection{Double $\backslash ns$ and $\backslash nspace\{ x\}$}
850 Normally in songs, note lengths tend to be only two different lengths per line. i.e. if your shortest length is a quarter note, the second length is a half note. If the shortest is an eighth, the second one is a quarter. It is rather rare, that a third length occurs. Maybe a dotted note. Most notation software makes the space after a longer note a little bit longer.
851
852 Best practice has been to make one \verb+\ns+ after each shortest note duration and two \verb+\ns+ after the longer notes. For even longer notes it is better to use a \verb+\nspace{x}+ inline (with x=3 for example). i.e.:
853 \begin{lstlisting}
854 \nspace{7} Häns \ns* chen\ns klein \nspace{2}\ns ist \ns weg, \ns \ns Kro \ns* ko \ns* dil \nspace{4}
855 \end{lstlisting}
856 This example is complete fictional and doesn't occur in any real song.
857
858 \newpage
859 \includegraphics[width=\linewidth,page=1]{liederbuch-demo-project/TestLiederbuchSnippets/haenschenKlein}
860
861 gets this song text:
862 \begin{lstlisting}[numbers=none]
863 \nspace{7} Häns \ns* chen\ns klein \ns ging \ns all \ns* ein \ns \nspace{4} in \ns \ns die \ns \ns wei \ns* te \nspace{4}
864 \end{lstlisting}
865 7\% linewidth space on the left, 4\% on the right. The syllable ''-chen'' is very long. Therefore, a second \verb+\ns+ isn't needed, though the corresponding note is a half note. ''in'' and ''die'' are very short syllables, a second \verb+\ns+ does the trick. After ''\verb+\ns*+ ein'' two \verb+\ns+ isn't enough, therefore a \verb+\nspace{4}+ does the trick.
866
867 \subsubsection{Omitting a space here and there}
868 You might have noticed in the previous example, that after ''-chen'' there is no space. Normally it is \verb*+ \ns + and normally it should be. But in this case, the syllable is already pretty long and we need to get rid of a bit of space. Therefore, the space before is omitted and it is \verb*+\ns + instead. You can only omit the space before \verb+\ns+ not after, as the space after is eaten by the compiler anyway.
869
870 \subsubsection{Hard spaces (\char`~ ) for short syllables}
871 In die following example
872
873 \includegraphics[width=\linewidth,page=3]{liederbuch-demo-project/TestLiederbuchSnippets/haenschenKlein}
874 the text is like this:
875 \begin{lstlisting}[numbers=none]
876 \nspace{6} ist \ns gar \ns wohl \ns* ge\ns -\ns mut. \nspace{6} Ab \ns* er~ \ns Mut \ns* ter \nspace{3.5}
877 \end{lstlisting}
878 The syllable ''\verb+\ns*+ er'' is very short. The spacing will work better, if it is a little bit longer, so we add a hard space (\char`~ ) to the syllable to make it longer.
879
880 \newpage
881 \subsection{Meta Data}
882 \label{LiUsMe}
883
884 The Sheet Music Consortium has created a list of tags for their sheet music to make it easy to find in the database. This seems to be a sensible scheme and is therefore partially reused for the meta data (see \url{https://digital.library.ucla.edu/sheetmusic/aboutProject.html#NameforSMCmetadata-NameMetadata}). The scheme here is mostly taken from there. Another scheme is \url{https://www.dlib.indiana.edu/smcmigrator/fieldnamehelp.php}. A website which doesn't exist any more. There are also some parts taken from there. All the tags in these schemes had been unified and consolidated in this list here. Therefore it is kind of a third deviating scheme taking from both of them and trying to have as least dicrepancies to them as possible. This scheme here also ommits a few parts, which seemed to duplicate others or seemed totally over the top. This section is already totally over the top and awfully perfectionist.
885
886 \vskip 15pt\relax
887 %\newpage
888
889 \textbf{Subsections:}\vspace{10pt}\\
890 \hspace*{40pt}%
891 \parbox{0.8\linewidth}{%
892 \begin{multicols}{2}%
893 {%
894 \setcounter{secnumdepth}{3}%
895 \begin{itemize}
896 \item[\ref{LiUsMeTi}] \nameref{LiUsMeTi}
897 \item[\ref{LiUsMeNa}] \nameref{LiUsMeNa}
898 \item[\ref{LiUsMeSu}] \nameref{LiUsMeSu}
899 \item[\ref{LiUsMeId}] \nameref{LiUsMeId}
900 \item[\ref{LiUsMeRe}] \nameref{LiUsMeRe}
901 \item[\ref{LiUsMeNotedescription}] \nameref{LiUsMeNotedescription}
902 \item[\ref{LiUsMeDa}] \nameref{LiUsMeDa}
903 \item[\ref{LiUsMeLa}] \nameref{LiUsMeLa}
904 \item[\ref{LiUsMeTy}] \nameref{LiUsMeTy}
905 \item[\ref{LiUsMeOr}] \nameref{LiUsMeOr}
906 \item[\ref{LiUsMePh}] \nameref{LiUsMePh}
907 \item[\ref{LiUsMeAb}] \nameref{LiUsMeAb}
908 \item[\ref{LiUsMeTa}] \nameref{LiUsMeTa}
909 \item[\ref{LiUsMeIn}] \nameref{LiUsMeIn}
910 \item[\ref{LiUsMeCa}] \nameref{LiUsMeCa}
911 \item[\ref{LiUsMeCl}] \nameref{LiUsMeCl}
912 \item[\ref{LiUsMeLo}] \nameref{LiUsMeLo}
913 \end{itemize}%
914 }%
915 \end{multicols}
916 }%parbox
917
918 \newpage
919 \subsubsection{Titles}
920 \label{LiUsMeTi}
921 \newcommand*\Tag[3]{{\ttfamily #1} & {\ttfamily =} & {\ttfamily #2} & #3}
922
923 Each resource should have at least one title element associated with it. The following fields can be used to describe titles:
924
925 \renewcommand{\arraystretch}{1.5}
926
927 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
928 Tag & & value examples & description\\
929 \hline
930 \Tag{title}{Gaudeamus igitur}{A word or phrase that names the resource being described.}\\
931 \Tag{subtitle}{iuvenes dum sumus}{Secondary word or phrase that names the resource being described.}\\
932 \Tag{alternativeTitle}{De brevitate vitae}{The "alternative title" data is used for other titles not covered elsewhere in the meta data record.}\\
933 \Tag{firstLine}{Gaudeamus igitur, iuvenes dum sumus}{The "First Line" data is a direct transcription of the first line of lyrics appearing in the song.}\\
934 \Tag{firstLineofChorus}{no chorus}{The "first line of chorus" data is a direct transcription of the first line of the chorus (refrain) appearing in the song.}\\
935 \Tag{titleOfLargerWork}{Allgemeines deutsches Kommersbuch}{The "title of larger work" data is used when the item being cataloged is known to be one part of a larger work with a known title.}\\
936 \Tag{seriesTitle}{German student song books}{The "series title" data is used to record a named series to which the item being cataloged belongs.}\\
937 \Tag{uniformTitle}{no idea, sorry}{A Uniform Title (also known as a Work Title) is a specific cataloger-created title as prescribed by the rules in AACR2. It is used to indicate clearly the musical work represented in a piece of sheet music.}\\
938 \end{tabular}
939
940 \newpage
941 \subsubsection{Names}
942 \label{LiUsMeNa}
943 \begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
944 Tag & & value examples & description\\
945 \hline
946 \Tag{composer}{traditional}{"Composer" meta data is used to record the name of individuals or corporate bodies responsible for creating the musical content of the work being cataloged.}\\
947 \Tag{arranger}{I don't know}{"Arranger" meta data is used to record the name of individuals or corporate bodies responsible for the transforming the musical content of the work being cataloged from its original form, genre, instrumentation, etc., to another for publication. In an arrangement the musical substance remains essentially unchanged.}\\
948 \Tag{lyricist}{some guy of the 19th century}{"Lyricist" meta data is used to record the name of an individual or corporate body responsible for creating the lyrics or text of the work being cataloged.}\\
949 \Tag{performer}{The "hohe Kneipcorona"}{"Performer" meta data is used to record the name of an individual or corporate body indicated on the item being cataloged as a known performer of the work.}\\
950 \Tag{dedicatee}{Not for Elise}{"Dedicatee" meta data is used to record the name of an individual or corporate body to whom the work or publication is dedicated. Do not us record information about handwritten dedications printed on an item after publication; use "Note" for this purpose instead.}\\
951 \Tag{otherName}{Unter Mitwirkung der Lindenwirtin entstanden}{"Other name" meta data is used to record the name of an individual or corporate body responsible for the creation of the item being cataloged that is deemed important but not appropriate for use in any other "Name" or "Publication" data. Do not record individuals or corporate bodies named in lyrics; use "Name as Subject" for this purpose instead.}\\
952 \Tag{engraver}{Gabriel Ruprecht}{The person or organisation, who engraved the sheet music. Commonly with the help of a program like lilypond.}\\
953 \Tag{lithographer}{Heidenhain 600}{The person or company producing the printing plates of the sheet music, if deviating from "publisherName".}\\
954 \Tag{coverEngraver}{Andy Warhol's wife}{"Engraver" meta data is used to record the name of an individual or corporate body responsible for the cover engraving on the publication being cataloged, if deviating from "engraver"}\\
955 \Tag{coverLithographer}{The gremlin in Andy Warhol's basement}{Use "Lithographer" to record the name of an individual or corporate body responsible for the cover lithography on the publication being cataloged, if deviating from "lithographer"}\\
956 \Tag{coverArtist}{Andy Warhol himself}{"Artist" meta data is used to record the name of an individual or corporate body responsible for the cover art on the publication being cataloged.}\\
957 \end{longtable}
958
959 \newpage
960 \subsubsection{Subject}
961 \label{LiUsMeSu}
962 \begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
963 Tag & & value examples & description\\
964 \hline
965 \Tag{topicalSubject}{Drinking beer}{In a song with lyrics "Topical Subject" is used to record what topics occur in the song's lyrics.}\\
966 \Tag{nameAsSubject}{Professor Ubisunt Quiantenos}{"Name as Subject" is used to record a personal or corporate name that is the subject of a song's lyrics.}\\
967 \Tag{formGenreStyle}{Student songs}{"Form/Genre/Style" may be used to record the class or category of music, including the musical style(s) of a work. Form is often described as the organizing element in music, or the historically or functionally specific kind of material.}\\
968 \Tag{temporalSubject}{Romantic period}{The "Temporal Subject" meta data is used to record a named time period relevant to the item being cataloged.}\\
969 \Tag{instrumentation}{Vocal}{A listing of the performing forces called for by a particular piece of sheet music, including both voices and external instruments.}\\
970 \Tag{\hspace*{-40pt}\hfill placeNameSubject}{Germany}{"Place Name Subject" is used to record named countries, states, provinces, counties, and cities associated with the music and lyrics of the item being cataloged.}\\
971 \Tag{\hspace*{-40pt}\hfill otherGeographicSubject}{D-A-CH-Region}{The optional "Other Geographic Subject" meta data is used to record named geographic places that are not countries, states, provinces, counties, or cities associated with the music and lyrics of the item being cataloged.}\\
972 \Tag{localSubject}{University}{"Local Subject" is used to record subject terms meaningful to the holding institution.}\\
973 \Tag{coverSubject}{Loreley in a sleeping dress}{"Cover Subject" is used to record the topical content of the image depicted on the cover of the item being cataloged.}\\
974 \end{longtable}
975
976
977 %
978 % Subject/Topic
979 % In a song with lyrics, Subject/Topic is used to record what topics occur in the song's lyrics.
980 % Temporal Coverage
981 % The Temporal Coverage meta data is used to record a named time period relevant to the item being cataloged.
982 % Geographical Coverage
983 % The Geographical Coverage element is used for general terms that describe geographical coverage.
984 % Geographic Code
985 % Geographic Code refers to a geographic area code associated with the resource. The code should represent the same entity as a term described by the Geographic field.
986 % Referenced Title
987 % The Referenced Title is the title of another printed material that occurs in the lyrics.
988 % Subject Genre
989 % The Subject Genre refers to a genre or form used as part of a subject string when the subject authority distinguishes parts of the subject string (e.g. LCSH).
990 % Referenced Name
991 % Referenced Name is used to record a personal or corporate name that is the subject of a song's lyrics.
992 % Subject Occupation
993 % Subject Occupation is used to record the occupation of the name referenced in the lyrics.
994 % Hierarchical Geographic
995 % The following elements describe geographic information in a hierarchical form:
996 %
997 % Continent
998 % Continent describes the continent on which a named place in the lyrics is located.
999 % Country
1000 % Country describes the country in which a named place in the lyrics is located.
1001 % Province
1002 % Province describes the province in which a named place in the lyrics is located.
1003 % Region
1004 % Region describes the region in which a named place in the lyrics is located.
1005 % State
1006 % State describes the state in which a named place in the lyrics is located.
1007 % Territory
1008 % Territory describes the territory in which a named place in the lyrics is located.
1009 % County
1010 % County describes the county in which a named place in the lyrics is located.
1011 % City
1012 % City describes the city in which a named place in the lyrics is located.
1013 % Island
1014 % Island describes the island on which a named place in the lyrics is located.
1015 % Area
1016 % Area describes the area in which a named place in the lyrics is located.
1017
1018
1019 %\newpage
1020 \subsubsection{Identification Numbers}
1021 \label{LiUsMeId}
1022 \begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1023 Tag & & value examples & description\\
1024 \hline
1025 \Tag{plateNumber}{I have no clue.}{The Sheet Music Consortium adopts the AACR2 definition of a sheet music plate number, as distinct from the publisher number: "A numbering designation assigned to an item by a music publisher, usually printed at the bottom of each page, and sometimes appearing also on the title page. It may include initials, abbreviations, or words identifying a publisher and is sometimes followed by a number corresponding to the number of pages or plates."}\\
1026 \Tag{publisherNumber}{Still no clue}{The Sheet Music Consortium adopts the AACR2 definition of a sheet music publisher number, as distinct from the plate number: "A numbering designation assigned to an item by a music publisher, appearing normally only on the title page, the cover, and/or the first page of music. It may include initials, abbreviations, or words identifying the publisher."}\\
1027 \Tag{catalogNumber}{BWV31029}{An identifying number for a musical composition assigned by the composer, publisher or researcher. Bach-Werksverzeichnis for example.}\\
1028 \Tag{callNumber}{No clue again}{An institution's local identifier indicating the physical location of the item within the collection.}\\
1029 \Tag{otherIdentifier}{Dunno, 1234 maybe?}{Any numbering/naming designation used to identify an item within a collection that is distinct from plate number, publisher number, catalog number, or call number.}\\
1030 \end{longtable}
1031
1032 %\newpage
1033 \subsubsection{Relational Identifier}
1034 \label{LiUsMeRe}
1035 \begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1036 Tag & & value examples & description\\
1037 \hline
1038 \Tag{precedingItem}{ADKB-34}{Identifier for a related item that is the immediate predecessor of the resource in a chronological relationship. Normally used for continuing resources such as serial publications.}\\
1039 \Tag{suceedingItem}{ADKB-36}{Identifier for a related item that is the immediate successor of the resource in a chronological relationship. Normally used for continuing resources such as serial publications.}\\
1040 \Tag{originalItem}{ADKB-35}{Identifier for the original item from which the resource was derived.}\\
1041 \Tag{hostItem}{ADKB}{Identifier of the host item for the constituent unit in a vertical relationship. This information allows users to locate the physical piece that contains the component part described in the record.}\\
1042 \Tag{constitutentItem}{no clue}{Identifier of a constituent part that has been described separately. This information allows users to located a related unit of the resource, particularly when it has been physically separated from the item of which it is considered a part.}\\
1043 \Tag{\hspace*{-10pt}\hfill otherVersionOfItem}{CVLB-68}{Identifier of a related version of the resource described in the record, such as translation in another language.}\\
1044 \Tag{\hspace*{-10pt}\hfill otherFormatOfItem}{ADKB-35--4-voices}{Identifier of a different format of the resource described in the record, such as a microform reproduction.}\\
1045 \end{longtable}
1046
1047
1048 \subsubsection{Notes/Description}
1049 \label{LiUsMeNotedescription}
1050 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1051 Tag & & value examples & description\\
1052 \hline
1053 \Tag{notes}{There exist contradicting orders for the strophes 2 and 3. This version sticks to the one published in Riedingers Gesangsbuch; Line three contains a typo, that was in the original.}{Any notes, that don't fit anywhere else. The "Notes" meta data is used to record information that supplements information in the rest of the meta data record.}\\
1054 \Tag{description}{A song about friendship, beer and wanderlust.}{A general description.}\\
1055 \end{tabular}
1056
1057
1058 \subsubsection{Date Information}
1059 \label{LiUsMeDa}
1060 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1061 Tag & & value examples & description\\
1062 \hline
1063 \Tag{date}{1631}{"Date" meta data holds the date an item was copyrighted or published. }\\
1064 \Tag{dateOfWork}{1630-12-31}{The "Date of Work" records the date the piece of music was written.}\\
1065 \end{tabular}
1066
1067 \subsubsection{Language}
1068 \label{LiUsMeLa}
1069 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1070 Tag & & value examples & description\\
1071 \hline
1072 \Tag{language}{deu}{Use "Language" to record the language of the lyrics of the item being cataloged. Either i.e. German oder the ISO 639-3 code.}\\
1073 \end{tabular}
1074
1075
1076
1077 \subsubsection{Type of Resource}
1078 \label{LiUsMeTy}
1079 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1080 Tag & & value examples & description\\
1081 \hline
1082 \Tag{typeOfResource}{notated music}{There seems to be a definition in the AACR2. But it is not open. So I can't provide other values here.}\\
1083 \end{tabular}
1084
1085
1086 \subsubsection{Publication Meta Data - Origin Info}
1087 \label{LiUsMeOr}
1088 \begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1089 Tag & & value examples & description\\
1090 \hline
1091 \Tag{publisherName}{Guthenbergs Kommersbuchdruckerei}{Those responsible for the physical production and dissemination, of the resource.}\\
1092 \Tag{publisherPlace}{Heidelberg}{The name of the place where a resource has been published.}\\
1093 \Tag{placePublished}{Leipzig}{Where it had been published. i.e. Leipziger Buchmesse $\rightarrow$ Leipzig}\\
1094 \Tag{publisher}{Verlag Arnold Schönberg - Weimar}{Name of the publisher.}\\
1095 \Tag{placePublisher}{Weimar}{Where the publisher is located.}\\
1096 \Tag{dateIssued}{1841-08-01}{When it had been published.}\\
1097 \Tag{copyrightDate}{1841}{The year relevant for copyright and its expiration.}\\
1098 \Tag{dateCreated}{1840-04-03}{When the work had been made. This must be some date prior to publishing.}\\
1099 \Tag{dateModified}{1842-10-03, 1848-06-02}{If a work underwent some modifications like fixing typos.}\\
1100 \Tag{dateValid}{1947}{Works with limited validity. i.e. phone books, pharamceutical drug lists. Can be for example also the expiration of the copyright.}\\
1101 \Tag{otherDate}{1848, 1870-09-02}{Other relevant dates, which may be mentioned in a work or where the work has been used in a notable way}\\
1102 \Tag{edition}{3}{In cases of reprints, it specifies, which edition this had been taken from.}\\
1103 \end{longtable}
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113 \subsubsection{Physical Description}
1114 \label{LiUsMePh}
1115 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1116 Tag & & value examples & description\\
1117 \hline
1118 \Tag{formMedium}{book}{In what medium had this been published in. Book, leaflet, brochure, single page;}\\
1119 %\Tag{extent}{no clue}{Beschreibung}\\
1120 %\Tag{internetMediaType}{traditional}{Beschreibung}\\
1121 \Tag{\hspace*{-45pt}\hfill physicalDescriptionNote}{Original lost in fire}{Can be any useful information about the original copy.}\\
1122 \end{tabular}
1123
1124
1125 \subsubsection{Abstract}
1126 \label{LiUsMeAb}
1127 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1128 Tag & & value examples & description\\
1129 \hline
1130 \Tag{abstract}{This is a famous folksong, written down in 1843 by Hans Eicher. It gained popularity during the 1848 revolution and in the 1870/71 war.}{An abstract, if needed or wished.}\\
1131 \end{tabular}
1132
1133 \subsubsection{Table of Contents}
1134 \label{LiUsMeTa}
1135 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1136 Tag & & value examples & description\\
1137 \hline
1138 \Tag{tableOfContents}{%
1139 \begin{enumerate}
1140 \item Intro
1141 \item Sailor songs
1142 \item Hiking songs
1143 \item Drinking songs
1144 \item Hooligan songs
1145 \item Wedding songs
1146 \begin{enumerate}
1147 \item If the bride is beautiful
1148 \item If the bridesmaids are beautiful
1149 \end{enumerate}
1150 \item Again drinking songs
1151 \end{enumerate}
1152 }{The table of contents}\\
1153 \end{tabular}
1154
1155 \subsubsection{Instrumentation}
1156 \label{LiUsMeIn}
1157 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1158 Tag & & value examples & description\\
1159 \hline
1160 \Tag{instrumentation}{chamber orchestra}{A meaningful and well established value about the instrumentation of the piece.}\\
1161 \end{tabular}
1162
1163
1164 \subsubsection{Cartographics}
1165 \label{LiUsMeCa}
1166 This part is only for completeness. The original ressource, where this is from isn't available any more. Therefor a complete citation is not possible.
1167
1168 \begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1169 Tag & & value examples & description\\
1170 \hline
1171 \Tag{scale}{1:200000}{Scale is used to capture the ratio between actual size and a representation of size.}\\
1172 \Tag{projection}{Merkaartor}{Projection describes the method of representing the surface of a sphere or other shape on a plane.}\\
1173 \Tag{coordinates}{45.123,-30.543,48.321,-29.345}{The Coordinates element refers to the geographical coordinates of the bounding box covered by the resource.}\\
1174 \end{longtable}
1175
1176
1177 \subsubsection{Classification}
1178 \label{LiUsMeCl}
1179 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1180 Tag & & value examples & description\\
1181 \hline
1182 \Tag{\hspace*{-40pt}\hfill classificationSchema}{\LaTeX -Liederbuch-Schema}{Classification is used to document the class number for the resource, according to a standard scheme like RDA, MARC 21, LCC, LCSH or DDC.}\\
1183 \end{tabular}
1184
1185
1186
1187
1188
1189
1190 \subsubsection{Location Info}
1191 \label{LiUsMeLo}
1192 \begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
1193 Tag & & value examples & description\\
1194 \hline
1195 \Tag{url}{\url{https://de.wikisource.org/wiki/Allgemeines_Deutsches_Kommersbuch:122}}{The URL field contains a URL that can be used to access the resource.}\\
1196 \Tag{\hspace*{-40pt}\hfill bibliographicCitation}{Gaudeamus igitur; Allgemeines Deutsches Kommersbuch, Seite 270; Friedrich Silcher, Friedrich Erk; Moritz Schauenburg; 1858; Lahr}{The Bibliographic Citation field contains the bibliographic citation for the resource.}\\
1197 \Tag{shelfLocation}{3AC/F-K}{Shelf Location is used to record the shelf designation number for the resource.}\\
1198 \Tag{physicalLocation}{Heimatmuseum, Kudamm~31, Berlin; Building~3/A; 3.~Floor}{Physical Location refers to the institution or repository where the resource is held.}\\
1199 \end{tabular}
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210 %\subsubsection{?Access Condition}
1211 %\label{LiUsMeAc}
1212 %Access Condition is used to record information about restrictions on who may use the resource.
1213 %
1214 %Record Info
1215 %
1216 %The following fields can be used to capture information necessary for managing the meta data associated with the resource:
1217 %
1218 %
1219 %Record Content Source
1220 %
1221 %Record Content Source identifies the name of the organization/person who created the resource record.
1222 %
1223 %
1224 %Record Identifier
1225 %
1226 %The Record Identifier is used to record the identification number for the record.
1227 %
1228 %
1229 %Record Description Standard
1230 %
1231 %The Record Description Standard is used to identify the content standard to which the record conforms.
1232
1233 \newpage
1234 \subsection{How it works}
1235 \begin{itemize}
1236 \item[] \ref{LiHoBu} \nameref{LiHoBu}
1237 \item[] \ref{LiHoUs} \nameref{LiHoUs}
1238 \item[] \ref{LiHoTh} \nameref{LiHoTh}
1239 \end{itemize}
1240
1241 \subsubsection{Building a Songbook}
1242 \label{LiHoBu}
1243 The first part contains only a some constants. Currently only the \verb+\repeatleft+ and \verb+\repeatright+, which contain the repeat sign meant to be used in strophes:
1244 \begin{lstlisting}[numbers=none]
1245 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1246 %%% Special music characters %%%
1247 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1248
1249 [...]
1250
1251
1252 \end{lstlisting}
1253
1254 Handling of meta data:
1255 \begin{lstlisting}[numbers=none]
1256 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1257 %%% Handling of the meta data %%%
1258 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1259
1260 \def\GFM@LB@unpackage...
1261 \end{lstlisting}
1262 This command stores the meta data to command sequences. The meta data items can be given as an argument in the Lied environment. \verb+\GFM@LB@unpackage+ loops over the meta data argument of the \verb+Lied+- and \verb+Liederbuch+-environment. For every pair of variable name and value, \verb+\GFM@LB@unpackage+ creates a \LaTeX variable with the value content. Each meta data ist stored to a command sequence in the format:
1263 \begin{lstlisting}[numbers=none]
1264 \GFM@LB@lied@<songbook>@<song variant>@<song number>@<meta data name>
1265 \end{lstlisting}
1266 For the songbook ''Folksongs'', songnumber ''5'', variant ''choral'' and variable name ''composer'', the \LaTeX variable would look like this:
1267 \begin{lstlisting}[numbers=none]
1268 \GFM@LB@lied@Folksongs@choral@5@composer
1269 \end{lstlisting}
1270 It could expand to ''Frederic McCormick'' (assuming this is the composer). This mechanism is only internally relevant. To use this variable fine and easily, there is the \verb+\print{<variable name>}+ command (see farther down).
1271
1272 Since the equals sign is not available in the meta data, it is made available again with the \verb+\equals+ command, which just expands to an equals sign.
1273
1274 If a song has wrong meta data, an entry is missing or any other reason, you can edit specific meta data entries. The better option is to edit the song book. But if this may not be possible for whatever reason, you can use this command:
1275 \begin{lstlisting}[numbers=none]
1276 \tweakMetadata{<songbook>}{<song number>}{<variant>}{<meta data}
1277 \end{lstlisting}
1278
1279 One of the most important core parts of the package is the arrangement of syllables below the notes:
1280 \begin{lstlisting}[numbers=none]
1281 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1282 %%% Environment and commands for %%%
1283 %%% notes + lyrics in native LaTeX font %%%
1284 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1285 [...Constants...]
1286
1287 \def\songLyrics[<length> default = \linewdith]{
1288 [...]
1289 \def\nspace[*]{<some length or number>}
1290 \def\ns[*][<some length or number>]
1291 [...]
1292 }%
1293 \end{lstlisting}
1294 \verb+\songLyrics+ creates a \verb+\makebox[<length>]{notes}+ with two commands inside: \verb+\ns[*]+ and \verb+\nspace[*]+. \verb+\nspace[*]+ behaves exactly the same as \verb+\hspace[*]+ with the option for starred command, but unlike \verb+\hspace+ it also accepts no dimension unit. If no unit is given, it is translated to percent \verb+\linewidth+. \verb+\ns+ behaves like \verb+\hfill+ and is able to shift the next sillable by an optional offset. The star inserts a dash between the sillables. i.e. \verb+\ns*[-3]+ separates two sillables with a dash in between und shifts the second sillable \verb+0.03\linewidth+ to the left:
1295 \begin{lstlisting}[numbers=none]
1296 {See \ns here \ns the \ns be \ns* gin \ns* ning}
1297 \end{lstlisting}\vskip -8pt\relax
1298 \verb+ +\parbox{0.8\linewidth}{%
1299 \vskip -3pt\relax
1300 becomes
1301 \vskip 5pt\relax
1302 \fbox{\makebox[0.4\linewidth]{%
1303 See\hfill ~\hfill here\hfill ~\hfill the\hfill ~\hfill be\hfill -\hfill gin\hfill -\hfill ning%
1304 }%makebox
1305 }%fbox
1306 }%parbox
1307
1308 \verb+\notenzeile+ is a user command and combines the score image (notation) and the song lyrics. It takes two arguments. One graphic (the notes) and text below the notes. The text below simply calls \verb+\GFM@LB@songLyrics+. As there are songs, that have more than one strophe below the notes, up to 6 are optional. It is 6 times the same. To hold everything together, the whole \verb+\notenzeile+ is inside a minipage:
1309 \begin{lstlisting}[numbers=none]
1310 \notenzeile{O{\linewidth} m m O{\empty} O{\empty} O{\empty} O{\empty} O{\empty}}{%
1311 \end{lstlisting}
1312
1313 \begin{lstlisting}[numbers=none, breaklines=false]
1314 \multiline}{m m m O{\empty} O{\empty} O{\empty} O{\empty}}{%
1315 \end{lstlisting}
1316 \verb+\multiline+ can fit more than one line into one line. It is used, if only a part of a line has more than one text line. It is basically a few \verb+\makebox+es stacked above each other inside a parbox.
1317
1318 Force page break is a very usefull function and pretty simple. It defines a list of numbers, if the current stave line / strophe equals one of the numbers a page break is added:
1319 \begin{lstlisting}[numbers=none]
1320 \forcePageBreakAfterStaveLine{<number>}[<n.>][<n.>][<n.>][<n.>][<n.>]
1321 \end{lstlisting}
1322 \begin{lstlisting}[numbers=none]
1323 \forcePageBreakAfterStrophe{<number>}[<n.>][<n.>][<n.>][<n.>][<n.>]
1324 \end{lstlisting}
1325 Up to 6 page breaks within one song are possible. That should be enough as it is highly unlikely, that a song spans over more than 6 pages. If it does, please open an issue and show me. I'm highly interested.
1326
1327 Strophe is a simple environment that provides a numbering at the beginning based on a \verb+\stepcounter+. It groups mostly the spacing and holds the strophes together:
1328 \begin{lstlisting}[numbers=none]
1329 \begin{strophe}[<set strophe number to x>]
1330 This is the strophe text.
1331 Sing sing sing.
1332 Line breaks disappear.
1333 I want to create an option for that.
1334 \end{strophe}
1335 \end{lstlisting}
1336
1337 The spacing constists of set-commands, stored values and the use commands (no prefix/suffix):
1338 \begin{lstlisting}[numbers=none]
1339 %%%%%%%%%%%%%%%
1340 %%% Spacing %%%
1341 %%%%%%%%%%%%%%%
1342
1343 %%% Head
1344 \def\setSpaceBeforeHeadValue#1{\def\spaceBeforeHeadValue{#1}}
1345 \def\setSpaceAfterHeadValue#1{\def\spaceAfterHeadValue{#1}}
1346
1347 %%% Notes
1348 \def\setSpaceBeforeNotesValue#1{\def\spaceBeforeNotesValue{#1}}
1349 \def\setSpaceAfterNotesValue#1{\def\spaceAfterNotesValue{#1}}
1350
1351 %%% Strophes
1352 \def\setSpaceBeforeStropheValue#1{\def\spaceBeforeStropheValue{#1}}
1353 \def\setSpaceAfterStropheValue#1{\def\spaceAfterStropheValue{#1}}
1354
1355 %%% Song lyrics
1356 \def\setSpaceBeforeSongLyricsValue#1{\def\spaceBeforeSongLyricsValue{#1}}
1357 \def\setSpaceBetweenSongLyricsValue#1{\def\spaceBetweenSongLyricsValue{#1}}
1358 \def\setSpaceAfterSongLyricsValue#1{\def\spaceAfterSongLyricsValue{#1}}
1359
1360 %%% Foot
1361 \def\setSpaceBeforeFootValue#1{\def\spaceBeforeFootValue{#1}}
1362 \def\setSpaceAfterFootValue#1{\def\spaceAfterFootValue{#1}}
1363
1364 \end{lstlisting}
1365
1366 \begin{lstlisting}[numbers=none]
1367 %%% Horizontal spacing
1368 \def\setSpaceStropheIndentValue#1{\def\spaceStropheIndentValue{#1}}
1369 \def\setSpaceHeadIndentValue#1{\def\spaceHeadIndentValue{#1}}
1370 \def\setSpaceFootIndentValue#1{\def\spaceFootIndentValue{#1}}
1371 \end{lstlisting}
1372
1373 Convert the space values into skips:
1374 \begin{lstlisting}[numbers=none]
1375 %%% Arranging the space values
1376 \def\spaceBeforeHead{\vskip\spaceBeforeHeadValue\relax\noindent\mbox{}\hskip\spaceHeadIndentValue\mbox{}}
1377
1378 \def\spaceAfterHead{\relax\vskip\spaceAfterHeadValue\relax}
1379
1380 \def\spaceBeforeNotes{\relax\vskip\spaceBeforeNotesValue\relax}
1381
1382 [...rest works analogously...]
1383 \end{lstlisting}
1384
1385 \newpage
1386 These commands save the definition of the header and footer for each song. They also implicitly arrange the spacing in the header and footer:
1387 \begin{lstlisting}[numbers=none]
1388 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1389 %%% Styling of header and footer %%%
1390 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1391
1392 \newcommand{\LBHead}[1]{%
1393 \long\def\GFM@LB@Head{\spaceBeforeHead #1\relax\spaceAfterHead\mbox{}}%
1394 }%
1395
1396 \newcommand{\LBFoot}[1]{%
1397 \long\def\GFM@LB@Foot{\spaceBeforeFoot #1\relax\spaceAfterFoot}%
1398 }%
1399 \end{lstlisting}
1400
1401 \verb+Liederbuch+ and \verb+Lied+ are the environments that create the songbooks and store each song in a command sequence. Every song is stored this way in Latex:
1402 \begin{lstlisting}[numbers=none]
1403 \liedBody;<songbook>;<song variant>;<number>
1404 \end{lstlisting}\vskip -5pt\relax
1405 The \verb+Lied+ environment also stores each meta data value in an command sequence by calling the \verb+\GFM@LB@unpackage+ command:
1406 \begin{lstlisting}[numbers=none]
1407 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1408 %%% Environments for creating %%%
1409 %%% the songbooks (liederbuch) %%%
1410 %%% and the songs (lied) %%%
1411 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1412
1413 %Liederbuch environment
1414 \NewEnviron{liederbuch}[2][]{%
1415 \def\GFM@LB@LiederbuchNameTmp{#2}%
1416 %%Lied environment %cslet
1417 \NewEnviron{lied}[3][]{%
1418 %##1=meta data ##2=variant ##3=nummer
1419 \def\GFM@LB@LiederbuchVariantTmp{##2}%
1420 \def\GFM@LB@LiederbuchNumberTmp{##3}%
1421 \GFM@LB@unpackage{##1}%
1422 \GFM@LB@unpackage{#1}%
1423 \global\cslet{liedBody;\GFM@LB@LiederbuchNameTmp;##2;##3}\BODY%
1424 }%
1425 \BODY% Without this, the command sequences inside the environment won't be defined. That means, the whole content of the songbook (Liederbuch) is thrown away.
1426 }
1427 \end{lstlisting}
1428
1429
1430 \subsubsection{Using a Songbook}
1431 \label{LiHoUs}
1432 With the command
1433 \begin{lstlisting}[numbers=none]
1434 \usepackage{../path/to/songbook.sty}
1435 \end{lstlisting}
1436 you include a songbook. This automatically stores the content of the songs at loading time as described in the previous section. Now every song body is stored in a \LaTeX\ macro. Each meta data element is also stored in a \LaTeX\ macro. We need this later. When you call a song with the command:
1437 \begin{lstlisting}[numbers=none]
1438 \LBsong{<songbook name>}{<song number>}{<variant>}
1439 \end{lstlisting}
1440 i.e.
1441 \begin{lstlisting}[numbers=none]
1442 \LBsong{exampleSongs}{23}{nt}
1443 \end{lstlisting}
1444 It calls itself a series of macros:
1445 \begin{lstlisting}[numbers=none]
1446 %<setting some values>
1447 \NewDocumentCommand{\print}{O{\empty} m}{%
1448 [...]
1449 }%
1450 \GFM@LB@Head%
1451 %<setting some values>
1452 %%%%%%%%%%%%%%%%%%%%%%%%%%
1453 \csuse{liedBody;#2;#1;#3}%
1454 %=\liedBody;<songbook>;<song variant>;<number>
1455 %%%%%%%%%%%%%%%%%%%%%%%%%%
1456 %<setting some values>
1457 \GFM@LB@Foot
1458 \end{lstlisting}
1459 As you see, it basically puts together head, body and foot. \verb+\GFM@LB@Head+ and \verb+\GFM@LB@Foot+ only contain the format of the head and foot. Inside these commands, the parameters songbook, song variant and number are available, therefore the correct meta data, like the correct title, author, etc. is automatically selected, when the \verb+\print+ command is used (see the example on page \pageref{LiUsCrEx} and also \ref{LiHoTh} \nameref{LiHoTh} \vpageref{LiHoTh})
1460
1461 \newpage
1462 \subsubsection{Themes}
1463 \label{LiHoTh}
1464 For creating a theme, you can currently only define the style of the head and the foot of a song.
1465
1466 The principle is very simple. In
1467 \begin{lstlisting}[numbers=none]
1468 \LBHead
1469 \end{lstlisting}
1470 and
1471 \begin{lstlisting}[numbers=none]
1472 \LBFoot
1473 \end{lstlisting}
1474 a format for the head is defined and stored (with some spacing) into
1475 \begin{lstlisting}[numbers=none]
1476 \GFM@LB@Head
1477 \end{lstlisting}
1478 For the foot it is stored into
1479 \begin{lstlisting}[numbers=none]
1480 \GFM@LB@Foot
1481 \end{lstlisting}
1482
1483 Inside them the \verb+\print{<meta data name>}+ is used. It is not defined there and expanding it would result in an undefined-error. But it is defined inside \verb+\LBsong+, where \verb+\GFM@LB@Head+ and \verb+\GFM@LB@Foot+ are called. There it is expanded. Inside the \verb+\LBsong+ songbook, song variant and song number are available and put together to the command sequence, that expands to the correct meta data value (see section \ref{LiHoUs} \nameref{LiHoUs}). The rest of the head and foot definitions are usual \TeX commands.
1484
1485 For the future, there shall be a marker, if a song had been broken inside the notes or inside the strophas. Depending on the marker, background images can be selected. But this is only an idea yet.
1486
1487 \subsubsection{printliederbuch}
1488 The principle of this package is very simple. Before the songbook is loaded, the environments \verb+Liederbuch+ and \verb+Lied+ are redefined. The whole meta data is put into a table, the content of the songbooks is just put into a command sequence, which is called in the document.
1489
1490
1491 \chapter{Liederheft-Class}
1492 This is hardly finished yet. It shall be based on the koma-book class, provide a class itself, but I think, this is a bad idea anyway and I will ditch it. The plan exists, let's see, for how long.
1493
1494 \section{Basics}
1495 No text yet. Just guess it.
1496
1497 \section{What The Package Uses}
1498 \begin{itemize}
1499 \item scrbook\\
1500 This is the class, which the Liederheft is based on.
1501 \item[]
1502 \end{itemize}
1503
1504 \section{User Commands}
1505 Just read the manual. Oh, this is the manual. How unfortunate.
1506
1507 \section{How it works}
1508 Not at all yet. Maybe it never will.
1509
1510
1511
1512
1513
1514
1515 \chapter{Known bugs and problems}
1516 \section{Undefined control sequence $\backslash OT$}
1517 undefined control sequence \verb+\OT+ maybe caused by ß in meta data. A simple workaround is to use \verb+\def\OT#11{}+ in the preamble.
1518
1519 \section{Undefined control sequence $\backslash GFM@LB@songbook@123@nt@title$}
1520 This happens, if a song has no title specified in the metadata, but the listofsongs is used. Everything will still work and the error can be ignored. But the list of songs will not look like such a list is supposed to look like. You can use \verb+tweakMetaData+ to give this song a title. Or you can give it a title in the source. Alternatively you can deactivate the list of songs.
1521
1522 %\section{Undefined control sequence (general likely reason)}
1523 %Everything, that breaks in an edef, like \verb+\\+, breaks in the metadata. See also the next section \nameref{KnGl}.
1524
1525 %\section{glqq grqq}
1526 %\label{KnGl}
1527 %Since \verb+\glqq •\grqq+ are fragile now (I don't think, they used to be), they will break. To avoid breaking, a fix is applied. They are redefined in the preamble to
1528 %
1529 %\begin{lstlisting}[numbers=none]
1530 % \let\GFM@protect@glqq\glqq%
1531 % \def\glqq{\unexpanded{\glqq}}%
1532 %\end{lstlisting}
1533 %
1534 %and AtBeginDocument they are reverted:
1535 %
1536 %\begin{lstlisting}[numbers=none]
1537 % \AtBeginDocument{%
1538 % \let\glqq\GFM@protect@glqq%
1539 % }%
1540 %\end{lstlisting}
1541 %
1542 %This idea will be the idea of my (future) teleport package.
1543
1544 \section{Spacing}
1545 If there is used plus and/or minus in spacing, this (might) result in extra space. The origin is unknown yet.
1546
1547 \chapter{Bug reports}
1548 Nothing to say here. You can post any bug reports on bitbucket, if you find some:
1549 \begin{quote}
1550 \url{https://bitbucket.org/maestro-glanz/liederbuch-package/src/main/}
1551 \end{quote}
1552 If you don't have a bitbucket account and don't want to create one, you can post an email to \mbox{text\color{white}.\color{black}\hspace*{-7.5pt} inkerer.1904$@$gmail.com} and hope, that I read it within 3 month. Note:~Copying the mail address will fail. This is for spam precautions. You have to type it off your screen. This is a good memory exercise to keep your mind vital a flexible.
1553
1554
1555 \chapter{Revision History}
1556 \noindent
1557 \begin{tabular}{l l}
1558 2017-11-01:& v0.1.0\\
1559 2024-12-22:& v1.0.0\\
1560 2025-01-20:& v1.1.0
1561 \end{tabular}
1562
1563
1564 \end{document}
1565
1566
1567 \section{Milestones for Version 1.1.0}
1568
1569 \subsection{listOfSongs}
1570 %Create custom list listOfSongs
1571
1572 \listofsongs in printLiederbuch
1573
1574 % at the fifth style
1575
1576 % Fix grqqglqq - Check for now.
1577
1578 Fix upper-lower case
1579 Griechisch + Gr2
1580 %Fix unknown tags (lyricist, title, composer don't exist) -> No good fix available yet.
1581
1582
1583 \section{Milestones for Version 1.2.0}
1584 Backgrounds for songs. 4 divisions (fix, stretch, stretch, fix height).
1585 List may be expanded
1586
1587 TOC bei printliederbuch korrekt mit nummer, variant, title
1588
1589 Fix hyperref
1590 twolines style -> Postpone
1591 On read sollte das ausgeführt werden.
1592 so it points to the right position
1593
1594
1595 - multilines -> extra space after line x
1596
1597
1598 \sendListOfSongsToTOC[author/title/etc]{los/toc/etc.}[los/toc/etc]{%
1599 \GFM@LB@listOfSongsTOCa{}
1600 \GFM@LB@listOfSongsTOCb{}
1601 \GFM@LB@listOfSongsTOCc{}
1602 }%
1603
1604 \subsection{verse command}
1605
1606
1607
1608 \section{Before upload}
1609 Is the license in
1610 - the sty- and tex-files?
1611 - readme?
1612
1613 Is the author name in
1614 - the sty- and tex-files?
1615 - readme?
1616
1617 Is the version number in
1618 - the docu text? first page?
1619 - the sty- and tex-files (+provides package param)?
1620 - readme?
1621
1622 Is the correct revision date in
1623 - the docu text?
1624 - the sty- and tex-files?
1625 - readme?
1626
1627 Is the repo link in
1628 - the docu text?
1629 - the sty- and tex-files? -> no
1630 - readme? -> no
1631
1632
1633 \section{Milestones for Version 1.2}
1634
1635 \subsection{3 Standard designs}
1636 %\useLiederbuchStyle{}
1637
1638 %\useLiederbuchColor{}
1639 analog to moderncv
1640
1641 Style mit \print[\GFM@LB@composer]{Mozart} -> Babel-kompatibel
1642
1643 \chapter*{Todo}
1644
1645 Fix relative paths. Reference to the containing package.
1646
1647 IfBoolean instead of ifx for stared command in DeclareDocumentCommand
1648
1649 integrate /@car and /@cdr
1650
1651 /extraSpaceBeforeStrophe{Strophennummer}{pt}
1652
1653 meta data: what breaks in an edef, is only possible with a triple unexpanded.
1654
1655
1656 \section{Compability improvement with different fonts and languages}
1657 I have plans here. But nothing too specific yet.
1658