Comments (9)
Thank you for your report ; I'll have a glance at it from thursday.
from lyluatex.
Based on my examination of the code, it appears that the package is trying to make use of the --include
option when invoking LilyPond. That is, it is supposed to --include
the directory of the original source file, thereby adding it to the search path for input files. If that's the case, then I don't know why it's not working.
I have two ideas for an alternate implementation, one of which I'm fairly certain is viable, the other I have more questions about (and which I've sent an inquiry to the LilyPond user list to discover the necessary answers):
-
My fairly certain option involves not copying the contents of source file into the file written to tmp_ly when adding the header, but using an
\include
statement instead. You'd also need to add#(ly:set-option 'relative-includes #t)
to the top of the header file so that the LilyPond looks for included files relative to the file being currently read instead of the root file (which would be our dummy file in tmp_ly). In this case, since the source file is being read from its original location, all included files will be in the correct relative positions without needing to copy them into a new tree. -
The less certain option is to create a project
init.ly
file in tmp_ly to which the current header has been added as a footer. In this case invoking LilyPond with--init="lyluatex_init.ly"
on the original source file would produce the appropriate files. This has the advantage of each project only needing to create one new source file:lyluatex_init.ly
. This would, therefore, eliminate the need for lua to read the original file and md5 hash its contents (which is added to the filename of the file created in tmp_ly to prevent name conflicts) and thus give a performance boost (perhaps only noticeable if ly files are really big or there are a lot of them). Having never created a custominit.ly
file before, I'm less certain this will work, but I've asked on the LilyPond user list for some more information to see if this is really possible.
from lyluatex.
Excuse me, I've just begun looking at that…
But when I go to the Scores
dir, and launch lilypond OurFather.ly
, I get the error below.
I've tried replacing all bflat by bf, and I don't get errors any more, neither with lilypond
alone, nor with lualatex
.
GNU LilyPond 2.19.47
Traitement de « OurFather.ly »
Analyse...
OurFather.ly:13:196: Erreur : syntax error, unexpected STRING
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g
bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g bflat> \bar "|" <g bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:196: Erreur : chaîne non reconnue ; en dehors d'un script textuel ou de \lyricmode
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g
bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g bflat> \bar "|" <g bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:216: Erreur : syntax error, unexpected STRING
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g
bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g bflat> \bar "|" <g bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:216: Erreur : chaîne non reconnue ; en dehors d'un script textuel ou de \lyricmode
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g
bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g bflat> \bar "|" <g bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:392: Erreur : syntax error, unexpected STRING
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g
bflat> <g bflat> \bar "|" <g bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:392: Erreur : chaîne non reconnue ; en dehors d'un script textuel ou de \lyricmode
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g
bflat> <g bflat> \bar "|" <g bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:402: Erreur : chaîne non reconnue ; en dehors d'un script textuel ou de \lyricmode
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g
bflat> \bar "|" <g bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:421: Erreur : syntax error, unexpected STRING
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g bflat> \bar "|" <g
bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:421: Erreur : chaîne non reconnue ; en dehors d'un script textuel ou de \lyricmode
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g bflat> \bar "|" <g
bflat>2 <g bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:432: Erreur : syntax error, unexpected STRING
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g bflat> \bar "|" <g bflat>2 <g
bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:13:432: Erreur : chaîne non reconnue ; en dehors d'un script textuel ou de \lyricmode
a2 g4 f g g \bar "|" g2 g4 f g a a \bar "||" <f a>2 <c g'>4 <d f> <c g'> <c g'> \bar "|" <c g'>2 <f a> \bar "|" <f a>4 <f a> <c g'> <d f> \bar "|" <d f>2 <c g'> \bar "|" <c g'>4 <f a> <g bflat>2 \bar "|" <g bflat> <c, g'>4 <f a>2 \bar "|" <f a>4 <f a> <f a> <c g'> <d f> <c g'> <c g'> <c g'> \bar "|" <c g'>2 <c g'>4 <f a> <f a> <c g'> <d f> <d f>^- \bar "|" <d f>2 <c g'>4 <f a> <g bflat> <g bflat> \bar "|" <g bflat>2 <g
bflat>4^- <c, g'>^- <f a> <f a>^- \bar "|."
OurFather.ly:5:1: Erreur : suite à des erreurs répétées, l'expression musicale sera ignorée
<<
erreur fatale : erreur sur les fichiers "OurFather.ly"
from lyluatex.
There's a syntax change in the english note names some time in the 2.19 cycle. flat
and sharp
became -flat
and -sharp
(the short form of the names f
and s
remained the same). The files need to be run through convert-ly to work with 2.19.53.
Here's what I get (including log files) after bringing them up to date and trying again (note, on my system lilypond
refers to 2.18.2 while lilypond-def
is 2.19.53):
Test_Lily_include .zip
from lyluatex.
I think the problem comes from the space at the end of the name of Test_Lily_include folder : if I remove it, then clean files within it, this works.
from lyluatex.
I hadn't noticed that spurious space but after removing it, and removing the space in the enclosing folder of that one on my system, everything worked fine.
So then the real problem is that the path to the include directory is not quoted, and thus can't have any spaces in it.
from lyluatex.
Should be fixed in 549af4d.
from lyluatex.
Works for me. Thanks for the fix.
from lyluatex.
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 5
- 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' HOT 1
- 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.