Re: Inputting special symbols
Hi. If you want to concatenate two strings, one method is to set the word-space property to zero: \markup{\override #'(word-space . 0) \line {1\super st } clarinet } Fine! It was the \line which I was missing... Thanks, Gilles ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
On Wednesday 11 January 2006 15.39, Gilles wrote: Hi. because Lilypond inserts a space between any two markup components. I noticed that too, and I'd tend to consider this as a bug. no, it's the intended behaviour of markup. It could be possible to write a markup function that concatenates markup words, something like \concatenate { sym \eaigu trique }. I think such a function would be fairly easy to write, but I don't know because I haven't looked at the code. It might be a sponsorable feature. Wouldn't it be more logical to do that by default, instead of having to call a function explicitely to remove something (space) which wasn't there in the first place? And there is also the reverse behaviour: Blank spaces at the beginning or end of double-quoted strings are trimmed. Sorry for not replying. I don't consider this a bug; that behaviour is intended. Then, maybe could you explain the rationale behind the intention? I.e for outputting the opposite of the user's input: 1. Add a space where there was none I think the current default behaviour is useful in situations like this: { c^ \markup { left \column { up down } right } } or { c^ \markup { bla bla bla } } 2. Remove a space where the user wants one I think this has to do with bounding box calculations, but I'm not sure. -- Erik ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Gilles wrote: Hi. because Lilypond inserts a space between any two markup components. I noticed that too, and I'd tend to consider this as a bug. no, it's the intended behaviour of markup. It could be possible to write a markup function that concatenates markup words, something like \concatenate { sym \eaigu trique }. I think such a function would be fairly easy to write, but I don't know because I haven't looked at the code. It might be a sponsorable feature. Wouldn't it be more logical to do that by default, instead of having to call a function explicitely to remove something (space) which wasn't there in the first place? The current behaviour is certainly logical and intuitive. Your proposal would imply that a markup such as \markup{\bold Allegro molto } would appear as Allegromolto! Of course you are right that there should be a way to concatenate markups. Some programming languages, like Java, use a plus-sign or some other character to denote string concatenation, sym + \eaigu + trique, but as Han-Wen would say, that's syntactic sugar. In this particular case, it seems like a much better solution to use a text editor that handles UTF-8, but that's of course another discussion. /Mats ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Well, there is another case when this extra space is not nice and when UTF-8 cannot make it: \markup{ 1\super st clarinet } (space between 1 and st). Fred In this particular case, it seems like a much better solution to use a text editor that handles UTF-8, but that's of course another discussion. /Mats ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
On Tuesday 10 January 2006 05.15, liang seng wrote: Hi, I'm just wondering if we can use utf-8 to input Chinese (or other Asian) characters as well? Yes, see input/sakura-sakura.ly -- Erik ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
On Thursday 05 January 2006 12.25, Gilles wrote: Hello. The problem I've had with that is that when I define eaigu = the utf-8 double byte for é and then (later) say \markup sym \eaigu trique what I get in the PDF file is sym é trique because Lilypond inserts a space between any two markup components. I noticed that too, and I'd tend to consider this as a bug. no, it's the intended behaviour of markup. It could be possible to write a markup function that concatenates markup words, something like \concatenate { sym \eaigu trique }. I think such a function would be fairly easy to write, but I don't know because I haven't looked at the code. It might be a sponsorable feature. And there is also the reverse behaviour: Blank spaces at the beginning or end of double-quoted strings are trimmed. Sorry for not replying. I don't consider this a bug; that behaviour is intended. -- Erik ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Hi. because Lilypond inserts a space between any two markup components. I noticed that too, and I'd tend to consider this as a bug. no, it's the intended behaviour of markup. It could be possible to write a markup function that concatenates markup words, something like \concatenate { sym \eaigu trique }. I think such a function would be fairly easy to write, but I don't know because I haven't looked at the code. It might be a sponsorable feature. Wouldn't it be more logical to do that by default, instead of having to call a function explicitely to remove something (space) which wasn't there in the first place? And there is also the reverse behaviour: Blank spaces at the beginning or end of double-quoted strings are trimmed. Sorry for not replying. I don't consider this a bug; that behaviour is intended. Then, maybe could you explain the rationale behind the intention? I.e for outputting the opposite of the user's input: 1. Add a space where there was none 2. Remove a space where the user wants one Thanks, Gilles ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Gilles wrote: Then, maybe could you explain the rationale behind the intention? I.e for outputting the opposite of the user's input: 1. Add a space where there was none If you have a suggestion how to improve this, I will gladly take patches. The relevant code is in scm/markup.scm. 2. Remove a space where the user wants one I think this is Pango's doing. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Hi, I'm just wondering if we can use utf-8 to input Chinese (or other Asian) characters as well? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
On 1/5/06, Werner LEMBERG [EMAIL PROTECTED] wrote: Byte Order Mark is only applicable to UTF-16. There's no such thing as an editor that puts a Byte Order Mark in UTF-8. This is not correct. UTF-8 can also start with BOM. The same is true for UTF-32. Thanks for the information. I've been using Unicode for ten years, and I never knew this. Surely enough, it's an FAQ: http://www.unicode.org/unicode/faq/utf_bom.html#25 - Kurt ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Hi. And . . . also . . . : Blank spaces at the beginning or end of double-quoted strings are trimmed. That's true. To get spaces between non-space \markup items you can write things like \markup { foo \hspace #10 bar } Yes, I knew about the \hspace command, but I still find it strange that blank space is *completely* trimmed. I agree that a typesetting program should decide what's the best size for a blank space (and hence compress several consecutive spaces into one, like TeX does) but not suppress them altogether. Best, Gilles ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Hello. The problem I've had with that is that when I define eaigu = the utf-8 double byte for é and then (later) say \markup sym \eaigu trique what I get in the PDF file is sym é trique because Lilypond inserts a space between any two markup components. I noticed that too, and I'd tend to consider this as a bug. And there is also the reverse behaviour: Blank spaces at the beginning or end of double-quoted strings are trimmed. This was reported in http://lists.gnu.org/archive/html/lilypond-user/2005-11/msg00277.html but I didn't get any reply to confirm the bug. Best, Gilles ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
On 1/2/06, fiëé visuëlle [EMAIL PROTECTED] wrote: Am 2006-01-02 um 12:43 schrieb liang seng: Hi, I'm using Lilypond 2.7.x series for Windows 98 and I would like to know how can we input special characters into Lilypond using standard word editors like Notepad? I would like to put the word piu forte in a text markup, but with a backslash on top of the u in piu. I tried using Alt+151 (the symbol ù) to enter that character but it was not shown in the pdf output. Is there a way to do this? This is a FAQ. You need to use an editor that is able to handle UTF-8 encoding (preferably without Byte Order Mark). Could you please clarify this point? Byte Order Mark is only applicable to UTF-16. There's no such thing as an editor that puts a Byte Order Mark in UTF-8. - Kurt ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Byte Order Mark is only applicable to UTF-16. There's no such thing as an editor that puts a Byte Order Mark in UTF-8. This is not correct. UTF-8 can also start with BOM. The same is true for UTF-32. Werner ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
With the word-space override you suggest (below), that means that your comment of a few weeks ago that it _might_ be desirable to redefine \char #unicode-number to produce a utf-8 byte string is true: this would in fact be useful for people who need, infrequently, to insert various odd special characters in their Lilypond text, such as an em-dash, a capital Greek delta, or a 1/2-sign, or who need to print titles in languages, such as Portuguese or Romanian, that have, in addition to the usual panoply of European characters, just a few oddball characters. Even for a text editor that can _save_ in utf-8, _inputting_ the required character directly presumably requires a character map, and at this point I don't know that any really extensive character maps exist. I realize that implementing a new \char is not trivial, since the utf-8 coding algorithm is such a mess. -- Tom On Thu, 5 Jan 2006, Han-Wen Nienhuys wrote: [EMAIL PROTECTED] wrote: The problem I've had with that is that when I define eaigu = the utf-8 double byte for é and then (later) say \markup sym \eaigu trique what I get in the PDF file is sym é trique because Lilypond inserts a space between any two markup components. try \override #'(word-space . 0) { sym \eaigu trique } -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Gilles wrote: And . . . also . . . : Blank spaces at the beginning or end of double-quoted strings are trimmed. That's true. To get spaces between non-space \markup items you can write things like \markup { foo \hspace #10 bar } That trick doesn't work for getting spaces at the end (I think I recall that some people wanted such a thing for instrument names to be placed to the left of the staff). I don't know whether the following would work -- \markup {foo \hspace #10 utf-8 byte codes for an invisible char} -- because I haven't tried it. By an invisible character I mean something like a non-break space or an extra-thin or extra-wide space; I know that such things exist in Unicode. -- Tom ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Hi, does this mean that I cannot input these special characters using Windows 98 platform and using Notepad? Are there other alternatives? I think there are hardly any people on this list who use W98 and Notepad. However, I do, and there is a work-around. I will e-mail you directly a file with a table showing the pair of characters you have to insert in your Notepad file in order to get any specific Latin-1 character. Disadvantages: -- the table covers only Latin-1 characters (French, Spanish, Italian, German -- but not Greek, Russian, Czech, Romanian,...); -- the characters will look OK in the final PDF file, but in the Notepad file *itself* you will see, for every desired accented character, a weird-looking pair of symbols; -- this is a slow way to insert utf-8 characters, so it would be suitable only if you need to insert just a *few* utf-8 characters here and there. I won't attach the conversion table to this message, as I think the list administrators don't want big attachments, and I think there is nearly zero interest in this problem anyway, as almost all other users are using utf-8-capable text editors. -- Tom ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
liang seng wrote: Hi, do you mean that on Windows XP, the word editors (like Notepad) are able to save text files in utf-8 code? Exactly! (Since I don't have WinXP, I don't know if that is possible) I may have to borrow a colleague's computer with Win XP to continue my work. As I have already pointed out, there are lots of other text editors available (for free), for example jEdit or Emacs, that can do the same trix and should work also on Win98. /Mats ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Hi, I would like to thank you for providing the workaround. If you don't mind, can I ask what code or language is this workaround based on? (Like why does one need to input two pairs of number combinations to obtain a symbol) This will do well for me. Since I only need the symbol (più) twice for the entire work. Thanks again. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
On Wednesday 04 January 2006 08:59, [EMAIL PROTECTED] wrote: Notepad file *itself* you will see, for every desired accented character, a weird-looking pair of symbols; -- this is a slow way to insert utf-8 characters, so it would be suitable only if you need to insert just a *few* utf-8 characters here and there One way around that is to give each symbol a ascii name like grave or whatever is meaningful to you. Then you just insert \your-name-here when you want that symbol. G ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
On 3-Jan-06, at 7:26 PM, liang seng wrote: Hi, do you mean that on Windows XP, the word editors (like Notepad) are able to save text files in utf-8 code? (Since I don't have WinXP, I don't know if that is possible) I may have to borrow a colleague's computer with Win XP to continue my work. Why not just look for another editor? I'm sure you can find a text editor for windows (whatever version you use) that can save as utf-8. I'm certain that jedit can do this, for example. Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
-- this is a slow way to insert utf-8 characters, so it would be suitable only if you need to insert just a *few* utf-8 characters here and there One way around that is to give each symbol an ascii name like grave or whatever is meaningful to you. Then you just insert \your-name-here when you want that symbol. The problem I've had with that is that when I define eaigu = the utf-8 double byte for é and then (later) say \markup sym \eaigu trique what I get in the PDF file is sym é trique because Lilypond inserts a space between any two markup components. -- Tom ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
. . . If you don't mind, can I ask what code or language is this workaround based on? (Like why does one need to input two pairs of number combinations to obtain a symbol) This is based on Unicode, but that doesn't really answer your question, as Unicode is nothing but a catalogue of thousands of symbols, with each symbol assigned a Unicode number, which is just the catalogue-number of the symbol. Starting from a symbol's Unicode number, one can use an encoding algorithm to produce a sequence of bytes that represents the symbol in a real text file. The problem is that, historically, there have been invented several *different* encoding algorithms, and you have to know which encoding algorithm you are using. The two currently dominant encoding algorithms are called UTF-16 and UTF-8. Lilypond uses UTF-8. (To some extent, Microsoft products use Unicode, but they use UTF-16. At least that is the case in the old Microsoft software I use, but my guess is that Microsoft will stick with UTF-16, because if it switched to UTF-8, then that would invalidate a huge existing repository of Visual Basic programs.) A UTF-8 character takes up either 1 or 2 or 3 or 4 or 5 or 6 bytes. That fact alone will tell you that understanding UTF-8 is not easy. If you really want to know the story, I recommend the following two Web sites for starters: http://www.tenminutetutor.com On this site, the Articles box on the left of the page contains 9 links. Click on and read the following 3: Unicode UTF-8 UTF-16 http://en.wikipedia.org/wiki/UTF-8 This gives more information on UTF-8 and also presents an illuminating comparison of UTF-8 to UTF-16. -- Tom ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Did you read the section called Editor support in the manual? Especially, jEdit seems like a good alternative on all platforms. /Mats liang seng wrote: Hi, does this mean that I cannot input these special characters using Windows 98 platform and using Notepad? Are there other alternatives? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user -- = Mats Bengtsson Signal Processing Signals, Sensors and Systems Royal Institute of Technology SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe = ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Hi, do you mean that on Windows XP, the word editors (like Notepad) are able to save text files in utf-8 code? (Since I don't have WinXP, I don't know if that is possible) I may have to borrow a colleague's computer with Win XP to continue my work. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Inputting special symbols
Hi, I'm using Lilypond 2.7.x series for Windows 98 and I would like to know how can we input special characters into Lilypond using standard word editors like Notepad? I would like to put the word piu forte in a text markup, but with a backslash on top of the u in piu. I tried using Alt+151 (the symbol ù) to enter that character but it was not shown in the pdf output. Is there a way to do this? Thanks in advance. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
I don't know about the capabilities of NotePad in Windows 98, but on newer Windows versions, you can easily choose to save the file as UTF-8, which is what LilyPond needs. /Mats liang seng wrote: Hi, I'm using Lilypond 2.7.x series for Windows 98 and I would like to know how can we input special characters into Lilypond using standard word editors like Notepad? I would like to put the word piu forte in a text markup, but with a backslash on top of the u in piu. I tried using Alt+151 (the symbol ù) to enter that character but it was not shown in the pdf output. Is there a way to do this? Thanks in advance. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user -- = Mats Bengtsson Signal Processing Signals, Sensors and Systems Royal Institute of Technology SE-100 44 STOCKHOLM Sweden Phone: (+46) 8 790 8463 Fax: (+46) 8 790 7260 Email: [EMAIL PROTECTED] WWW: http://www.s3.kth.se/~mabe = ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Am 2006-01-02 um 12:43 schrieb liang seng: Hi, I'm using Lilypond 2.7.x series for Windows 98 and I would like to know how can we input special characters into Lilypond using standard word editors like Notepad? I would like to put the word piu forte in a text markup, but with a backslash on top of the u in piu. I tried using Alt+151 (the symbol ù) to enter that character but it was not shown in the pdf output. Is there a way to do this? This is a FAQ. You need to use an editor that is able to handle UTF-8 encoding (preferably without Byte Order Mark). Greetlings from Lake Constance --- fiëé visuëlle Henning Hraban Ramm http://www.fiee.net http://angerweit.tikon.ch/lieder/ http://www.cacert.org (I'm an assurer) ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Inputting special symbols
Hi, does this mean that I cannot input these special characters using Windows 98 platform and using Notepad? Are there other alternatives? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user