gregorio-project / gregorio

The Gregorio Project
http://gregorio-project.github.io
Other
164 stars 43 forks source link

Adding a marginal note renders extra staves #1494

Closed adunning closed 3 years ago

adunning commented 4 years ago

Gregorio 5.2.1 has rendering problems when attempting to add a marginal note using the marginnote package (\marginpar results in an error):

Screenshot 2020-05-22 at 12 18 09
\documentclass{article}

\usepackage{gregoriotex}
\usepackage{marginnote}

\begin{document}

\gabcsnippet{(c3) Test(h) <v>\marginnote{marginal note}</v> mu(h_)sic(g_)}

\end{document}
rpspringuel commented 3 years ago

I think this is probably caused by the same thing causing the problems in #1500. The marginal note ends up inside a box and gets processed multiple times. There also seems to be an invocation of \localleftbox inside the margin note.

In this case, since there's nothing visible in the score itself, you might try using the verbatim macros in the notes instead: http://gregorio-project.github.io/gabc/details.html#verbatim

adunning commented 3 years ago

Might it be possible to add a macro for marginal notes into Gregorio itself? It's a reasonably common feature in chant sources.