Re: Indent
Hello Dimitri, \layout can be specified both global as wel as per score. So if you want to have no indent in a specific excerpt you can do \score { ... \layout { indent = 0 } } Cheers, Valentin Am Freitag, 2. Juni 2023, 16:51:58 CEST schrieb Dimitri Sykias: > I have some musical examples separated by text. > Each musical example is intended using a layout block with indent = #8, > although in some examples I want an indent = #0. How can I achieve this? > Thanks for your help. > > \layout { > indent = #8 > #(layout-set-staff-size 20) > ragged-last = ##t > } signature.asc Description: This is a digitally signed message part.
Re: Indent within a score
Павел wrote: How to make indent in the middle of a score (not first system)? In some cases, it would be very convenient. Because additional score blocks "break" the logic of input and lead to other problems: additional spaces between systems, resetting bar numeration, rehearsal marks, etc... Have a look at http://lsr.di.unimi.it/LSR/Item?id=1098 (and be sure to read all the small print) Cheers, Robin
Re: indent in \paper for a multiple-books file not working?
2018-05-25 15:05 GMT+02:00: > Usually, placing the \layout block inside a \score block seems to work Thanks for your reply. I was aware of this possibility, though. Quoting the NR \paper variables for shifts and indents " indent The level of indentation for the first system in a score. If the paper size is modified, this dimension’s default value is scaled accordingly. The space within line-width available for the first system is reduced by this amount. indent may also be specified in \layout blocks to set indents on a score-by-score basis. " So I'd like to decide wether the quoted passage is not complete (indent in toplevel-output-def for multiple books should be specified in \layout instead of \paper) or if it's a bug. Cheers, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent in \paper for a multiple-books file not working?
Usually, placing the \layout block inside a \score block seems to work Mensagem Original Ativo 25 de mai de 2018 08:55, Thomas Morley escreveu: Hi, while trying to set a \paper in a file with multiple books I noticed the `indent'-setting is not working. One can do so in layout, though. Is it a bug or feature? All other toplevel settings (header, layout) are respected and/or modified by new settings inside of the books as wished. \paper { ragged-right = ##f indent = 70 } \header { dedication = "for me" } \layout { \override NoteHead.color = #cyan %indent = 70 } \book { \paper { #(set-paper-size "a3landscape") } \header { title = "book1" } { c'1 } } \book { \paper { #(set-paper-size "a5") } \header { title = "book2" } { d'1 } } Thanks, Harm ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent vs reformat
Am 08.01.2014 09:44, schrieb Martin Tarenskeen: Hi, It's not quite clear to me what the difference is between indent and reformat using python-ly ? a) it's the same as using the respective commands inside Frescobaldi. b) Indent only takes care of the indent levels of the code lines. Reformat performs addditional tasks. From the ly source files: Add newlines around indent and dedent tokens where needed. If there is stuff after a { or (that's not closed on the same line) it is put on a new line, and if there if stuff before a } or , the } or is put on a new line. It is necessary to run the indenter again over the same part of the document, as it will look garbled with the added newlines. Move line comments with more than 2 comment characters to column 0. Removes whitespace from all lines in the cursor's range. HTH Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Indent only one system, replace long extender with dashes
Hi, Frederick, my e-mail from yesterday night was rejected; some server on it's way is currently blacklisted by SpamCop. Hope it works this time, Alexander P.S.: Still no idea about indenting the system, other than starting a new score at this place... :-( Alexander Kobel wrote: Frederick Dennis wrote: Dear All, \version 2.12.2 How do you indent just one system? Hi, Frederick, perhaps I'm just tired, but no idea right now for this one. Also, the section is voices singing: Ah. I used a hidden slur to get an extender ...which is not what you should do. Have a look at \melisma and \melismaEnd. but would rather have a line of dashes as the extenders look ugly to my mind. How do I replace a long extender with a row of dashes? Look at the attached file. You might want to play around with all the properties of the lyric-hyphen-interface (see http://lilypond.org/doc/v2.13/Documentation/internals/lyric_002dhyphen_002dinterface#lyric_002dhyphen_002dinterface), since those are not set by default for LyricExtenders. I also added a little offset in X-direction - if you also think the extender is too short without this override, you could also try a hidden note as the last one in the melisma, but for me this looks worse since it corrupts the overall spacing. Your mileage may vary, though. Cheers, Alexander mel = { c4\melisma d e f8 g\melismaEnd | \break c1 } % with hidden note: (instead of the third override) % mel = { c4\melisma d e f8[ g8*1/2] \hideNotes g\unHideNotes \melismaEnd | \break c1 } lyr = \lyricmode { \once \override Lyrics . LyricExtender #'stencil = #ly:lyric-hyphen::print \once \override Lyrics . LyricExtender #'dash-period = #2.5 \once \override Lyrics . LyricExtender #'extra-offset = #'(2 . 0) long-melisma __ next-syllable } \score { \new Staff \new Voice = mel \mel \new Lyrics \lyricsto mel \lyr } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Indent only one system, replace long extender with dashes
Frederick Dennis wrote: Dear All, \version 2.12.2 How do you indent just one system? Hi, Frederick, perhaps I'm just tired, but no idea right now for this one. Also, the section is voices singing: Ah. I used a hidden slur to get an extender ...which is not what you should do. Have a look at \melisma and \melismaEnd. but would rather have a line of dashes as the extenders look ugly to my mind. How do I replace a long extender with a row of dashes? Look at the attached file. You might want to play around with all the properties of the lyric-hyphen-interface (see http://lilypond.org/doc/v2.13/Documentation/internals/lyric_002dhyphen_002dinterface#lyric_002dhyphen_002dinterface), since those are not set by default for LyricExtenders. I also added a little offset in X-direction - if you also think the extender is too short without this override, you could also try a hidden note as the last one in the melisma, but for me this looks worse since it corrupts the overall spacing. Your mileage may vary, though. Cheers, Alexander mel = { c4\melisma d e f8 g\melismaEnd | \break c1 } % with hidden note: (instead of the third override) % mel = { c4\melisma d e f8[ g8*1/2] \hideNotes g\unHideNotes \melismaEnd | \break c1 } lyr = \lyricmode { \once \override Lyrics . LyricExtender #'stencil = #ly:lyric-hyphen::print \once \override Lyrics . LyricExtender #'dash-period = #2.5 \once \override Lyrics . LyricExtender #'extra-offset = #'(2 . 0) long-melisma __ next-syllable } \score { \new Staff \new Voice = mel \mel \new Lyrics \lyricsto mel \lyr } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Greetings, Martin Tarenskeen - I'd like to use your indent-ly. I copied and saved it from http://www.home.zonnet.nl/m.tarenskeen/tmp/indent-ly and named the new file indent-ly, but I'm not an experienced programmer, and I have some questions. Where should I put indent-ly? Does it need a file extension? What are the options, and how can I invoke them? I'm grateful for the work you've done on this and appreciate your sharing of the file. Ralph On Fri, Oct 23, 2009 at 7:57 AM, Martin Tarenskeen m.tarensk...@zonnet.nlwrote: Hi, I'm still working on indent-ly. New in current version as requested: - Backup files before overwriting. I'm giving these files names like infile.ly.1, infile.ly.2, etcetera. You don't loose files unless you delete them by hand. - Try to keep scheme stuff untouched ( needs improvement ) - Don't expand tabs in the middle of lines - Read from stdin if no inputfile specified You can find today's version here as usual: http://www.home.zonnet.nl/m.tarenskeen/tmp/indent-ly -- Martin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user -- Ralph Palmer Montague City, MA USA palmer.r.vio...@gmail.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Hi, Op dinsdag 20 oktober 2009 schreef Martin: Would be nice if he could also integrate such functionality in Frescobaldi: Be able to re-indent a complete score with a mouseclick from inside the Frescobaldi screen would be great ! ( Just like indent-ly has been integrated into frescobaldi.) Or is it already possible ? Frescobaldi already has a LilyPond indenting command, using the indent.py script referred to in issue 777. The command is in menu LilyPond-Source document-Align. It works slightly better than the KatePart builtin indent at Tools-Align. My indent script can also be used standalone, with some work it could support multiple files, etc. It handles scheme code quite nice. best regards, Wilbert Berendsen -- Frescobaldi, LilyPond editor for KDE: http://www.frescobaldi.org/ Nederlands LilyPond forum: http://www.lilypondforum.nl/ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Op donderdag 22 oktober 2009 schreef Bertalan: Now, the real problem I see with this approach is that no perfect formatting (which is not the same as indentation) can be done without actually parsing the input. I think this is true; my indent script[1] includes a basic parser. It knows when to switch from LilyPond to Scheme mode and back again and also supports LilyPond code in Scheme. It also has a nice feature that line-comments starting with three %%% or ;;; are not indented, because that comment style if often used to mark big sections of LilyPond or Scheme input. The scheme indenting currently works like this: If an opening parenthesis is found, the following 10 characters are searched for another one (before closing one or newline). If there is another opening parenthesis on the same line, the next line is aligned the same way. If none is found, the normal indent is used. (default 2). [1] http://code.google.com/p/lilykde/source/browse/trunk/frescobaldi/python/ly/indent.py best regards, Wilbert Berendsen -- Frescobaldi, LilyPond editor for KDE: http://www.frescobaldi.org/ Nederlands LilyPond forum: http://www.lilypondforum.nl/ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Hi, I'm still working on indent-ly. New in current version as requested: - Backup files before overwriting. I'm giving these files names like infile.ly.1, infile.ly.2, etcetera. You don't loose files unless you delete them by hand. - Try to keep scheme stuff untouched ( needs improvement ) - Don't expand tabs in the middle of lines - Read from stdin if no inputfile specified You can find today's version here as usual: http://www.home.zonnet.nl/m.tarenskeen/tmp/indent-ly -- Martin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Fri, 23 Oct 2009, eluze wrote: Also new in today's version: If no input file is specified indent-ly reads from stdin. works - how do you stop stdin? (i used ctrl+z) Ctrl + d ? -- Martin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Fri, Oct 23, 2009 at 05:01:37PM +0200, Martin Tarenskeen wrote: works - how do you stop stdin? (i used ctrl+z) Ctrl + d ? You're both right. CTRL-z is Windows's way of signalling end-of-input; CTRL-d is likewise for POSIX-compliant systems. You can also do program file on both systems, and the contents of the file you name get to be the stdin of the program you name, without needing CTRL-anything. -- There is no such thing as a small specification change. http://surreal.istic.org/ The revolution will not be snowcloned. signature.asc Description: Digital signature ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Now, the real problem I see with this approach is that no perfect formatting (which is not the same as indentation) can be done without actually parsing the input. Complete parsing of LilyPond input is _impossible_ without LilyPond itself. For example you need to format LilyPond code _inside_ Scheme code (remember the #{ construct used in define-music-function) So a standard formatting engine can only be written inside LilyPond, or at least using LilyPond to generate metadata describing the structure of the input. Bert Martin Tarenskeen wrote: On Wed, 21 Oct 2009, Graham Percival wrote: - it would be nice to have an option to replace the file directly instead of having to copy/paste the resulting file Definitely! Done in latest version. Use -m (--modify) Be careful: This version overwrites the original file without making a backup ( infile.ly~ )first. Maybe I should add that in the next version. - scheme code is not handled (or indented uniformly) Yes, scheme code should be formatted in the scheme way. I know very very little about scheme. Some example lilypond files with much scheme code might help. - if within brackets there are tabs after the code and before the end-bracket they are replaced by a bunch of blanks Hmm, I'm not certain how often this would come into play. I use tabs sometimes for indenting lines, but I haven't seen anyone using tabs in the middle of a line of lilypond code - in my programming style i prefer to have the endbracket aligned with the code above - maybe with an additional option this could be solved!? I'd argue against this -- the point of a unified style / indentation scheme is that it's *standard*. ... I don't think we should have many options at all. I agree B One more item to consider: whitespace at the ends of lines should be stripped. I thought I already did that ? I'll look in to it. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Bertalan Fodor (LilyPondTool) lilypondt...@organum.hu writes: Now, the real problem I see with this approach is that no perfect formatting (which is not the same as indentation) can be done without actually parsing the input. I don't see that. Complete parsing of LilyPond input is _impossible_ without LilyPond itself. There are very few things actually affecting input syntax (redefining note names is one of those). Chord and lyrics mode, too, but I don't think that the subtleties are actually important for formatting and indentation. It is perfectly acceptable to just break on spaces, and indent according to } nesting. After discounting quoted strings, - \ \ and similar articulation. For example you need to format LilyPond code _inside_ Scheme code (remember the #{ construct used in define-music-function) Yes, but it is not like there are multiple arbitrary ways in which this can happen. It is actually just #{ IIRC. So a standard formatting engine can only be written inside LilyPond, or at least using LilyPond to generate metadata describing the structure of the input. I think that view is overly pessimistic. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
So a standard formatting engine can only be written inside LilyPond, or at least using LilyPond to generate metadata describing the structure of the input. I think that view is overly pessimistic. Ok, but I'm talking about a standard formatter, and not just indentation. But for that as well, you certainly need at least a limited parser, at least to find where Scheme parts start and begin. Bert ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Tue, 20 Oct 2009, Graham Percival wrote: On Tue, Oct 20, 2009 at 01:02:59PM +0200, Martin Tarenskeen wrote: On Tue, 20 Oct 2009, Graham Percival wrote: http://code.google.com/p/lilypond/issues/detail?id=777 Since you're somewhat interested in the area, could you compare the scripts? I will take a look. My first impression is that Wilbert's indent.py script is more advanced. I might learn something from it. The default for lilypond files is two-space indents. Is that official and written in the docs, or just common practice ? It's official for the docs and snippets. An official style OK. I changed the default to two-space indentation: http://www.home.zonnet.nl/m.tarenskeen/tmp/indent-ly -- Martin Tarenskeen ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Tue, 20 Oct 2009, Neil Puttock wrote: Apart from the lack of Scheme indentation, I've only noticed two cases where your script differs: single-line comments aren't indented to the same level as their surrounding environment, Changed that in my latest version. And I now leave block-comments %{ %} untouched. and texidoc strings in a header get re-indented if indentation has been left out (usually deliberately in the docs on a new line). Can you point me to an example ? I don't know what texidoc strings are. http://www.home.zonnet.nl/m.tarenskeen/tmp/indent-ly -- Martin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Tue, 20 Oct 2009, Neil Puttock wrote: Be able to re-indent a complete score with a mouseclick from inside the Frescobaldi screen would be great ! ( Just like indent-ly has been integrated into frescobaldi.) Or is it already possible ? Alt-l s a does this rather nicely. I can't make this work. I have tried Alt and/or Ctrl + l, L, I or i (In case you made a typo). But I can only make all or selected lines move to the right, which is not what I mean or need when I have messed up the indentation in a larger score already and want to fix that. -- Martin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Martin Tarenskeen wrote: I think it does a nice job, but comments are welcome. it does! a few remarks: - it would be nice to have an option to replace the file directly instead of having to copy/paste the resulting file - scheme code is not handled (or indented uniformly) - if within brackets there are tabs after the code and before the end-bracket they are replaced by a bunch of blanks - in my programming style i prefer to have the endbracket aligned with the code above - maybe with an additional option this could be solved!? - comments should also follow the indentation rules hope these comments are helpful - thanks! -- View this message in context: http://www.nabble.com/indent-ly-tp25971519p25993972.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Wed, Oct 21, 2009 at 07:47:01AM -0700, -Eluze wrote: Martin Tarenskeen wrote: I think it does a nice job, but comments are welcome. - it would be nice to have an option to replace the file directly instead of having to copy/paste the resulting file Definitely! - scheme code is not handled (or indented uniformly) Yes, scheme code should be formatted in the scheme way. - if within brackets there are tabs after the code and before the end-bracket they are replaced by a bunch of blanks Hmm, I'm not certain how often this would come into play. - in my programming style i prefer to have the endbracket aligned with the code above - maybe with an additional option this could be solved!? I'd argue against this -- the point of a unified style / indentation scheme is that it's *standard*. Now, if this program is just a random fun project, it doesn't matter what it does or how many options there are. But if this is going to turn into a standard script for formatting lilypond files, included in the main lilypond distributions (and I dearly hope it will, since it's an annoying problem that can be solved with an easy program), then I don't think we should have many options at all. One more item to consider: whitespace at the ends of lines should be stripped. Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Martin Tarenskeen m.tarensk...@zonnet.nl writes: On Tue, 20 Oct 2009, Graham Percival wrote: The default for lilypond files is two-space indents. Is that official and written in the docs, or just common practice ? Lilypond itself does not write lilypond files, it just reads them. So it does not have a default indentation. Incorrect. Try { \displayLilyMusic { a b \\ c d | d e | } } which will produce { a b \\ c d | d e | } That _is_ an idea of indentation and line breaking written by Lilypond itself. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Wed, 21 Oct 2009, Graham Percival wrote: - it would be nice to have an option to replace the file directly instead of having to copy/paste the resulting file Definitely! Done in latest version. Use -m (--modify) Be careful: This version overwrites the original file without making a backup ( infile.ly~ )first. Maybe I should add that in the next version. - scheme code is not handled (or indented uniformly) Yes, scheme code should be formatted in the scheme way. I know very very little about scheme. Some example lilypond files with much scheme code might help. - if within brackets there are tabs after the code and before the end-bracket they are replaced by a bunch of blanks Hmm, I'm not certain how often this would come into play. I use tabs sometimes for indenting lines, but I haven't seen anyone using tabs in the middle of a line of lilypond code - in my programming style i prefer to have the endbracket aligned with the code above - maybe with an additional option this could be solved!? I'd argue against this -- the point of a unified style / indentation scheme is that it's *standard*. ... I don't think we should have many options at all. I agree B One more item to consider: whitespace at the ends of lines should be stripped. I thought I already did that ? I'll look in to it. -- Martin Tarenskeen ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Wed, Oct 21, 2009 at 08:49:33PM +0200, Martin Tarenskeen wrote: Be careful: This version overwrites the original file without making a backup ( infile.ly~ )first. Maybe I should add that in the next version. Yes, that would be good. What about a version that read from standard input and wrote to standard input? I'm thinking about the documentation -- we could automatically format all lilypond input syntax. The documentation _mostly_ follows our semi-defined style already, but I'm sure that there's a handful of places where it doesn't. It be nice if we could auto-format all 2143 portions of lilypond input in the docs. :) Yes, scheme code should be formatted in the scheme way. I know very very little about scheme. Some example lilypond files with much scheme code might help. The snippets-advanced scheme might help here, but I'm not certain if they're all formatted correctly. The definitive guide[1] would be whatever emacs does -- if you can install emacs and try its formatting on a few scheme files, you could satisfy all your questions about this. :) [1] I dislike installing 30 megs of programs just to have good indentation, which is why I consider this python indentation script such a great project. One more item to consider: whitespace at the ends of lines should be stripped. I thought I already did that ? I'll look in to it. Sorry, I still haven't looked at the program; I'm just commenting on the discussion. If you already do this, great! (BTW, this end-of-line whitespace-removal is a *huge* issue for the docs and our code. When the lilypond indenting script is done, it would be fantastic if you could write a similar program to help the documentation writers and programmers. :) Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
2009/10/21 Martin Tarenskeen m.tarensk...@zonnet.nl: Can you point me to an example ? I don't know what texidoc strings are. Here's an example from the regression tests: http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=blob;f=input/regression/accidental-broken-tie-spacing.ly;h=6f4bc120affd5909bf32548d81fa8acf7247a6a9;hb=HEAD Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
2009/10/21 Martin Tarenskeen m.tarensk...@zonnet.nl: I can't make this work. I have tried Alt and/or Ctrl + l, L, I or i (In case you made a typo). But I can only make all or selected lines move to the right, which is not what I mean or need when I have messed up the indentation in a larger score already and want to fix that. Alt-L S A or LilyPond - Source Document - Align Which version of Frescobaldi are you using? It was added in version 0.7.12. Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
Graham Percival wrote: What about a version that read from standard input and wrote to standard input? I'm thinking about the documentation -- we could automatically format all lilypond input syntax. On unix a lot of tools default to input coming from one or more file(s) whose names are specified on the command line, and output going to standard output. They act as filters and you can put them in pipelines. Some specify one or more input filename(s) as the only non-option command line argument(s). Many of them have no facility to specify output filenames, requiring redirection if you want them to write to a file. Examples include sed, od, hd, col, cut, awk, indent, and bc. One variant you see a lot is that some programs will read a file list and after they're done they'll read from stdin until they run out of input. indent, which does for C programs what you're doing for lilypond programs has several syntaxes. indent [options] [input-files] This will create a backup of all the input files and then replace the original file with prettyfied versions. indent [options] [-o output-file] If no files are specified, it reads from standard in and then if there's no -o option it writes to standard out. If there is a -o option it writes to the specified file. indent [options] [single-input-file] [-o output-file] This will write to the output file if -o specified, backup and replace the original single-input-file if -o not specified. indent -st [input-file] the -st option means write to standard out, so writes the result of prettyfying the input-file to standard out. Hope this helps. Patrick ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Tue, Oct 20, 2009 at 10:31:15AM +0200, Martin Tarenskeen wrote: I have tried to write a tool in Python to (re-)indent lilypond source files. Something like indent ( for C/C++ ) or tidy ( for HTML ) but now with Lilypond in mind. Nice! If it works well, this would satisfy http://code.google.com/p/lilypond/issues/detail?id=777 The tool can handle multiple inputfiles, and there is a commandline option that lets you specify how much spacecharacters to use for indentation, or to use TAB characters for that (= default behaviour). The default for lilypond files is two-space indents. Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Tue, 20 Oct 2009, Graham Percival wrote: On Tue, Oct 20, 2009 at 10:31:15AM +0200, Martin Tarenskeen wrote: I have tried to write a tool in Python to (re-)indent lilypond source files. Something like indent ( for C/C++ ) or tidy ( for HTML ) but now with Lilypond in mind. Nice! If it works well, this would satisfy http://code.google.com/p/lilypond/issues/detail?id=777 I also see there Wilbert Berendsen already wrote a similar, but more advanced, python script ( indent.py ). Might work better than mine. Give them both a try I would say to everyone. Would be nice if he could also integrate such functionality in Frescobaldi: Be able to re-indent a complete score with a mouseclick from inside the Frescobaldi screen would be great ! ( Just like indent-ly has been integrated into frescobaldi.) Or is it already possible ? The default for lilypond files is two-space indents. Is that official and written in the docs, or just common practice ? Lilypond itself does not write lilypond files, it just reads them. So it does not have a default indentation. I have tried different tools ( frescobaldi, lilypondtool, nted, noteedit, mscore, canorus, rosegarden, vim ) and they don't seem to agree when it comes to indenting style. -- Martin Tarenskeen ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
The default for lilypond files is two-space indents. Is that official and written in the docs, or just common practice ? Lilypond itself does not write lilypond files, it just reads them. So it does not have a default indentation. I have tried different tools ( frescobaldi, lilypondtool, nted, noteedit, mscore, canorus, rosegarden, vim ) and they don't seem to agree when it comes to indenting style. I agree. LilyPondTool relies on jEdit in this sense. JEdit doesn't provide advanced indentation by its own, and actually leaves it to the user the set up indent level, TAB vs Space etc. Though simple indentation can be done with Ctrl-I. Bert ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
On Tue, Oct 20, 2009 at 01:02:59PM +0200, Martin Tarenskeen wrote: On Tue, 20 Oct 2009, Graham Percival wrote: Nice! If it works well, this would satisfy http://code.google.com/p/lilypond/issues/detail?id=777 I also see there Wilbert Berendsen already wrote a similar, but more advanced, python script ( indent.py ). Might work better than mine. Give them both a try I would say to everyone. Don't ask everyone to investigate this, because they won't. The rule in open source is that you're lucky if you get one volunteer working on something. :( Since you're somewhat interested in the area, could you compare the scripts? The default for lilypond files is two-space indents. Is that official and written in the docs, or just common practice ? It's official for the docs and snippets. An official style recommended for users may be part of the Great Lilypond Input Syntax Standardization, but this project has not started yet. Cheers, - GRaham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent-ly
2009/10/20 Martin Tarenskeen m.tarensk...@zonnet.nl: Would be nice if he could also integrate such functionality in Frescobaldi: Be able to re-indent a complete score with a mouseclick from inside the Frescobaldi screen would be great ! ( Just like indent-ly has been integrated into frescobaldi.) Or is it already possible ? Alt-l s a does this rather nicely. Apart from the lack of Scheme indentation, I've only noticed two cases where your script differs: single-line comments aren't indented to the same level as their surrounding environment, and texidoc strings in a header get re-indented if indentation has been left out (usually deliberately in the docs on a new line). Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Indent
pal...@inwind.it wrote: Is there a simple way to adapt the indent program used for C sources to do proper indenting of Lilypond sources? Or perhaps, is there another automatic indenting tool for Lilypond? I use LilyPondTool for jEdit, which has auto-indenting. There are others, of course, and IIUC some that are only available for linux. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Indent
On Mon, Jun 15, 2009 at 12:17:56PM -0700, Mark Polesky wrote: pal...@inwind.it wrote: Is there a simple way to adapt the indent program used for C sources to do proper indenting of Lilypond sources? Or perhaps, is there another automatic indenting tool for Lilypond? I use LilyPondTool for jEdit, which has auto-indenting. There are others, of course, and IIUC some that are only available for linux. I use Frescobaldi and Vim. Both support automatic indentation for Lilypond files. These editor apply indentation while editing. But I would also like a tool that can (re-)indent lilypond files AFTER they have already been created. Just like the indent tool for C programs. Maybe this is already possible with Vim or Frescobaldi, but I don't know how ? -- Martin ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Indent
Martin Tarenskeen wrote: These editor apply indentation while editing. But I would also like a tool that can (re-)indent lilypond files AFTER they have already been created. Just like the indent tool for C programs. Maybe this is already possible with Vim or Frescobaldi, but I don't know how ? jEdit has the following options in the Edit-Indent menu: Indent Lines Shift Indent Left Shift Indent Right Remove Trailing Whitespace Spaces to Tabs Tabs to Spaces There are keyboard shortcuts for the first 4, but I don't know if they're the same on different platforms. - Mark ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Indent
On Mon, Jun 15, 2009 at 09:41:02PM +0200, Martin Tarenskeen wrote: On Mon, Jun 15, 2009 at 12:17:56PM -0700, Mark Polesky wrote: I use LilyPondTool for jEdit, which has auto-indenting. There are others, of course, and IIUC some that are only available for linux. These editor apply indentation while editing. But I would also like a tool that can (re-)indent lilypond files AFTER they have already been created. Just like the indent tool for C programs. This would definitely be nice; it could also very helpful for the docs. I'd recommend writing it in python, since we distribute python with lilypond. It's added as #777. Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Indent
2009/6/15 Mark Polesky markpole...@yahoo.com: jEdit has the following options in the Edit-Indent menu: Indent Lines I've used this extensively when editing snippets, but it's always been a bit annoying since it fails to indent and . Regards, Neil ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent in latex
Roman, perfect, that's it! Thank you, Alan Am 24.09.2008 um 04:23 schrieb Roman Stawski: Hi, I integrated a lilypond-file then processed by lilypond-book in latex and I got an indent as you can see in the attached pdf. The code for that fragment in latex looks like that: ... Bestandteil des genannten \textit{Perpetuum Mobile}-Kanons. \\ Hier dann die caption \\ \LilyPonds\lilypondfile[quote,indent=#0,staffsize=12] {Nymphes_des_boys_2.ly} Noch einmal zurück zur quintfälligen authentischen Doppelwendung am Schluss des ... I tried noindent as well, without any success. I think that the problem is with the quote argument rather than the indent. Try removing that one... Roman ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent in latex
Hi, I integrated a lilypond-file then processed by lilypond-book in latex and I got an indent as you can see in the attached pdf. The code for that fragment in latex looks like that: ... Bestandteil des genannten \textit{Perpetuum Mobile}-Kanons. \\ Hier dann die caption \\ \LilyPonds\lilypondfile[quote,indent=#0,staffsize=12] {Nymphes_des_boys_2.ly} Noch einmal zurück zur quintfälligen authentischen Doppelwendung am Schluss des ... I tried noindent as well, without any success. I think that the problem is with the quote argument rather than the indent. Try removing that one... Roman ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent of eps files with lilypond-book
hi seb, have a look at marcus brinkmanns project he published recently. He creates an environment called song which does the job for you. \newenvironment{song} { % The -13pt is the first X coordinate of the bounding box in the EPS % files generated by lilypond. The effect is to align the staff with % the left margin, ignoring the measure numbering. \begin{list}{}{\leftmargin-13pt}\item{} } { \end{list} % Because lilypond wraps the score sheet in a block ``{}'', the % stanzas following are separated by some extra white space. Rather % than trying to battle this (how?), we just skip back up and go on. % The -20pt is somewhat arbitrary and unrelated to the above -13pt. % Note that also for whitespace reasons we have to add footnotetext % instructions inside the song environment. \vspace{-20pt} } then u say \begin{song} \lilypondfile[staffsize=16,line-width=505\pt]{filename.ly} \end{song} or something else. now i use this also within my songbook and it works good. maybe you have to adjust the above value of 13pt to another one. I set it to 15pt ... cu /Dominic 2007/6/13, Sebastian Menge [EMAIL PROTECTED]: hi how can i set the indent of eps files to zero with lilypondbook and latex? music fragment options noindent or indent=0 dont work. option --padding=0 of lilypond-book is not supported by 2.10.5 (though the docs say so ...) (I'm using ubuntu feisty) To make things more clear: the indent is the eps-graphics, and the bounding boxes are aligned correctly, so it's not a latex problem. Seb. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent of eps files with lilypond-book
Am Mittwoch, den 13.06.2007, 23:27 +0200 schrieb Dominic Neumann: have a look at marcus brinkmanns project he published recently. He creates an environment called song which does the job for you. \newenvironment{song} Great, you saved my day :-) Do you have a reference to that project? Seb. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: indent of eps files with lilypond-book
Do you have a reference to that project? It was presented on this mailinglist yesterday. The subject was Pre-Release: Slave Songs of the United States. Here you can find the thread in the mailinglist archive: http://lists.gnu.org/archive/html/lilypond-user/2007-06/msg00178.html /Dominic ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user