<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                   %
%      Made by Gabriel Ruprecht     %
%                                   %
% This work is published under the  %
% LaTeX project public license 1.3  %
%                                   %
%       Package version 1.1.0       %
%            2025-01-20             %
%                                   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt,a4paper]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage[dvipsnames]{xcolor}
\usepackage{multicol}
\usepackage{tipa}
\usepackage{tikz}
\usepackage{longtable}
\usepackage[parfill]{parskip} 	% no indendation, though proper paragraph spacing
\usepackage{varioref}
\usepackage[hidelinks,colorlinks=false,bookmarks=false,
  pdftitle={The Liederbuch-Package},
  pdfsubject={LaTeX},
  pdfkeywords={music,score,scores,notation,notes},
  pdfauthor={Gabriel Ruprecht},
  urlcolor=blue,
  pdfstartview=Fit
  ]{hyperref}
\usepackage{listings}
\lstset
{ %Formatting for code in appendix
    language=TeX,
    numbers=left,
    stepnumber=1,
    showstringspaces=false,
    tabsize=1,
    breaklines=true,
    breakatwhitespace=false,
    basicstyle=\ttfamily}
%\DeclareUnicodeCharacter{017F}{s}

\begin{document}
{
\def\vfill{\vskip 0pt plus 300pt minus 30pt \relax}
\begin{center}
\pagenumbering{gobble}
\mbox{}\vskip 50pt\relax
\textsf{\textbf{\huge The Liederbuch-Package}}
\vskip 12pt \relax
\textipa{\textbf{\large[D@ li:d\textturna bu:x-p\ae kIdZ]}}
\vfill\mbox{}
\vfill\mbox{}
{\Large Gabriel Ruprecht}
\vfill\mbox{}
\normalsize{created with a lot of help from \LaTeX .SX and the German lilypond-forum}
\vfill\mbox{}
\vfill\mbox{}
{\Large \today}
\vfill\mbox{}
\vfill\mbox{}
\vfill\mbox{}
\fbox{\includegraphics[height=0.42\paperheight , page=1]{liederbuch-demo-project/liederbuch-demo-project}}
\vskip 40pt\relax
Version 1.1.0
\mbox{}\vskip -80pt\relax
\mbox{}
\end{center}
\newpage
\pagenumbering{arabic}
\setcounter{page}{2}
}



%Å¿Å¿Å¿

\tableofcontents


\chapter{Introduction}
\label{Introduction}
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.

%\newpage
The sample on the title page uses just the following commands:
\begin{lstlisting}[breaklines,numbers=left]
\documentclass[a5paper, 11pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{scrlayer-scrpage}

\usepackage{TestLiederbuch}


\LBHead{%
{\Large \textbf{\print{title}}}\hfill\mbox{}\vspace*{5pt}\\
\makebox[32pt]{Musik:\hfill} \print{composer} \\\makebox[32pt]{Text:\hfill} \print{lyricist}\vspace*{3pt}

}
\LBFoot{Herausgabedatum: \print{date}\hfill\mbox{}}

\setSpaceBeforeStropheValue{15pt plus 5pt}
\setSpaceAfterStropheValue{0pt plus 5pt}
\setSpaceBeforeHeadValue{15pt plus 10pt minus 5pt}
\setSpaceBeforeFootValue{15pt plus 10pt minus 5pt}

\begin{document}

\LBsong{TestLiederbuch}{1}{nt}

\end{document}
\end{lstlisting}

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.

%\newlength\tempheight
%\tempheight=\textheight
%\textheight=1.05\textheight
%\newpage
%\textheight=\tempheight

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:
\begin{lstlisting}[breaklines,numbers=left]
\ProvidesPackage{TestLiederbuch}
\RequirePackage{liederbuch}

\begin{liederbuch}[
titleOfLargerWork = Test-Liederbuch &amp;
date = 2017 &amp;
seriesTitle = Demoprojekt
]{TestLiederbuch}

\begin{lied}[title=HÃ¤nschen klein &amp; lyricist=Volkslied \&amp; Ã¼berliefert &amp; composer = Volkslied]{nt}{1}
{%
\notenzeile{\includegraphics[width=\linewidth,page=1]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
{\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}}
\notenzeile{\includegraphics[width=\linewidth,page=2]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
{\nspace{12pt} Welt \ns hin \ns* ein. \ns \ns Stock \ns und \ns Hut \ns steht \ns ihm \ns gut, \nspace{5}}
\notenzeile{\includegraphics[width=\linewidth,page=3]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
{\nspace{6} ist \ns gar \ns wohl \ns* ge \ns* mut. \nspace{5} Ab \ns* er \ns Mut \ns* ter \nspace{3} }
\notenzeile{\includegraphics[width=\linewidth,page=4]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
{\nspace{4} wein \ns* et \ns sehr, \ns hat \ns ja \ns wohl \ns kein \ns HÃ¤ns \ns* chen \ns mehr. \nspace{2} }
\notenzeile{\includegraphics[width=\linewidth,page=5]{./TestLiederbuchSnippets/haenschenKlein.pdf}}%
{\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} }
}
\end{Lied}

\end{liederbuch}
\end{lstlisting}


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.


\chapter{General information}
\section{Terminology}
The following list is for understanding the structure of the commands.
\begin{enumerate}
\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.
\item \emph{Lied/Lieder} is German and translates to song/songs.
\item \emph{Buch} translates to book
\item \emph{Heft} translates to notebook, booklet
\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.
\item \emph{Liederbuch} translates to songbook also. But it describes the songbook, you copied the songs for the  i.e. wedding from.
\item \emph{Note(n)} means note(s) as in music.
\item \emph{Zeile} means line as in text line.
\item All the internal Commands follow the same rule of \\\verb+\GFM@CurrentPackageAbbreviation@CommandName+
\end{enumerate}




%\newpage
\section{The Different Parts of the Liederbuch-Package}
The following subsections are short descriptions of the packages. The full description is provided in each corresponding chapter.
\subsection{Liederbuch} 
This (main) package provides commands and environments to create songbooks which can be used elsewhere. The features are:
\begin{itemize}
\item the font of the lyrics appear in the current \LaTeX -font (can be overridden in the songbooks)
\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.
\item use predefined head and foot styles for the songs or create your own styles.
\item use meta data in the headers and footers. i.e. song title, composer, copyright, etc.
\end{itemize}
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.


\subsection{Liederheft - unfinished, better do not use yet}
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.


\subsection{Print Liederbuch}
This allows you to list all content of a songbook (liederbuch), you created. It is much more comfortable than looking at the source code.


\chapter{Liederbuch-Package}
This package provides the commands to create the songbooks, aka databases, where you choose the songs from. 


\section{Basics}
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:
\begin{lstlisting}[numbers=none]
    \setSpaceBeforeHead{30pt plus 1fil minus 2pt}
\end{lstlisting}
About the songtext and its alignment, we get into detail later.

\begin{figure}
\hskip 0pt plus 3pt minus 3pt\begin{tikzpicture}
\tikzset{inner sep=0pt, outer sep= 0pt}

%\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.}}};
%Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem.}};


%\draw [dotted,thin] (\textwidth,0) -- (\textwidth,-19);
%\draw [dotted,thin] (0,0) -- (0,-19);

\draw [dashed,very thick] (0,1.5) -- (\textwidth,1.5);
\draw [very thick] (0,1.5) -- (0,0) -- (\textwidth,0) -- (\textwidth,1.5);
\node at (0.5\textwidth, 0.75){\verb+some running text+};


\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeHead+};

\tikzset{shift={(0,-0.6)}}

\draw [very thick] (0,0) rectangle (\textwidth,0.6);
\node at (0.5\textwidth, 0.3){\verb+head+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterHead+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeNotes+};

\tikzset{shift={(0,-0.6)}}

\draw [very thick] (0,0) rectangle (\textwidth,0.6);
\node at (0.5\textwidth, 0.3){\verb+notes+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterNotes+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeSongLyrics+};

\tikzset{shift={(0,0)}}

\draw [very thick] (0,0) rectangle (\textwidth,-2.5);
\node at (0.5\textwidth, -0.5){\verb+songtext below notes+};

\draw [&lt;-&gt;, very thick] (0,-2) -- (2, -2);
\node at (1, -1.5){\verb+\nspace+};

\node at (2.5, -2){\verb+word+};

\draw [&lt;-&gt;, very thick] (3,-2) -- (5, -2);
\node at (4, -1.5){\verb+\ns+};

\node at (5.5, -2){\verb+word+};

\draw [&lt;-&gt;, very thick] (6,-2) -- (8, -2);
\node at (7, -1.5){\verb+\ns+};

\node at (9, -2){\verb+syllable+};

\draw [&lt;-&gt;, very thick] (10,-2) -- (10.8, -2);
\node at (11, -1.2){\verb+\ns*+};

\draw [thick](10,-1.85) [out=90, in= -90] to (11,-1.5) [out=-90, in= 90] to (12, -1.85); 
\node at (11, -2){\verb+-+};

\draw [&lt;-&gt;, very thick] (11.2,-2) -- (12, -2);

\node at (13, -2){\verb+syllable+};

\draw [&lt;-&gt;, very thick] (14,-2) -- (15.75, -2);
\node at (14.875, -1.5){\verb+\nspace+};

\tikzset{shift={(0,-3.5)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterSongLyrics+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeNotes+};

\tikzset{shift={(0,-0.6)}}

\draw [very thick] (0,0) rectangle (\textwidth,0.6);
\node at (0.5\textwidth, 0.3){\verb+notes+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterNotes+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeSongLyrics+};

\tikzset{shift={(0,-1.5)}}

\draw [very thick] (0,0) rectangle (\textwidth,1.5);
\node at (0.5\textwidth, 1.0){\verb+songtext below notes+};
\node at (0.5\textwidth, 0.4){\verb+like  above+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterSongLyrics+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceBeforeFoot+};

\tikzset{shift={(0,-0.6)}}

\draw [very thick] (0,0) rectangle (\textwidth,0.6);
\node at (0.5\textwidth, 0.3){\verb+foot+};

\tikzset{shift={(0,-1)}}

\draw [&lt;-&gt;, very thick] (0.35\textwidth, 0) -- (0.35\textwidth, 1);
\node [right] at (0.37\textwidth, 0.5){\verb+\spaceAfterFoot+};

\tikzset{shift={(0,-1.5)}}

%\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.}}};
%Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.}};
%Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus sem.}};

\draw [dashed,very thick] (0,0) -- (\textwidth,0);
\draw [very thick] (0,0) -- (0,1.5) -- (\textwidth,1.5) -- (\textwidth,0);
\node at (0.5\textwidth, 0.75){\verb+some running text+};

\end{tikzpicture}\hskip 0pt plus 3pt minus 3pt
\vskip 10pt plus 10pt minus 10pt
\caption{layout and spacing of a page with several musical lines\hskip 0pt plus 1filll\mbox{}}
\label{abb:LiBa1}
\vskip -14pt
\end{figure}

%%In \varioref{}
%
%\begin{figure}
%\begin{tikzpicture}
%\draw [very thick] (0,0) -- (0,1) -- (\textwidth,1) -- (\textwidth,0);
%\node at (0.5\textwidth, 0.5){music staff with notes, loaded from image};
%
%\tikzset{shift={(0,-1.5)}}
%
%\draw [very thick] (0,0) rectangle (\textwidth,1.5);
%
%\draw [&lt;-&gt;, very thick] (0.0\textwidth, 0.5) -- (0.2\textwidth, 0.5);
%\node at (0.1\textwidth, 1){\verb+\nspace{x pt}+};
%
%\draw [very thick] (0.2\textwidth,0.25) rectangle (0.3\textwidth,0.75);
%\node at (0.25\textwidth, 0.5){Word};
%
%\draw [&lt;-&gt;, very thick] (0.3\textwidth, 0.5) -- (0.4\textwidth, 0.5);
%\node at (0.35\textwidth, 1){\verb+\ns+};
%
%\draw [very thick] (0.4\textwidth,0.25) rectangle (0.45\textwidth,0.75);
%\node at (0.425\textwidth, 0.5){Syl};
%
%\draw [&lt;-, very thick] (0.45\textwidth, 0.5) -- (0.49\textwidth, 0.5);
%\node at (0.5\textwidth, 1){\verb+\ns*+};
%\draw [very thick] (0.49\textwidth, 0.35) rectangle (0.51\textwidth, 0.65);
%\node at (0.5\textwidth, 0.5){-};
%\draw [-&gt;, very thick] (0.51\textwidth, 0.5) -- (0.55\textwidth, 0.5);
%
%
%\draw [very thick] (0.55\textwidth,0.25) rectangle (0.6\textwidth,0.75);
%\node at (0.575\textwidth, 0.5){la};
%
%\draw [&lt;-, very thick] (0.6\textwidth, 0.5) -- (0.64\textwidth, 0.5);
%\node at (0.65\textwidth, 1){\verb+\ns*+};
%\draw [very thick] (0.64\textwidth, 0.35) rectangle (0.66\textwidth, 0.65);
%\node at (0.65\textwidth, 0.5){-};
%\draw [-&gt;, very thick] (0.66\textwidth, 0.5) -- (0.7\textwidth, 0.5);
%
%
%\draw [very thick] (0.7\textwidth,0.25) rectangle (0.75\textwidth,0.75);
%\node at (0.725\textwidth, 0.5){bies};
%
%\draw [&lt;-&gt;, very thick] (0.75\textwidth, 0.5) -- (1.0\textwidth, 0.5);
%\node at (0.875\textwidth, 1){\verb+\nspace{y pt}+};
%
%
%\end{tikzpicture}
%\caption{layout and spacing of one musical line $\backslash$notezeile\{notes\}\{text\}\hskip 0pt plus 1filll\mbox{}}
%\label{abb:LiBa}
%\end{figure}

%\LBsong{Test}{1}{nt}

\section{What the packages uses}
The package makes use of the following packages. This is just for your information and has almost no practical use. It is mostly internals:
\begin{itemize}
\item xparse\\
Used for commands with more than one optional arguments and use of the * for multiple variants for commands.
\item graphicx\\
Not explicitely necessary, but necessary in most cases. Includes the note-snippets.
\item etoolbox\\
Used for creating command sequences
\item environ\\
Used for creating the Environments for the Liederbuch-package
\item pgfmath\\
Needed for using length in relation to the linewidth. If you do not use any unit for \verb+\nspace{&lt;some value&gt;}+, 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.
\end{itemize}

\section{User Commands}

\subsection{Building a Songbook}
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.

If you create and package a songbook, it should follow certain rules concerning the folder structure:
\begin{lstlisting}[numbers=none]
A new folder for all the content:
./this_is_an_example

And in this folder the sty-file and pdf-snippets (or png-graphics for example):
./this_is_an_example/this_is_an_example_songbook.sty
./this_is_an_example/01_song_snippet.ly
./this_is_an_example/01_song_snippet.pdf
./this_is_an_example/02_another_song_snippet.ly
./this_is_an_example/02_another_song_snippet.pdf
./this_is_an_example/03_summertime_(gershwin).ly
./this_is_an_example/03_summertime_(gershwin).pdf
./this_is_an_example/04_On_the_Road_Again_Version-A.ly
./this_is_an_example/04_On_the_Road_Again_Version-A.pdf
./this_is_an_example/04_On_the_Road_Again_Version-B.ly
./this_is_an_example/04_On_the_Road_Again_Version-B.pdf
\end{lstlisting}

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:
\begin{lstlisting}
    \ProvidesPackage{name of the songbook}
    \RequirePackage{liederbuch}
\end{lstlisting}
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.

To start a songbook, you must first write these lines:
\begin{lstlisting}[numbers=left,firstnumber=5]
    \begin{liederbuch}[&lt;meta data&gt;]{&lt;name of the songbook&gt;}
        % the songs (Lieder-environments) go here
        [...]
        [...]
\end{lstlisting}\vskip -13pt\relax
\begin{lstlisting}[numbers=left,firstnumber=78]
        [...]
    \end{liederbuch}
\end{lstlisting}
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:
\begin{lstlisting}[numbers=left,firstnumber=14]
    \begin{lied}[&lt;meta data&gt;]{&lt;variant&gt;}{&lt;song number&gt;}
        &lt;the song content&gt;
    \end{lied}
\end{lstlisting}
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.

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.


\noindent\rule{\textwidth}{1pt}

{\Large \textbf{Example}}

\noindent Assuming you have the following songbook created:
\begin{lstlisting}[numbers=left,firstnumber=30]
    \begin{liederbuch}{testSongbook}
    \begin{lied}[%
        meta data=this is just a test &amp;%
        otherData = it really is]%
    {var1}{144000}
    No notes and text yet.
    \end{lied}
    \end{liederbuch}
\end{lstlisting}
If you call the song with
\begin{lstlisting}[numbers=left,firstnumber=72]
    \LBsong{testSongbook}{144000}{var1}
\end{lstlisting}
the ouput will be
\begin{lstlisting}[numbers=none]
    No notes and text yet.
\end{lstlisting}
The meta data elements are not used yet, but can be used later.\vspace*{-2ex}

\noindent\rule{\textwidth}{1pt}

The output should be an actual song of course. To typeset these, there are several commands inside(!) the Lied-environment available.\vspace*{-30pt}

\newpage
\noindent\rule{\textwidth}{1pt}

{\Large \textbf{Extended example}}

You start of course with the Liederbuch environment first:
\begin{lstlisting}[firstnumber=7]
    \begin{liederbuch}[%
        songbook=Old Irish Folk Songs &amp;%
        author = Travis O'Connor
    ]
    
    \begin{lied}[
        title = What shall we do with a drunken saylor &amp;
        composer = Traditional &amp;
        lyricist = Probably a drunken saylor
    ]{nt}{23}
        %The notenzeile command goes here
    \end{lied}
    
    \begin{lied}[
        title = My lad got beaten up in the pub &amp;
        composer = Johnny O'Neeye %
        lyricist = Jimmy Jailedup
    ]{nt}{24}
        %The notenzeile commands goes here
    \end{lied}
    
    \end{liederbuch}
\end{lstlisting}

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:
\begin{lstlisting}[firstnumber=15]
    \notenzeile[linewidth of the line | default:\linewidth]
    {the part with the notes from the score}%
    {the text of strophe 1}%
    [the text of strophe 2]%
    [the text of strophe 3]%
    [the text of strophe 4]%
    [the text of strophe 5]%
    [the text of strophe 6]%
    \notenzeile{\includegraphics[width=\linewidth,page=2]{somePath}}%
    {\nspace{5} This \ns is \ns the \ns line \ns two \nspace{3}}
    \notenzeile{\includegraphics[width=\linewidth,page=3]{somePath}}%
    {\nspace{3em} and \ns three \ns of \ns the \ns do \ns* cu \ns* ment \ns of do cu ments\nspace{7pt}}
\end{lstlisting}

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.

Inside of the notenzeile command, there are several commands available:
\begin{lstlisting}[numbers=none]
    \songLyrics{}
    % This in an internal command, but you can use it.  It creates a makebox, with the \ns, \ns* and \nspace commands available inside.
    
    \ns[space correction]
    % 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.
    
    \ns*[space correction]
    % It is exactly like \ns, but it adds a dash in between. It is meant to divide syllables of one word.
    
    \nspace{length}
    % 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.
    
    \multiline{0.5\linewidth}{text for strophe 1}{text for str 2}[str. 3][4][5][6]
    % 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.
\end{lstlisting}

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.

These text blocks are built by the strophe environment:
\begin{lstlisting}[numbers=none]
    \begin{strophe}[strophe number]
        Some text in any format.
    \end{strophe}
\end{lstlisting}
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.

\subsection{Using a Songbook}
\label{LiUsUs}
Using a songbook is pretty easy. You must include the songbooks with
\begin{lstlisting}[numbers=none]
    \usepackage{nameOfSongbook}
\end{lstlisting}

and call the desired song with
\begin{lstlisting}[numbers=none]
    \LBsong{songbook}{number}{variant}
\end{lstlisting}
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.

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.
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).

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 
\begin{lstlisting}[numbers=none]
    \tweakMetaData{songbook}{song number}{song variant}{meta data element}
\end{lstlisting}
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+.

%\vskip 20pt plus 20pt\relax
%\newpage
\subsection{List of Songs (toc)}
You can create a list of songs with 
\begin{lstlisting}[numbers=none]
    \listofsongs
\end{lstlisting}

\newpage
It has by standard the same format as \verb+\listoffigures+. The style can be selected by using
\begin{lstlisting}[numbers=none]
    \listofsongsstyle{&lt;style&gt;}
\end{lstlisting}

The available styles are:
\begin{itemize}
\item ''simple'' (default)\\
\verb+&lt;song title&gt; ...[...]...  &lt;page number&gt;+
\item ''simple with number''\\
\verb+&lt;song number in the songbook&gt;   &lt;song title&gt; ...[...]...  &lt;page number&gt;+
\item ''simple with document number''\\
\verb+&lt;song number in the document&gt;   &lt;song title&gt; ...[...]...  &lt;page number&gt;+
\item ''twolines''
\item ''semitwolines''
\end{itemize}

The first three work. The other two don't work yet.


\subsection{Refs, References and Hyperref}
Hyperref is supported and should work out of the box, if loaded. Each song can be referenced by 
\begin{lstlisting}[numbers=none]
    \pageref{LB_lied_&lt;songbook&gt;_&lt;song number&gt;_&lt;variant&gt;}
\end{lstlisting}

If you include a song more than once, each duplicate must have a suffix (a for first duplicate, b for second, c for third,...):
\begin{lstlisting}[numbers=none]
    \pageref{LB_lied_&lt;songbook&gt;_&lt;song number&gt;_&lt;variant&gt;_&lt;letter&gt;}
\end{lstlisting}
Note: The first occurence has no letter suffix, the second occurence start with suffix ''\_a''.

\subsection{Babel}
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:
\begin{itemize}
\item[] \verb+\listofsongsname+
\item[] \verb+\LBsongComposer+
\item[] \verb+\LBsongLyricist+
\item[] \verb+\LBsongEditor+
\item[] \verb+\LBsongYear+
\item[] \verb+\LBsongCopyright+
\item[] \verb+\LBsongEditorialOffice+
\item[] \verb+\LBsongEditon+
\item[] \verb+\LBsongPrint+
\end{itemize}
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

The supported languages are:
\begin{multicols}{3}
acadian\\
afrikaans\\
albanian\\
american\\
australian\\
austrian\\
bahasa\\
bahasai\\
bahasam\\
basque\\
brazil\\
brazilian\\
breton\\
british\\
bulgarian\\
canadian\\
canadien\\
catalan\\
croatian\\
czech\\
danish\\
dutch\\
english\\
esperanto\\
estonian\\
finnish\\
francais\\
french\\
frenchb\\
galician\\
german\\
germanb\\
greek\\
hebrew\\
hungarian\\
icelandic\\
indon\\
indonesian\\
interlingua\\
irish\\
italian\\
latin\\
lowersorbian\\
magyar\\
malay\\
meyalu\\
naustrian\\
newzealand\\
ngerman\\
norsk\\
nynorsk\\
polish\\
polutonikogreek\\
portuges\\
portuguese\\
romanian\\
russian\\
samin\\
scottish\\
serbian\\
slovak\\
slovene\\
spanish\\
swedish\\
turkish\\
ukrainian\\
uppersorbian\\
welsh\\
UKenglish\\
USenglish
\end{multicols}

\newpage
\subsection{Creating a Theme}
\label{LpUcCa}
The appearance of the songs consist mainly of three things:
\begin{itemize}
\item Header
\item Footer
\item Spacing
\end{itemize}
Changing the background of the songs isn't supported yet and might never be.

The header and footer can be edited via
\begin{lstlisting}[numbers=none]
    \LBHead{Definition}
\end{lstlisting}
and
\begin{lstlisting}[numbers=none]
    \LBFoot{Definition}
\end{lstlisting}

Here you can use the meta data-values given in the song. As you might remember, the songs are defined as i.e.

\begin{lstlisting}
    \begin{liederbuch}[
        titleOfLargerWork = Test-Liederbuch &amp;
        date = 2017 &amp;
        seriesTitle = Demoprojekt
    ]{TestLiederbuch}
    
    \begin{lied}[
        title=HÃ¤nschen klein &amp;
        lyricist=Volkslied \&amp; Ãœberliefert &amp;
        composer = Volkslied
    ]{nt}{1}
        ... something ...
    \end{lied}
    \end{liederbuch}
\end{lstlisting}

An example header and footer would look like this:
\label{LiUsCrEx}
\begin{lstlisting}
    \LBHead{\Large\print{title}\\
    \normalsize Taken from \print{titleOfLargerWork}\hspace{30pt}\print{composer}}
    
    \LBFoot{\print{date}\hfill\print{seriesTitle}}
\end{lstlisting}

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}.

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:
\begin{lstlisting}[numbers=none]
    \setSpaceBeforeHeadValue{3pt plus 0pt minus 1.5pt}
    \setSpaceAfterHeadValue{-1pt plus 4pt}
    \setSpaceBeforeNotesValue{2pt minus 1pt}
    \setSpaceAfterNotesValue{4pt}
    \setSpaceBeforeStropheValue{3em plus 1pt minus 0.2in}
    \setSpaceAfterStropheValue{0pt}
    \setSpaceBeforeSongLyricsValue{0pt}
    \setSpaceAfterSongLyricsValue{0pt}
    \setSpaceBeforeFootValue{0pt}
    \setSpaceAfterFootValue{0pt}
\end{lstlisting}

\subsection{Using printliederbuch}
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:
\begin{lstlisting}
    \documentclass[a5paper, 11pt]{scrartcl}
    \usepackage[ngerman]{babel}
    \usepackage[utf8]{inputenc}
    \usepackage{printliederbuch}
    \usepackage{TestLiederbuch}
    \usepackage{AnotherTestLiederbuch}
    
    \begin{document}
    
    \tableofcontents
    
    \printLiederbuch{TestLB}
    \printLiederbuch{AnotherTestLB}
    
    \listofsongs
    
    \end{document}
\end{lstlisting}
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}+.

Currently, the table of contents only shows the song number and the variant, while the list of songs show the name only.

%\newpage
\subsection{Tips and Tricks}
\subsubsection{First the outer spacing, then the syllable spacing}
Start by doing the outer spacing first. If these are your lyrics
\begin{lstlisting}[numbers=none]
    {HÃ¤nschen klein ging allein in die weite}
\end{lstlisting}
you start by adding the outer space and separating all syllables
\begin{lstlisting}[numbers=none]
    {\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}}
\end{lstlisting}
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.

\subsubsection{Replacing $\backslash ns*$ with $\backslash ns - \backslash ns$}
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).

\subsubsection{Double $\backslash ns$ and $\backslash nspace\{ x\}$}
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.

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.:
\begin{lstlisting}
\nspace{7} HÃ¤ns \ns* chen\ns klein \nspace{2}\ns ist \ns weg, \ns \ns Kro \ns* ko \ns* dil \nspace{4}
\end{lstlisting}
This example is complete fictional and doesn't occur in any real song. 

\newpage
\includegraphics[width=\linewidth,page=1]{liederbuch-demo-project/TestLiederbuchSnippets/haenschenKlein}

gets this song text:
\begin{lstlisting}[numbers=none]
\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}
\end{lstlisting}
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.

\subsubsection{Omitting a space here and there}
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.

\subsubsection{Hard spaces (\char`~ ) for short syllables}
In die following example

\includegraphics[width=\linewidth,page=3]{liederbuch-demo-project/TestLiederbuchSnippets/haenschenKlein}
the text is like this:
\begin{lstlisting}[numbers=none]
\nspace{6} ist \ns gar \ns wohl \ns* ge\ns -\ns mut. \nspace{6} Ab \ns* er~ \ns Mut \ns* ter \nspace{3.5}
\end{lstlisting}
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.

\newpage
\subsection{Meta Data}
\label{LiUsMe}

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.

\vskip 15pt\relax
%\newpage

\textbf{Subsections:}\vspace{10pt}\\
\hspace*{40pt}%
\parbox{0.8\linewidth}{%
\begin{multicols}{2}%
{%
\setcounter{secnumdepth}{3}%
\begin{itemize}
\item[\ref{LiUsMeTi}] \nameref{LiUsMeTi}
\item[\ref{LiUsMeNa}] \nameref{LiUsMeNa}
\item[\ref{LiUsMeSu}] \nameref{LiUsMeSu}
\item[\ref{LiUsMeId}] \nameref{LiUsMeId}
\item[\ref{LiUsMeRe}] \nameref{LiUsMeRe}
\item[\ref{LiUsMeNotedescription}] \nameref{LiUsMeNotedescription}
\item[\ref{LiUsMeDa}] \nameref{LiUsMeDa}
\item[\ref{LiUsMeLa}] \nameref{LiUsMeLa}
\item[\ref{LiUsMeTy}] \nameref{LiUsMeTy}
\item[\ref{LiUsMeOr}] \nameref{LiUsMeOr}
\item[\ref{LiUsMePh}] \nameref{LiUsMePh}
\item[\ref{LiUsMeAb}] \nameref{LiUsMeAb}
\item[\ref{LiUsMeTa}] \nameref{LiUsMeTa}
\item[\ref{LiUsMeIn}] \nameref{LiUsMeIn}
\item[\ref{LiUsMeCa}] \nameref{LiUsMeCa}
\item[\ref{LiUsMeCl}] \nameref{LiUsMeCl}
\item[\ref{LiUsMeLo}] \nameref{LiUsMeLo}
\end{itemize}%
}%
\end{multicols}
}%parbox

\newpage
\subsubsection{Titles}
\label{LiUsMeTi}
\newcommand*\Tag[3]{{\ttfamily #1} &amp; {\ttfamily =} &amp; {\ttfamily #2} &amp; #3}

Each resource should have at least one title element associated with it. The following fields can be used to describe titles:

\renewcommand{\arraystretch}{1.5}

\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\Tag{title}{Gaudeamus igitur}{A word or phrase that names the resource being described.}\\
\Tag{subtitle}{iuvenes dum sumus}{Secondary word or phrase that names the resource being described.}\\
\Tag{alternativeTitle}{De brevitate vitae}{The "alternative title" data is used for other titles not covered elsewhere in the meta data record.}\\
\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.}\\
\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.}\\
\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.}\\
\Tag{seriesTitle}{German student song books}{The "series title" data is used to record a named series to which the item being cataloged belongs.}\\
\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.}\\
\end{tabular}

\newpage
\subsubsection{Names}
\label{LiUsMeNa}
\begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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.}\\
\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.}\\
\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.}\\
\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.}\\
\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.}\\
\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.}\\
\Tag{engraver}{Gabriel Ruprecht}{The person or organisation, who engraved the sheet music. Commonly with the help of a program like lilypond.}\\
\Tag{lithographer}{Heidenhain 600}{The person or company producing the printing plates of the sheet music, if deviating from "publisherName".}\\
\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"}\\
\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"}\\
\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.}\\
\end{longtable}

\newpage
\subsubsection{Subject}
\label{LiUsMeSu}
\begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\Tag{topicalSubject}{Drinking beer}{In a song with lyrics "Topical Subject" is used to record what topics occur in the song's lyrics.}\\
\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.}\\
\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.}\\
\Tag{temporalSubject}{Romantic period}{The "Temporal Subject" meta data is used to record a named time period relevant to the item being cataloged.}\\
\Tag{instrumentation}{Vocal}{A listing of the performing forces called for by a particular piece of sheet music, including both voices and external instruments.}\\
\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.}\\
\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.}\\
\Tag{localSubject}{University}{"Local Subject" is used to record subject terms meaningful to the holding institution.}\\
\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.}\\
\end{longtable}


%
%    Subject/Topic
%        In a song with lyrics, Subject/Topic is used to record what topics occur in the song's lyrics.
%    Temporal Coverage
%        The Temporal Coverage meta data is used to record a named time period relevant to the item being cataloged.
%    Geographical Coverage
%        The Geographical Coverage element is used for general terms that describe geographical coverage.
%    Geographic Code
%        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.
%    Referenced Title
%        The Referenced Title is the title of another printed material that occurs in the lyrics.
%    Subject Genre
%        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).
%    Referenced Name
%        Referenced Name is used to record a personal or corporate name that is the subject of a song's lyrics.
%    Subject Occupation
%        Subject Occupation is used to record the occupation of the name referenced in the lyrics.
%    Hierarchical Geographic
%        The following elements describe geographic information in a hierarchical form:
%
%        Continent
%            Continent describes the continent on which a named place in the lyrics is located.
%        Country
%            Country describes the country in which a named place in the lyrics is located.
%        Province
%            Province describes the province in which a named place in the lyrics is located.
%        Region
%            Region describes the region in which a named place in the lyrics is located.
%        State
%            State describes the state in which a named place in the lyrics is located.
%        Territory
%            Territory describes the territory in which a named place in the lyrics is located.
%        County
%            County describes the county in which a named place in the lyrics is located.
%        City
%            City describes the city in which a named place in the lyrics is located.
%        Island
%            Island describes the island on which a named place in the lyrics is located.
%        Area
%            Area describes the area in which a named place in the lyrics is located.


%\newpage
\subsubsection{Identification Numbers}
\label{LiUsMeId}
\begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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."}\\
\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."}\\
\Tag{catalogNumber}{BWV31029}{An identifying number for a musical composition assigned by the composer, publisher or researcher. Bach-Werksverzeichnis for example.}\\
\Tag{callNumber}{No clue again}{An institution's local identifier indicating the physical location of the item within the collection.}\\
\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.}\\
\end{longtable}

%\newpage
\subsubsection{Relational Identifier}
\label{LiUsMeRe}
\begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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.}\\
\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.}\\
\Tag{originalItem}{ADKB-35}{Identifier for the original item from which the resource was derived.}\\
\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.}\\
\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.}\\
\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.}\\
\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.}\\
\end{longtable}


\subsubsection{Notes/Description}
\label{LiUsMeNotedescription}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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.}\\
\Tag{description}{A song about friendship, beer and wanderlust.}{A general description.}\\
\end{tabular}


\subsubsection{Date Information}
\label{LiUsMeDa}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\Tag{date}{1631}{"Date" meta data holds the date an item was copyrighted or published. }\\
\Tag{dateOfWork}{1630-12-31}{The "Date of Work" records the date the piece of music was written.}\\
\end{tabular}

\subsubsection{Language}
\label{LiUsMeLa}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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.}\\
\end{tabular}



\subsubsection{Type of Resource}
\label{LiUsMeTy}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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.}\\
\end{tabular}


\subsubsection{Publication Meta Data - Origin Info}
\label{LiUsMeOr}
\begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\Tag{publisherName}{Guthenbergs Kommersbuchdruckerei}{Those responsible for the physical production and dissemination, of the resource.}\\
\Tag{publisherPlace}{Heidelberg}{The name of the place where a resource has been published.}\\
\Tag{placePublished}{Leipzig}{Where it had been published. i.e. Leipziger Buchmesse $\rightarrow$ Leipzig}\\
\Tag{publisher}{Verlag Arnold SchÃ¶nberg - Weimar}{Name of the publisher.}\\
\Tag{placePublisher}{Weimar}{Where the publisher is located.}\\
\Tag{dateIssued}{1841-08-01}{When it had been published.}\\
\Tag{copyrightDate}{1841}{The year relevant for copyright and its expiration.}\\
\Tag{dateCreated}{1840-04-03}{When the work had been made. This must be some date prior to publishing.}\\
\Tag{dateModified}{1842-10-03, 1848-06-02}{If a work underwent some modifications like fixing typos.}\\
\Tag{dateValid}{1947}{Works with limited validity. i.e. phone books, pharamceutical drug lists. Can be for example also the expiration of the copyright.}\\
\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}\\
\Tag{edition}{3}{In cases of reprints, it specifies, which edition this had been taken from.}\\
\end{longtable}









\subsubsection{Physical Description}
\label{LiUsMePh}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\Tag{formMedium}{book}{In what medium had this been published in. Book, leaflet, brochure, single page;}\\
%\Tag{extent}{no clue}{Beschreibung}\\
%\Tag{internetMediaType}{traditional}{Beschreibung}\\
\Tag{\hspace*{-45pt}\hfill physicalDescriptionNote}{Original lost in fire}{Can be any useful information about the original copy.}\\
\end{tabular}


\subsubsection{Abstract}
\label{LiUsMeAb}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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.}\\
\end{tabular}

\subsubsection{Table of Contents}
\label{LiUsMeTa}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\Tag{tableOfContents}{%
\begin{enumerate}
\item Intro
\item Sailor songs
\item Hiking songs
\item Drinking songs
\item Hooligan songs
\item Wedding songs
\begin{enumerate}
\item If the bride is beautiful
\item If the bridesmaids are beautiful
\end{enumerate}
\item Again drinking songs
\end{enumerate}
}{The table of contents}\\
\end{tabular}

\subsubsection{Instrumentation}
\label{LiUsMeIn}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\Tag{instrumentation}{chamber orchestra}{A meaningful and well established value about the instrumentation of the piece.}\\
\end{tabular}


\subsubsection{Cartographics}
\label{LiUsMeCa}
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.

\begin{longtable}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\Tag{scale}{1:200000}{Scale is used to capture the ratio between actual size and a representation of size.}\\
\Tag{projection}{Merkaartor}{Projection describes the method of representing the surface of a sphere or other shape on a plane.}\\
\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.}\\
\end{longtable}


\subsubsection{Classification}
\label{LiUsMeCl}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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.}\\
\end{tabular}






\subsubsection{Location Info}
\label{LiUsMeLo}
\begin{tabular}{p{0.22\textwidth} c p{0.28\textwidth} p{0.40\textwidth}}
Tag &amp; &amp; value examples &amp; description\\
\hline
\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.}\\
\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.}\\
\Tag{shelfLocation}{3AC/F-K}{Shelf Location is used to record the shelf designation number for the resource.}\\
\Tag{physicalLocation}{Heimatmuseum, Kudamm~31, Berlin; Building~3/A; 3.~Floor}{Physical Location refers to the institution or repository where the resource is held.}\\
\end{tabular}










%\subsubsection{?Access Condition}
%\label{LiUsMeAc}
%Access Condition is used to record information about restrictions on who may use the resource.
%
%Record Info
%
%The following fields can be used to capture information necessary for managing the meta data associated with the resource:
%
%
%Record Content Source
%
%Record Content Source identifies the name of the organization/person who created the resource record.
%
%
%Record Identifier
%
%The Record Identifier is used to record the identification number for the record.
%
%
%Record Description Standard
%
%The Record Description Standard is used to identify the content standard to which the record conforms.

\newpage
\subsection{How it works}
\begin{itemize}
\item[] \ref{LiHoBu} \nameref{LiHoBu}
\item[] \ref{LiHoUs} \nameref{LiHoUs}
\item[] \ref{LiHoTh} \nameref{LiHoTh}
\end{itemize}

\subsubsection{Building a Songbook}
\label{LiHoBu}
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:
\begin{lstlisting}[numbers=none]
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%% Special music characters %%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    [...]
	
    
\end{lstlisting}

Handling of meta data:
\begin{lstlisting}[numbers=none]
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%% Handling of the meta data %%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    \def\GFM@LB@unpackage...
\end{lstlisting}
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:
\begin{lstlisting}[numbers=none]
    \GFM@LB@lied@&lt;songbook&gt;@&lt;song variant&gt;@&lt;song number&gt;@&lt;meta data name&gt;
\end{lstlisting}
For the songbook ''Folksongs'', songnumber ''5'', variant ''choral'' and variable name ''composer'', the \LaTeX variable would look like this:
\begin{lstlisting}[numbers=none]
    \GFM@LB@lied@Folksongs@choral@5@composer
\end{lstlisting}
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{&lt;variable name&gt;}+ command (see farther down).

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.

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:
\begin{lstlisting}[numbers=none]
    \tweakMetadata{&lt;songbook&gt;}{&lt;song number&gt;}{&lt;variant&gt;}{&lt;meta data}
\end{lstlisting}

One of the most important core parts of the package is the arrangement of syllables below the notes:
\begin{lstlisting}[numbers=none]
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%% Environment and commands for        %%%
    %%% notes + lyrics in native LaTeX font %%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    [...Constants...]
    
    \def\songLyrics[&lt;length&gt; default = \linewdith]{
        [...]
        \def\nspace[*]{&lt;some length or number&gt;}
        \def\ns[*][&lt;some length or number&gt;]
        [...]
    }%
\end{lstlisting}
\verb+\songLyrics+ creates a \verb+\makebox[&lt;length&gt;]{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:
\begin{lstlisting}[numbers=none]
    {See \ns here \ns the \ns be \ns* gin \ns* ning}
\end{lstlisting}\vskip -8pt\relax
\verb+     +\parbox{0.8\linewidth}{%
\vskip -3pt\relax
becomes
\vskip 5pt\relax
\fbox{\makebox[0.4\linewidth]{%
See\hfill ~\hfill here\hfill ~\hfill the\hfill ~\hfill be\hfill -\hfill gin\hfill -\hfill ning%
}%makebox
}%fbox
}%parbox

\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:
\begin{lstlisting}[numbers=none]
    \notenzeile{O{\linewidth} m m O{\empty} O{\empty} O{\empty} O{\empty} O{\empty}}{%
\end{lstlisting}

\begin{lstlisting}[numbers=none, breaklines=false]
    \multiline}{m m m O{\empty} O{\empty} O{\empty} O{\empty}}{%
\end{lstlisting}
\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.

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:
\begin{lstlisting}[numbers=none]
    \forcePageBreakAfterStaveLine{&lt;number&gt;}[&lt;n.&gt;][&lt;n.&gt;][&lt;n.&gt;][&lt;n.&gt;][&lt;n.&gt;]
\end{lstlisting}
\begin{lstlisting}[numbers=none]
    \forcePageBreakAfterStrophe{&lt;number&gt;}[&lt;n.&gt;][&lt;n.&gt;][&lt;n.&gt;][&lt;n.&gt;][&lt;n.&gt;]
\end{lstlisting}
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.

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:
\begin{lstlisting}[numbers=none]
    \begin{strophe}[&lt;set strophe number to x&gt;]
    This is the strophe text.
    Sing sing sing.
    Line breaks disappear.
    I want to create an option for that.
    \end{strophe}
\end{lstlisting}

The spacing constists of set-commands, stored values and the use commands (no prefix/suffix):
\begin{lstlisting}[numbers=none]
    %%%%%%%%%%%%%%%
    %%% Spacing %%%
    %%%%%%%%%%%%%%%
    
    %%% Head
    \def\setSpaceBeforeHeadValue#1{\def\spaceBeforeHeadValue{#1}}
    \def\setSpaceAfterHeadValue#1{\def\spaceAfterHeadValue{#1}}
    
    %%% Notes
    \def\setSpaceBeforeNotesValue#1{\def\spaceBeforeNotesValue{#1}}
    \def\setSpaceAfterNotesValue#1{\def\spaceAfterNotesValue{#1}}
    
    %%% Strophes
    \def\setSpaceBeforeStropheValue#1{\def\spaceBeforeStropheValue{#1}}
    \def\setSpaceAfterStropheValue#1{\def\spaceAfterStropheValue{#1}}
    
    %%% Song lyrics
    \def\setSpaceBeforeSongLyricsValue#1{\def\spaceBeforeSongLyricsValue{#1}}
    \def\setSpaceBetweenSongLyricsValue#1{\def\spaceBetweenSongLyricsValue{#1}}
    \def\setSpaceAfterSongLyricsValue#1{\def\spaceAfterSongLyricsValue{#1}}
    
    %%% Foot
    \def\setSpaceBeforeFootValue#1{\def\spaceBeforeFootValue{#1}}
    \def\setSpaceAfterFootValue#1{\def\spaceAfterFootValue{#1}}
    
\end{lstlisting}

\begin{lstlisting}[numbers=none]
    %%% Horizontal spacing
    \def\setSpaceStropheIndentValue#1{\def\spaceStropheIndentValue{#1}}
    \def\setSpaceHeadIndentValue#1{\def\spaceHeadIndentValue{#1}}
    \def\setSpaceFootIndentValue#1{\def\spaceFootIndentValue{#1}}
\end{lstlisting}

Convert the space values into skips:
\begin{lstlisting}[numbers=none]
    %%% Arranging the space values
    \def\spaceBeforeHead{\vskip\spaceBeforeHeadValue\relax\noindent\mbox{}\hskip\spaceHeadIndentValue\mbox{}}
    
    \def\spaceAfterHead{\relax\vskip\spaceAfterHeadValue\relax}
    
    \def\spaceBeforeNotes{\relax\vskip\spaceBeforeNotesValue\relax}
    
    [...rest works analogously...]
\end{lstlisting}

\newpage
These commands save the definition of the header and footer for each song. They also implicitly arrange the spacing in the header and footer:
\begin{lstlisting}[numbers=none]
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%% Styling of header and footer %%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    \newcommand{\LBHead}[1]{%
    \long\def\GFM@LB@Head{\spaceBeforeHead #1\relax\spaceAfterHead\mbox{}}%
    }%
    
    \newcommand{\LBFoot}[1]{%
    \long\def\GFM@LB@Foot{\spaceBeforeFoot #1\relax\spaceAfterFoot}%
    }%
\end{lstlisting}

\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:
\begin{lstlisting}[numbers=none]
    \liedBody;&lt;songbook&gt;;&lt;song variant&gt;;&lt;number&gt;
\end{lstlisting}\vskip -5pt\relax
The \verb+Lied+ environment also stores each meta data value in an command sequence by calling the \verb+\GFM@LB@unpackage+ command:
\begin{lstlisting}[numbers=none]
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%% Environments for creating  %%%
    %%% the songbooks (liederbuch) %%% 
    %%% and the songs (lied)       %%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    %Liederbuch environment
    \NewEnviron{liederbuch}[2][]{%
    \def\GFM@LB@LiederbuchNameTmp{#2}%
    %%Lied environment %cslet
    \NewEnviron{lied}[3][]{% 
    %##1=meta data ##2=variant ##3=nummer
    \def\GFM@LB@LiederbuchVariantTmp{##2}%
    \def\GFM@LB@LiederbuchNumberTmp{##3}%
    \GFM@LB@unpackage{##1}%
    \GFM@LB@unpackage{#1}%
    \global\cslet{liedBody;\GFM@LB@LiederbuchNameTmp;##2;##3}\BODY%
    }%
    \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.
    }
\end{lstlisting}


\subsubsection{Using a Songbook}
\label{LiHoUs}
With the command
\begin{lstlisting}[numbers=none]
    \usepackage{../path/to/songbook.sty}
\end{lstlisting}
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:
\begin{lstlisting}[numbers=none]
    \LBsong{&lt;songbook name&gt;}{&lt;song number&gt;}{&lt;variant&gt;}
\end{lstlisting}
i.e.
\begin{lstlisting}[numbers=none]
    \LBsong{exampleSongs}{23}{nt}
\end{lstlisting}
It calls itself a series of macros:
\begin{lstlisting}[numbers=none]
    %&lt;setting some values&gt;
    \NewDocumentCommand{\print}{O{\empty} m}{%
        [...]
    }%
    \GFM@LB@Head%
    %&lt;setting some values&gt;
    %%%%%%%%%%%%%%%%%%%%%%%%%%
    \csuse{liedBody;#2;#1;#3}%
    %=\liedBody;&lt;songbook&gt;;&lt;song variant&gt;;&lt;number&gt;
    %%%%%%%%%%%%%%%%%%%%%%%%%%
    %&lt;setting some values&gt;
    \GFM@LB@Foot
\end{lstlisting}
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})

\newpage
\subsubsection{Themes}
\label{LiHoTh}
For creating a theme, you can currently only define the style of the head and the foot of a song.

The principle is very simple. In 
\begin{lstlisting}[numbers=none]
    \LBHead
\end{lstlisting}
and
\begin{lstlisting}[numbers=none]
    \LBFoot
\end{lstlisting}
a format for the head is defined and stored (with some spacing) into
\begin{lstlisting}[numbers=none]
    \GFM@LB@Head
\end{lstlisting}
For the foot it is stored into
\begin{lstlisting}[numbers=none]
    \GFM@LB@Foot
\end{lstlisting}

Inside them the \verb+\print{&lt;meta data name&gt;}+ 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. 

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.

\subsubsection{printliederbuch}
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.


\chapter{Liederheft-Class}
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.

\section{Basics}
No text yet. Just guess it.

\section{What The Package Uses}
\begin{itemize}
\item scrbook\\
This is the class, which the Liederheft is based on.
\item[]
\end{itemize}

\section{User Commands}
Just read the manual. Oh, this is the manual. How unfortunate.

\section{How it works}
Not at all yet. Maybe it never will.






\chapter{Known bugs and problems}
\section{Undefined control sequence $\backslash OT$}
undefined control sequence \verb+\OT+ maybe caused by ÃŸ in meta data. A simple workaround is to use \verb+\def\OT#11{}+ in the preamble.

\section{Undefined control sequence $\backslash GFM@LB@songbook@123@nt@title$}
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.

%\section{Undefined control sequence (general likely reason)}
%Everything, that breaks in an edef, like \verb+\\+, breaks in the metadata. See also the next section \nameref{KnGl}.

%\section{glqq grqq}
%\label{KnGl}
%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
%
%\begin{lstlisting}[numbers=none]
%    \let\GFM@protect@glqq\glqq%
%    \def\glqq{\unexpanded{\glqq}}%
%\end{lstlisting}
%
%and AtBeginDocument they are reverted:
%
%\begin{lstlisting}[numbers=none]
%    \AtBeginDocument{%
%        \let\glqq\GFM@protect@glqq%
%    }%
%\end{lstlisting}
%
%This idea will be the idea of my (future) teleport package.

\section{Spacing}
If there is used plus and/or minus in spacing, this (might) result in extra space. The origin is unknown yet.

\chapter{Bug reports}
Nothing to say here. You can post any bug reports on bitbucket, if you find some:
\begin{quote}
\url{https://bitbucket.org/maestro-glanz/liederbuch-package/src/main/}
\end{quote}
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.


\chapter{Revision History}
\noindent
\begin{tabular}{l l}
2017-11-01:&amp; v0.1.0\\
2024-12-22:&amp; v1.0.0\\
2025-01-20:&amp; v1.1.0
\end{tabular}


\end{document}


\section{Milestones for Version 1.1.0}

\subsection{listOfSongs}
%Create custom list listOfSongs

\listofsongs in printLiederbuch

%   at the fifth style
   
% Fix grqqglqq - Check for now.

Fix upper-lower case
    Griechisch + Gr2
%Fix unknown tags (lyricist, title, composer don't exist) -&gt; No good fix available yet.


\section{Milestones for Version 1.2.0}
Backgrounds for songs. 4 divisions (fix, stretch, stretch, fix height).
List may be expanded

TOC bei printliederbuch korrekt mit nummer, variant, title

Fix hyperref
   twolines style -&gt; Postpone
       On read sollte das ausgefÃ¼hrt werden.
   so it points to the right position


- multilines -&gt; extra space after line x


\sendListOfSongsToTOC[author/title/etc]{los/toc/etc.}[los/toc/etc]{%
\GFM@LB@listOfSongsTOCa{}
\GFM@LB@listOfSongsTOCb{}
\GFM@LB@listOfSongsTOCc{}
}%

\subsection{verse command}



\section{Before upload}
Is the license in 
- the sty- and tex-files?
- readme?

Is the author name in 
- the sty- and tex-files?
- readme?

Is the version number in 
- the docu text? first page?
- the sty- and tex-files (+provides package param)?
- readme?
  
Is the correct revision date in 
- the docu text?
- the sty- and tex-files?
- readme?

Is the repo link in
- the docu text?
- the sty- and tex-files? -&gt; no
- readme? -&gt; no


\section{Milestones for Version 1.2}

\subsection{3 Standard designs}
%\useLiederbuchStyle{}

%\useLiederbuchColor{}
analog to moderncv

Style mit \print[\GFM@LB@composer]{Mozart} -&gt; Babel-kompatibel

\chapter*{Todo}

Fix relative paths. Reference to the containing package.

IfBoolean instead of ifx for stared command in DeclareDocumentCommand

integrate /@car and /@cdr

/extraSpaceBeforeStrophe{Strophennummer}{pt}

meta data: what breaks in an edef, is only possible with a triple unexpanded.


\section{Compability improvement with different fonts and languages}
I have plans here. But nothing too specific yet.

</pre></body></html>