[Top][All Lists]

[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:
> which was supposed to be fixed by this commit:
> I've opened a new issue here:

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]