Comments (4)
I don't know why this error occurs. As a workaround for now, putting \def\repeat{}
before the ly
environment makes it work. I guess this has something to do with robust and fragile LaTeX commands, but this is a pure guess…
@rpspringuel, would you have an idea about that, please ?
from lyluatex.
The error is a LaTeX one, which implies that LaTeX is attempting to parse the contents of the environment, which is decidedly not what it should be doing. It should grab the environment contents as they are and pass them on to LilyPond. It's doing it at least partially, since \relative
and \repeat
are coming back as undefined commands. My best guess is that there's something in how \NewEnviron
sets things up so that the body of the environment gets stored in \BODY
(before handing it off to lua).
from lyluatex.
Yes, I also think that LaTeX somehow tries to process the content, which it shouldn't do.
Some more experiments with different contents of the ly
environment:
{ \set Staff.instrumentName = "Hallo" c' }
correctly works
{ \sffamily Staff.instrumentName = "Hallo" c' }
works for LaTeX but gives the expected LilyPond failure
\relative { \set Staff.instrumentName = "Hallo" c' }
compiles correctly
{ \repeat Staff.instrumentName = "Hallo" c' }
does not produce a LilyPond failure but the LaTeX error.
{ \r Staff.instrumentName = "Hallo" c' }
does produce the expected LilyPond failure but not a LaTeX error as does
{ \repea Staff.instrumentName = "Hallo" c' }
Interestingly
```lilypond
{ \\repeat Staff.instrumentName = "Hallo" c' }
does produce the LilyPond error and no LaTeX one.
{
\set Staff.instrumentName = "Hallo"
\repeat unfold 4 c'
}
also lets LaTeX fail with the usual error
So it seems specifically related to the \repeat
and neither to the fact there is a backslash command at the beginning nor to the combination \r
. Of course there may be other triggers for this error, and maybe looking into the sourece code of environ
may give some insight. Could it be that \repeat
is some kind of magic keyword in that package?
from lyluatex.
Yes, \repeat
seems very special ; I didn't see anything about it in the source of environ
, but it seems to be a plain TeX command to do a loop. LaTeX says it is undefined, but a \providecommand
in the sty
doesn't solve the problem…
As it seems (for now) that it is the only one to raise such a problem, I suggest merging #53 (after #52, on which it is based), that solves it. If we encounter other such problems, it will be time to open a specific issue.
from lyluatex.
Related Issues (20)
- \setmainfont causes problems HOT 6
- The score doesn't contain any music HOT 5
- MiKTeX with LilyPond 2.24: blank scores
- attempt to index a nil value ( field 'metadata') HOT 5
- lyluatex runs slowly on mac HOT 8
- Includepaths no longer working HOT 3
- Reuse precompiled files in different document HOT 3
- Some weird alignment issues when using a custom header HOT 3
- TexLive can't find Lilypond anymore HOT 5
- Make lyluatex work with LilyPond 2.25.4 and newer HOT 2
- Make lyluatex process LilyPond snippets in parallel HOT 6
- Error in lilypond-Log: "/bin/sh: 1: Syntax error: Unterminated quoted string" HOT 4
- Print copyright and tagline below song
- Suppress bar numbers HOT 2
- Large left padding with inline inserts HOT 5
- Can't compile on MacOS - bad argument #1 to 'rawget'
- Make lyluatex work with LilyPond v2.25.5 and newer
- Found something incompatible with `fragment` HOT 4
- Compilation fails when using `--output-dir=build` option
- included score is not horizontally centered. HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lyluatex.