lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lyLuaTeX, still troubles


From: David Kastrup
Subject: Re: lyLuaTeX, still troubles
Date: Thu, 19 Apr 2018 10:08:40 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Federico Bruni <address@hidden> writes:

> Il giorno mer 18 apr 2018 alle 18:37, Urs Liska
> <address@hidden> ha scritto:
>>
>> When you write \begin{lilypond}[] (note the square brackets) your
>> second example compiles.
>>
>> This recalls two separate issues we were struggling with (both of
>> which I haven't understood or touched):
>> a need to add an empty optional argument.
>> This has reportedly been fixed, but it seems not for every case.
>> Having some LaTeX keywords in the LilyPond code, IIRC \repeat was
>> among them.
>> I have the impression these two "work" together here.
>>
>> It would be good if you'd create an issue  on the tracker with the
>> examples.
>>
>
> I confirm your analysis: \repeat causes the error, unless [] is used.
>
> I found this issue:
> https://github.com/jperon/lyluatex/issues/51
>
> which was supposed to be fixed by this commit:
> https://github.com/jperon/lyluatex/pull/53/commits/01b9cd10aed6c118d19e337db29e049f20bc21af
>
> I've opened a new issue here:
> https://github.com/jperon/lyluatex/issues/194

The problem is that \repeat is equivalent to \fi in TeX/LaTeX in order
to allow for things like

\iffalse \loop \ifnum 3<2 ... \repeat \fi

to have matched conditionals.  That means that likely your lylatex code
uses something like

\if...  LilyPond code  \fi

somewhere.  The LilyPond code now contains an unmatched \fi and stuff
goes haywire.  The solution is to _never_ put it into conditionals.
Instead you use something like

\if... \expandafter address@hidden \else \expandafter address@hidden \fi
{LilyPond code} {alternative code}

and thus neither skipping or using the LilyPond code relies on matches
conditionals inside.

-- 
David Kastrup



reply via email to

[Prev in Thread] Current Thread [Next in Thread]