Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LilyPond raw-pdf does not give hoffset #283

Open
chestertonMM opened this issue Dec 6, 2020 · 0 comments
Open

LilyPond raw-pdf does not give hoffset #283

chestertonMM opened this issue Dec 6, 2020 · 0 comments

Comments

@chestertonMM
Copy link

On page 46 of the documentation to lyluatex version 1.0f, one can find a way to use the raw-pdf functionality of lyluatex. The problem with that is, that I cannot find a way to apply the correct negative horizontal offset to the included graphics, so that they would correctly protrude into the left margin. This seems to be an issue in the documentation as well, where instrument name begins in the text area and not in the left margin, as would be correct. I add my own mwe where I first used the same code as in the documentation using the raw-pdf option and after that I included the score with the usual lilypond environment.

\documentclass{minimal}
\usepackage{lyluatex}
\usepackage{pgffor}
\usepackage{lipsum}


\begin{document}
  
  \newcommand\myforlily[2][]{%
\lily[insert=systems,raw-pdf,#1]{#2}
\lyscore{hoffset}\\%
\foreach \n in {1,...,\lyscore{nsystems}}%
    {\noindent\hspace*{\lyscore{hoffset}}\includegraphics{\lyscore{\n}}%
    \ifthenelse{\equal{\n}{3}}{\par Third system\par}{\\}
    }%
}

\lipsum[1]


\myforlily[staffsize=24]{
\score { \new Staff { \set Staff.instrumentName = "Vl." \repeat unfold 4 { c'1 \break } } } }

\lipsum[2]

\begin{lilypond}[staffsize=24]

\score { \new Staff { \set Staff.instrumentName = "Vl." \repeat unfold 4 { c'1 \break } } }

\end{lilypond}

\lipsum[3]


\end{document}

Namenlos-1.pdf
See also the attached pdf-file.

I assume that the \hspace*{\lscore{hoffset}} should do the thing, but \lyscore{hoffset} just returns 0pt.

Thank you for your kind help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant