Re: Include file handling in lilypond-book

2017-07-12 Thread Federico Bruni



Il giorno mer 12 lug 2017 alle 1:54, Karljurgen Feuerherm 
 ha scritto:

Hello,

Putting together an exercise book using XeLaTeX and the lilypond 
environment. Everything works relatively well until I try to use an 
include file with variable definitions.


MWE:

% !TEX encoding = UTF-8 Unicode
% !TEX TS-program = LilyPond-Book
% !LILYPOND tex = xelatex
\documentclass{memoir}

% \newcommand{\Ggrace}{\grace { g''32 }}
\begin{document}
\begin{lilypond}
{
  \include "lilypond-variables.ly"



Move this \include outside the {} music expression and put it right 
after \begin{lilypond}.

Just like in the code that works fine in Frescobaldi ;-)



  \time 2/4
  \grace { g''32 } g'4  \Ggrace a'4  \Ggrace b'4  
\Ggrace c''4

  \Ggrace d''4 \Ggrace e''4 \Ggrace f''4 g''4
  a''2 g''4 f''4 \Ggrace e''4
  \Ggrace d''4 \Ggrace c''4 \Ggrace b'4  \Ggrace a'4
  \Ggrace g'4
  \bar "||"
}
\end{lilypond}
\end{document}

LILYPOND-VARIABLES.LY:

Ggrace = {  \grace { g''32 }  }





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


Re: Include file handling in lilypond-book

2017-07-12 Thread Karljurgen Feuerherm
Hi Marc,

Good suggestion, but yes, I tried that, didn’t work. It seems that the include 
file is read, because the compiler doesn’t whine about undefined Ggrace, but 
that the variable is not expanded. I’m thinking a deficiency in the python 
script?

K

On 2017-07-12, 04:00, "lilypond-user on behalf of Marc Hohl" 
 
wrote:

Am 12.07.2017 um 01:54 schrieb Karljurgen Feuerherm:
> Hello,
> 
> Putting together an exercise book using XeLaTeX and the lilypond 
> environment. Everything works relatively well until I try to use an 
> include file with variable definitions.
> 
> MWE:
> 
>  % !TEX encoding = UTF-8 Unicode
> 
>  % !TEX TS-program = LilyPond-Book
> 
>  % !LILYPOND tex = xelatex
> 
>  \documentclass{memoir}
> 
> % \newcommand{\Ggrace}{\grace { g''32 }}
> 
>  \begin{document}
> 
>  \begin{lilypond}
> 
>  {
> 
>\include "lilypond-variables.ly"

I don't know if I remember correctly, but I think I stumbled upon this 
problem before.
Have you tried to include a relative path?

\include "./lilypond-variables.ly"

   ^^

HTH,

Marc

___
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


Re: Include file handling in lilypond-book

2017-07-12 Thread Marc Hohl

Am 12.07.2017 um 01:54 schrieb Karljurgen Feuerherm:

Hello,

Putting together an exercise book using XeLaTeX and the lilypond 
environment. Everything works relatively well until I try to use an 
include file with variable definitions.


MWE:

 % !TEX encoding = UTF-8 Unicode

 % !TEX TS-program = LilyPond-Book

 % !LILYPOND tex = xelatex

 \documentclass{memoir}

% \newcommand{\Ggrace}{\grace { g''32 }}

 \begin{document}

 \begin{lilypond}

 {

   \include "lilypond-variables.ly"


I don't know if I remember correctly, but I think I stumbled upon this 
problem before.

Have you tried to include a relative path?

\include "./lilypond-variables.ly"

  ^^

HTH,

Marc

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