Hi Urs, I hope you can understand these files. I think the report.sty file was borrowed from your Scores of Beauty post a long time ago (maybe). My problem is trying to get the content of the "message" field to be displayed.
All the best, Craig On 1 March 2018 at 19:05, Urs Liska <[email protected]> wrote: > Hi Craig, > > Am 23.02.2018 um 10:07 schrieb Craig Dabelstein: > > Hi Lilyponders, > > I'm having a minor problem with getting my ScholarLy inp file to work with > Latex. The Latex output for each annotation looks like this: > > \criticalRemark > [grob={DynamicText}, > grob-location={Can't display grob location yet}, > grob-type={DynamicText}, > input-file-name={fluteI.ily}, > context-id={Flauto 1}, > location={/Users//Maximes_Music/Projects/MM0110/Hallager/critical > edition/Parts/../Notes/fluteI.ily 55:2:2}, > type={critical-remark}, > message={Added missing \lilyDynamics{p}}] > {18}{6} > {Flauto 1} > {DynamicText} > > And within my Latex file each entry is displayed with this code: > > \noindent > \theAnnotationNo\,)\\ > \textit{(#7)}\\ > \ifthenelse{\equal{#2}{\value{CurrentMeasure}}} > {}{\textbf{M. #2}, > \setcounter{CurrentMeasure}{#2}}% > beat #3\\ > #4\\ > Affects: #5\\ > ``#6''} > > My problem is that Latex won't display the #6 (the contents of the message > field). It is displaying the quotation marks but just empty space in > between. If I cut and paste the message field and add it to the bottom of > the code it displays perfectly correctly: > > \criticalRemark > [grob={DynamicText}, > grob-location={Can't display grob location yet}, > grob-type={DynamicText}, > input-file-name={fluteI.ily}, > context-id={Flauto 1}, > location={/Users//Maximes_Music/Projects/MM0110/Hallager/critical > edition/Parts/../Notes/fluteI.ily 55:2:2}, > type={critical-remark}, > message={Added missing \lilyDynamics{p}}] > {18}{6} > {Flauto 1} > {DynamicText} > {Added missing \lilyDynamics{p}} > > > Any ideas where I could be going wrong? > > > Not yet, but could you please send a MWE, i.e. a complete file, with maybe > that critical remark just added in the file (instead of inputted)? What > exactly is context of the code that displays the annotation, i.e. where's > the complete definition of the "\criticalRemark" macro? > > Urs > > Thanks in advance, > > Craig > > > -- > *Craig Dabelstein* > Maxime's Music > [email protected] > *http://maximesmusic.com <http://maximesmusic.com>* > > > _______________________________________________ > lilypond-user mailing > [email protected]https://lists.gnu.org/mailman/listinfo/lilypond-user > > > > _______________________________________________ > lilypond-user mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/lilypond-user > > -- *Craig Dabelstein* Maxime's Music [email protected] *http://maximesmusic.com <http://maximesmusic.com>*
\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}}}
scholarly-latex-test.annotations.inp
Description: Binary data
scholarly-latex-test.ly
Description: Binary data
\documentclass[a4paper, 12pt]{book}
\usepackage{fancyhdr}
\usepackage{geometry}
\usepackage{nag}
\usepackage{microtype}
\usepackage{pdfpages}
\usepackage{afterpage}
\usepackage{layout}
\usepackage{fullpage}
\usepackage{multicol}
\setlength{\columnsep}{0.75cm}
\usepackage{color}
%lilyglyphs
\usepackage{fontspec}
\defaultfontfeatures{Ligatures={TeX}}
\usepackage{lilyglyphs}
%font
\setmainfont{Minion Pro}
%\setmainfont[Numbers=OldStyle]{Minion Pro}
%ragged right formatting
\usepackage{ragged2e}
\usepackage{everysel}
\usepackage{footmisc}
\newlength{\saveparindent}
\setlength{\saveparindent}{\parindent}
\usepackage{report}
\pagestyle{fancy}
\fancyfoot{}% clear footers
\renewcommand{\headrulewidth}{0pt}% eliminate horizontal line
\fancyhead[RO, LE]{\footnotesize \thepage}
\headsep = 25pt
\topmargin = -25pt
\begin{document}
\setcounter{page}{25}
\section*{Critical Report}
\subsection*{Test}
\begin{multicols}{2}
\small
\input{scholarly-latex-test.annotations.inp}
\end{multicols}
\end{document}_______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
