|
From: | Trevor Daniels |
Subject: | Re: Escaping text in title and composer? |
Date: | Mon, 27 Oct 2008 17:05:46 -0000 |
Myron It's not that easy. The LilyPond syntax is context-dependent, so a character which is fine in lyricmode might cause an error when used where a duration was expected, and a digit in a variable name is an error but correct for a duration, to give just two examples. In fact almost any character encoded as utf-8 can be entered in lyrics mode, but many of these would be invalid almost anywhere else. Trevor----- Original Message ----- From: "Myron Marston" <address@hidden>
To: "Bailey James E." <address@hidden> Cc: <address@hidden> Sent: Monday, October 27, 2008 4:20 PM Subject: Re: Escaping text in title and composer?
Don't worry about the web application part--my only point there was that I don't just need to fix the title for this particular .ly file; I need to write a function to escape (or maybe remove) characters that will preventlilypond from parsing the .ly files. I can deal with these characters on a case-by-case trial-and-error basis when lilypond fails (since my web app is setup to email me anytime an error occurs), but if someone knows the details of what characters will cause problems for lilypond and how to escape them,that would be really helpful. On Mon, Oct 27, 2008 at 1:08 AM, Bailey James E. < address@hidden> wrote:title and composer accept normal text markups. I know nothing about webapplications, but in a normal lilypond file, if I wanted the composer to be,say, "me\you", I would make it composer = \markup "me\you". Am 27.10.2008 um 03:33 schrieb Myron Marston: I have a web application (http://fractalcomposer.com) that uses lilypondto generate the notation for user's compositions. The user enters a title and their name when they submit the piece to the library at the website, and these fields are put directly in the .ly file as the title and composer of the piece. Unfortunately, I had a user type in a piece title using a doublequote (") and lilypond failed with an error ("syntax error, unexpectedSTRING") because of the extra double quote. In this case I think it was atypo (an apostrophe is certainly what the user meant), but I would like lilypond to succeed regardless of the junk the user types in to the title and name fields. I'm thinking I have to escape the text in the title andcomposer in the header section of my .ly file. I can easily change " to \" in the text, but perhaps there are other characters that will cause lilypondto fail.What is the proper way to escape text in a .ly file? I looked through themanual and this mailing list but couldn't find anything about it. Thanks, Myron _______________________________________________ lilypond-user mailing list address@hidden http://lists.gnu.org/mailman/listinfo/lilypond-user
--------------------------------------------------------------------------------
_______________________________________________ lilypond-user mailing list address@hidden http://lists.gnu.org/mailman/listinfo/lilypond-user
[Prev in Thread] | Current Thread | [Next in Thread] |