\NeedsTeXFormat{LaTeX2e} \ProvidesPackage{report} \RequirePackage{ifthen} \newcounter{CurrentMeasure} \newcounter{AnnotationNo} % Print an annotation % % Initial implementation is a quite hard-coded thing, % just to get it started at all. % It is intended to make the generation of output as modular as possible. % The annotation should be put together from individual macros. This will % enable users to % a) renew the macros to change the appearance of individual parts % b) renew the \annotation command to reorganize it by keeping the formatting % of the individual building blocks. % The macro is designed to take its data from output generated by LilyPond's % (or rather ScholarLY's) \annotate function, but it can equally be used % directly, from manually entered LaTeX code. % % It takes seven properties, the first one being an optional key=value set: % #1: Additional arguments. Has to be parsed separately % (not implemented yet) % #2: Measure number % #3: Beat string (currently not good enough yet) % #4: Affected context (voice) % #5: Affected type of notational element % (currently not used, needs a nice lookup in the LilyPond part) % #6: Annotation content (message) % #7: Annotation type \newcommand{\annotation}[7][]{% \stepcounter{AnnotationNo} \medskip \noindent \ifthenelse{\equal{#2}{\value{CurrentMeasure}}} {--- }{\textbf{M.\,#2,} \setcounter{CurrentMeasure}{#2}}% beat #3, #4: ``#6'' \textit{(\theAnnotationNo)}} % Several wrapper functions to typeset different kinds of annotations. % For now these only differ through the label, but they could be % extended in the future, e.g. through conditional coloring in draft mode etc. % Intended for proper critical remarks \newcommand{\criticalRemark}[6][]{ \annotation[#1]{#2}{#3}{#4}{#5}{#6} {Critical Remark}} % Intended for critical remarks that still have to be discussed. % Usually the goal is to turn all into critical remarks. \newcommand{\musicalIssue}[6][]{ \annotation[#1]{#2}{#3}{#4}{#5}{#6} {Musical Issue}} % Intended for technical issues regarding the music engraving % (clearly only useful when using the package together with LilyPond) \newcommand{\lilypondIssue}[6][]{ \annotation[#1]{#2}{#3}{#4}{#5}{#6} {LilyPond Issue}} % Intended for general questions that are tied to musical items. \newcommand{\annotateQuestion}[6][]{ \annotation[#1]{#2}{#3}{#4}{#5}{#6} {\textbf{Question}}} % Intended for TODO items that are tied to musical items. \newcommand{\annotateTodo}[6][]{ \annotation[#1]{#2}{#3}{#4}{#5}{#6} {\textbf{TODO}}}