ScholarLY and Latex

2019-02-26 Thread Craig Dabelstein
Hi all (and especially Urs),

I've been working with Scholarly and Latex -- the usage-example on the
initial-latex-package branch works perfectly, but the inp file is different
to what is currently exported by the Scholarly package (which I'm sure you
know).

An example from the initial-latex-package that works perfectly is:

\criticalRemark
   [grob={NoteHead},
grob-location={((beat-string . 4) (beat-fraction . 0) (beat-part . Mom
0) (our-beat . 4) (measure-pos . Mom 3/4) (measure-no . 1)
(rhythmic-location 1 . Mom 3/4))},
grob-type={NoteHead},
input-file-name={annotate.ly},
context-id={usage-examples},
location={/Users/Jeffery/work/scholarLY/usage-examples/annotate.ly
15:4:4},
type={critical-remark},
message={Go to \textit{school} and \textcolor{red}{sit back}! This
annotation has a footnote which LilyPond will ignore.},
ann-footnote={Here is a footnote for the entire annotation; it
is only used by the \LaTeX{} package.}]

An example of the inp file from the master branch of ScholarLy:

\criticalRemark[
item={#f},
message={Slur in original part is unclear as to its exact start and
end. The best visual estimation is a slur covering the full bar, however
the dotted slur represents the likely original intent based on future
presentations that are marked clearly.},
ann-type={critical-remark},
music-type={post-event},
style-type={tweak},
span-class={annotation},
location={/Users/craigdabelstein/Maxime's
Music/Projects/MM0079/Jadin/lilypond/Score/../Notes/clarinetI.ily:37:3:3},
context-id={1re. CLARINETTE.},
context-label={1re. CLARINETTE.},
score-id={#f},
score-label={},
grob-type={Slur},
grob-label={Slur},
beat-string={1 3/4},
beat-fraction={3/4},
beat-part={3/8},
our-beat={1},
measure-pos={3/8},
measure-no={9},
rhythmic-location={9,3/8},
]

This throws up multitudes of xkeyval errors such as:

! Package xkeyval Error: `measure-pos' undefined in families `scholarLYann'.



Can I help to get the inp output of the master branch to work with the
latex-package? Where I should I start, or what would you like me to do?


All the best,


Craig



-- 
*Craig Dabelstein*
Maxime's Music
craig.dabelst...@gmail.com
*http://maximesmusic.com <http://maximesmusic.com>*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ScholarLy and Latex

2018-03-10 Thread Craig Dabelstein
Urs,

The "temp-print-message" branch worked perfectly first time. You are
amazing! One small problem for me though -- the output is rendering the
measure and beat with the lilyglyphs ({1}{4.\,\crotchet}). How can I get it
back to just {1}{4} without the lilyglyph? I know I've seen how to do it
somewhere but I just can't find it.

All the best,

Craig


On 11 March 2018 at 09:22, Craig Dabelstein 
wrote:

> Hi Urs,
>
> Thanks very much for all that information. I'll check out the
> "temp-print-message" branch and let you know how I go.
>
> All the best,
>
> Craig
>
>
> On 8 March 2018 at 02:12, Urs Liska  wrote:
>
>> Hi Craig,
>>
>> sorry for the delay, but I had quite reduced capacities during the past
>> week.
>>
>> I'm even more sorry to inform you that what you experience is "expected
>> behaviour" and the result of incomplete implementation :-(
>>
>> The exported annotations put a number of information items (including the
>> message!) in one optional argument, followed by four mandatory arguments
>> with the curly braces.
>>
>>
>> However, in the .sty file the commands are defined to expect six
>> arguments, the first one being optional:
>>
>> \newcommand{\criticalRemark}[6][]{
>> \annotation[#1]{#2}{#3}{#4}{#5}{#6}
>>  {Critical Remark}}
>>
>> This makes \criticalRemark call \annotation, pass its six arguments to it
>> and one hard-coded "Critical Remark" argument as seventh.
>>
>> The code exported from scholarly does not export that sixth argument, and
>> consequently it is empty when it reaches \annotation.
>> As you have noticed, if you copy the entry to the end of the list of
>> arguments it will be printed correctly.
>>
>> I'm not sure what to advise you right now. Your are actually suffering
>> from the fact that I didn't manage to keep hold of the project. In addition
>> to what is "publicly" available there is an "initial LaTeX package" in the
>> repository, on the unmerged branch 'initial-latex-package' with substantial
>> code additions and unfortunately the lack of review on my part. Maybe this
>> branch is actually ready to be merged, but I simply don't really know.
>> And unfortunately I can't promise to change that immediately. Although I
>> should take your report as the incentive to finally get back to that, now
>> that lyluatex is also "out".
>>
>> I have pushed a temporary fix to the temp-print-message branch. If you
>> checkout that branch and recompile the LilyPond score the annotation
>> message will be added to the list of arguments, and your report.sty will
>> properly read in the message.
>> But I don't really like that hack, and you have to be aware that this
>> interface may not be stable.
>>
>> Sorry for not having much better info for you
>> Best
>> Urs
>>
>>
>> Am 02.03.2018 um 10:25 schrieb Craig Dabelstein:
>>
>> 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  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 

Re: ScholarLy and Latex

2018-03-10 Thread Craig Dabelstein
Hi Urs,

Thanks very much for all that information. I'll check out the
"temp-print-message" branch and let you know how I go.

All the best,

Craig


On 8 March 2018 at 02:12, Urs Liska  wrote:

> Hi Craig,
>
> sorry for the delay, but I had quite reduced capacities during the past
> week.
>
> I'm even more sorry to inform you that what you experience is "expected
> behaviour" and the result of incomplete implementation :-(
>
> The exported annotations put a number of information items (including the
> message!) in one optional argument, followed by four mandatory arguments
> with the curly braces.
>
>
> However, in the .sty file the commands are defined to expect six
> arguments, the first one being optional:
>
> \newcommand{\criticalRemark}[6][]{
> \annotation[#1]{#2}{#3}{#4}{#5}{#6}
>   {Critical Remark}}
>
> This makes \criticalRemark call \annotation, pass its six arguments to it
> and one hard-coded "Critical Remark" argument as seventh.
>
> The code exported from scholarly does not export that sixth argument, and
> consequently it is empty when it reaches \annotation.
> As you have noticed, if you copy the entry to the end of the list of
> arguments it will be printed correctly.
>
> I'm not sure what to advise you right now. Your are actually suffering
> from the fact that I didn't manage to keep hold of the project. In addition
> to what is "publicly" available there is an "initial LaTeX package" in the
> repository, on the unmerged branch 'initial-latex-package' with substantial
> code additions and unfortunately the lack of review on my part. Maybe this
> branch is actually ready to be merged, but I simply don't really know.
> And unfortunately I can't promise to change that immediately. Although I
> should take your report as the incentive to finally get back to that, now
> that lyluatex is also "out".
>
> I have pushed a temporary fix to the temp-print-message branch. If you
> checkout that branch and recompile the LilyPond score the annotation
> message will be added to the list of arguments, and your report.sty will
> properly read in the message.
> But I don't really like that hack, and you have to be aware that this
> interface may not be stable.
>
> Sorry for not having much better info for you
> Best
> Urs
>
>
> Am 02.03.2018 um 10:25 schrieb Craig Dabelstein:
>
> 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  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
>> craig.dabelst...@gmail.com
>> *http://maximesmusic.com *
>>
>>
>> 

Re: ScholarLy and Latex

2018-03-07 Thread Urs Liska

Hi Craig,

sorry for the delay, but I had quite reduced capacities during the past 
week.


I'm even more sorry to inform you that what you experience is "expected 
behaviour" and the result of incomplete implementation :-(


The exported annotations put a number of information items (including 
the message!) in one optional argument, followed by four mandatory 
arguments with the curly braces.



However, in the .sty file the commands are defined to expect six 
arguments, the first one being optional:


\newcommand{\criticalRemark}[6][]{
\annotation[#1]{#2}{#3}{#4}{#5}{#6}
{Critical Remark}}

This makes \criticalRemark call \annotation, pass its six arguments to 
it and one hard-coded "Critical Remark" argument as seventh.


The code exported from scholarly does not export that sixth argument, 
and consequently it is empty when it reaches \annotation.
As you have noticed, if you copy the entry to the end of the list of 
arguments it will be printed correctly.


I'm not sure what to advise you right now. Your are actually suffering 
from the fact that I didn't manage to keep hold of the project. In 
addition to what is "publicly" available there is an "initial LaTeX 
package" in the repository, on the unmerged branch 
'initial-latex-package' with substantial code additions and 
unfortunately the lack of review on my part. Maybe this branch is 
actually ready to be merged, but I simply don't really know.
And unfortunately I can't promise to change that immediately. Although I 
should take your report as the incentive to finally get back to that, 
now that lyluatex is also "out".


I have pushed a temporary fix to the temp-print-message branch. If you 
checkout that branch and recompile the LilyPond score the annotation 
message will be added to the list of arguments, and your report.sty will 
properly read in the message.
But I don't really like that hack, and you have to be aware that this 
interface may not be stable.


Sorry for not having much better info for you
Best
Urs

Am 02.03.2018 um 10:25 schrieb Craig Dabelstein:

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 > 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
craig.dabelst...@gmail.com 
/http://maximesmusic.com/


___
lilypond-user mailing list
lilypond-user@gnu.org 
https://lists.gnu.org/mailman/listinfo/lilypond-user



Re: ScholarLy and Latex

2018-03-02 Thread Craig Dabelstein
d 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
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ScholarLy and Latex

2018-03-01 Thread Urs Liska

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
craig.dabelst...@gmail.com 
/http://maximesmusic.com/


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


ScholarLy and Latex

2018-02-23 Thread 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?

Thanks in advance,

Craig


-- 
*Craig Dabelstein*
Maxime's Music
craig.dabelst...@gmail.com
*http://maximesmusic.com *
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user