bug-lilypond
[Top][All Lists]
Advanced

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

Re: Special characters in filenames using "\lilypondfile" in lilypond-bo


From: André Rohrbach
Subject: Re: Special characters in filenames using "\lilypondfile" in lilypond-book
Date: Thu, 15 Feb 2018 10:15:39 +0100

Hi everyone

Found a solution for my issue.

Just wrote a little bash-script which does the following:
- replace all spaces with underlines in the filenames of the current directory
- running the lilypond-book preprocessor
- running the latex processor
- replace all underlines with spaces in the filenames of the current directory

Works pretty good if I refer to the files in the "\lilypondfile"
command with underlines instead of spaces.
But that's no problem for me.

Just have to avoid using underlines in the filenames because they will
be replaced in the end, but have no need for using underlines.
Don't have to replace other special characters like dots or single
quotes, they work without any problems.

So once again, it's just a workaround, but I'm pretty happy with it.

Best,
Andy

2018-02-14 9:33 GMT+01:00 Urs Liska <address@hidden>:
> Hi André,
>
> I'm not sure how it has been done but if you don't use lilypond-book but the
> new lyluatex package (obviously requiring LuaLaTeX) you *can* use spaces and
> special characters in file names.
>
> lyluatex (https://github.com/jperon/lyluatex) is a package that does
> everything lilypond-book does and more (actually it tries to be compatible
> with existing lilypond-book documents) but directly from within LaTeX (i.e.
> no preprocessor required).
>
> We're pretty close to a new release that includes this lilypond-book
> compatibility, for now you'd have to use the version from Github.
>
> HTH
> Urs
>
>
>
> Am 14.02.2018 um 08:49 schrieb André Rohrbach:
>>
>> Hi
>>
>> Thanks for your answers.
>>
>> I'm not expert in the technical internals of LilyPond and/or LaTeX,
>> but I'm pretty sure the problem could be solved in LilyPond.
>> Why?
>> Let's have a look of how LilyPond-embedding in LaTeX works:
>>
>> LaTeX itself knows nothing abount LilyPond and how to interpret *.ly
>> files.
>> In fact, die LilyPond-embedding commands like "\lilypondfile" are not
>> valid LaTeX syntax and end in an error of you try to interpret it with
>> LaTeX directly.
>>
>> To solve that, LilyPond provides a precompiler called "lilypond-book".
>> If you compile *.tex files with it, it will search for
>> LilyPond-embedding commands, interpret the LilyPond content, generates
>> vector graphic (*.eps) files for each line of the score and rewrites
>> the *.tex file.
>> The resulting *.tex file contains commands for embedding the generated
>> *.eps graphics.
>> These files have no need to know how these graphics where generated,
>> they're just embedded graphics and that's the reason why you could
>> interpret that correctly with LaTeX.
>>
>> Back to the topic:
>> It's possible that the problem is a LaTeX issue.
>> Maybe lilypond-book generates based on the original filename the
>> precompiling-objects (*.eps grahics and so on) with special characters
>> in the filenames which LaTeX can't handle.
>> But I guess LilyPond don't have to.
>> The resulting files of the lilypond-book precompiler are just
>> temporary objects and it's not relevant for the end-user how they're
>> called.
>> So the precompiler could generate these tempoorary objects without any
>> special characters in it and voilà... LaTeX will not have any problems
>> with them. :)
>>
>> To the argument "just don't use special characters becaus of the
>> possibility to switch the file system":
>> Yeah, you're right.
>> But file systems which can't handle special characters in filenames
>> are old file systems.
>> Most modern computers don't use file systems which can't handle that.
>> It's usual as computer user in 2018 to use filenames with special
>> characters in it.
>> So why should LaTeX/LilyPond be an exception?
>> Why not just enhance the products to fit the user's needs?
>> Prevent from using special characters in filenames is just a
>> workaround, not a solution.
>>
>> Best,
>> Andy
>>
>>
>> 2018-02-13 19:12 GMT+01:00 Simon Albrecht <address@hidden>:
>>>
>>> On 13.02.2018 14:36, André Rohrbach wrote:
>>>>
>>>> Just tried to use special characters (mostly spaces and single quotes)
>>>> in filenames while working with \lilypondfile.
>>>
>>>
>>> I’m pretty sure this is an issue with LaTeX syntax, not with LilyPond.
>>> Also, it’s good advice anyway to not use spaces in file names, in case
>>> you’ll share them with different file systems.
>>>
>>> Best, Simon
>>
>> _______________________________________________
>> bug-lilypond mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/bug-lilypond
>
>
>
> _______________________________________________
> bug-lilypond mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-lilypond



reply via email to

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