* buffer names in MKII @ 2011-08-18 22:32 Mojca Miklavec 2011-08-18 21:29 ` Aditya Mahajan ` (2 more replies) 0 siblings, 3 replies; 17+ messages in thread From: Mojca Miklavec @ 2011-08-18 22:32 UTC (permalink / raw) To: mailing list for ConTeXt users Dear Hans, something broke backward compatibility in MKII. When using buffers like in \startbuffer[buffername] hello world \stopbuffer the code now creates buffername.tmp instead of \jobname-buffername.tmp. This breaks the gnuplot module in weird ways. I can probably fix it in one way or another, but I'm not sure why the behaviour would change. To fix the vim module? :) :) :) OK, I need to take some time and try to use Aditya's code in the background anyway, but I still wonder if the change was intentional or not. Thanks, Mojca ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: buffer names in MKII 2011-08-18 22:32 buffer names in MKII Mojca Miklavec @ 2011-08-18 21:29 ` Aditya Mahajan 2011-08-19 7:53 ` Henning Hraban Ramm 2011-08-19 0:09 ` buffer names in MKII Aditya Mahajan 2011-08-19 7:53 ` Hans Hagen 2 siblings, 1 reply; 17+ messages in thread From: Aditya Mahajan @ 2011-08-18 21:29 UTC (permalink / raw) To: mailing list for ConTeXt users On Fri, 19 Aug 2011, Mojca Miklavec wrote: > Dear Hans, > > something broke backward compatibility in MKII. > > When using buffers like in > > \startbuffer[buffername] > hello world > \stopbuffer > > the code now creates buffername.tmp instead of \jobname-buffername.tmp. Works fine with 2011.08.04, so something broke in the latest version. > OK, I need to take some time and try to use Aditya's code in the > background anyway In MkIV, with the filter module it is now possible to use preamble and postample buffers for each filters. With this, the basic functionality of the gnuplot module works fine (but I only tested the pdf and png backends, not the context backend). I am also thinking of providing an interface for parsing the buffer content at lua end. That will allow us to implement all the features of the gnuplot and lilypond module using the filter module. But I need some testers, as I don't use either of the programs. Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: buffer names in MKII 2011-08-18 21:29 ` Aditya Mahajan @ 2011-08-19 7:53 ` Henning Hraban Ramm 2011-08-19 15:08 ` Lilypond (Re: buffer names in MKII) Aditya Mahajan 0 siblings, 1 reply; 17+ messages in thread From: Henning Hraban Ramm @ 2011-08-19 7:53 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2011-08-18 um 23:29 schrieb Aditya Mahajan: > I am also thinking of providing an interface for parsing the buffer > content at lua end. That will allow us to implement all the features > of the gnuplot and lilypond module using the filter module. But I > need some testers, as I don't use either of the programs. I don't understand what you're planning, but I'll do the testing for LilyPond. (Current version works for me, but I never tried to get inline music, and I only use MkIV.) Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Lilypond (Re: buffer names in MKII) 2011-08-19 7:53 ` Henning Hraban Ramm @ 2011-08-19 15:08 ` Aditya Mahajan 2011-08-19 20:18 ` Lilypond Henning Hraban Ramm 0 siblings, 1 reply; 17+ messages in thread From: Aditya Mahajan @ 2011-08-19 15:08 UTC (permalink / raw) To: mailing list for ConTeXt users Hi Hraban On Fri, 19 Aug 2011, Henning Hraban Ramm wrote: > Am 2011-08-18 um 23:29 schrieb Aditya Mahajan: > >> I am also thinking of providing an interface for parsing the buffer content >> at lua end. That will allow us to implement all the features of the gnuplot >> and lilypond module using the filter module. But I need some testers, as I >> don't use either of the programs. > > I don't understand what you're planning, I am planning to add features so that you can say: \startlilypondpreamble global settings \stoplilypondpreamble \startlilypond the score \stoplilypond and get a correct output (this is more or less possible right now). The other thing is to be able to change linespace, papersize, offset, etc using parameters, so that one can say: \startlilypond[linespace=...] ... \stoplilypond This will require some lua side processing. > but I'll do the testing for LilyPond. Do you know how lilypond numbers its output files. In some cases I get filename-1.pdf sometimes not. Can I force it to always give filename-1.pdf or always give filename.pdf Which OSes do you have access to? Thanks, Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-19 15:08 ` Lilypond (Re: buffer names in MKII) Aditya Mahajan @ 2011-08-19 20:18 ` Henning Hraban Ramm 2011-08-20 8:19 ` Lilypond Aditya Mahajan 0 siblings, 1 reply; 17+ messages in thread From: Henning Hraban Ramm @ 2011-08-19 20:18 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2011-08-19 um 17:08 schrieb Aditya Mahajan: >> I don't understand what you're planning, > > I am planning to add features so that you can say: > > \startlilypondpreamble > global settings > \stoplilypondpreamble Ah, that's great - at the moment I just import the same settings.ly file into every score of a songbook. But - can you even support different setups, say \startlilypondpreamble global settings for everything \stoplilypondpreamble \startlilypondpreamble[snippet] global settings for snippets \stoplilypondpreamble \startlilypondpreamble[fullscore] global settings for full scores \stoplilypondpreamble \startlilypond[setup=fullscore] the score \stoplilypond etc. > The other thing is to be able to change linespace, papersize, > offset, etc using parameters, so that one can say: > \startlilypond[linespace=...] > ... > \stoplilypond > This will require some lua side processing. You mean, translate ConTeXt-style settings to LilyPond settings, like we did with the old module? That wouldn’t make much sense. LilyPond just has too much settings. And most of them you can set in different ways. To fully support this, you’d need a complete LilyPond parser including Scheme. And a small set of settings is never the right set for everyone. Ok, there are a few settings that we could translate, e.g. set ConTeXt’s main fonts also for LilyPond. We don’t need LilyPond's layout settings, as long as we go the \externalfigure path. I don’t know a solution for line breaking of scores - if you’d set LilyPond’s page size to ConTeXt’s remaining space, it would stay the same for the second page. Perhaps we can get single lines (systems) and let ConTeXt to the page breaking. I’ll look into that. But I don’t know how we can make it "right" WRT LilyPond snippets - I’d want to align a note systems’s base line with ConTeXt’s text baseline, but the height and clipping of a snippet depends on the visible elements. Without some picture analysis (or runtime data from LilyPond, that doesn’t exist AFAIK) you need to adjust your snippets manually. > Do you know how lilypond numbers its output files. In some cases I > get filename-1.pdf sometimes not. Can I force it to always give > filename-1.pdf or always give filename.pdf LilyPond adds a number to EPS, if there’s more that one page. But in my songbook setup, I always get a filename-temp-lilypond-##.eps plus an identical filename-temp-lilypond-##-1.eps When you order more than one \midi{} in several \score blocks, the first MIDI file is unnumbered, the second gets number 1 etc.; didn’t try with different \layout blocks yet. Seems like I must do some tests with multipage scores. > Which OSes do you have access to? Normally I work on OSX Intel 10.5.8; I've access to Windows 7/64 and Ubuntu/Debian machines. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-19 20:18 ` Lilypond Henning Hraban Ramm @ 2011-08-20 8:19 ` Aditya Mahajan 2011-08-21 1:22 ` Lilypond David Wooten 2011-08-21 12:07 ` Lilypond Henning Hraban Ramm 0 siblings, 2 replies; 17+ messages in thread From: Aditya Mahajan @ 2011-08-20 8:19 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: TEXT/PLAIN, Size: 3422 bytes --] On Fri, 19 Aug 2011, Henning Hraban Ramm wrote: > Am 2011-08-19 um 17:08 schrieb Aditya Mahajan: > > But - can you even support different setups, say > > \startlilypondpreamble > global settings for everything > \stoplilypondpreamble > > \startlilypondpreamble[snippet] > global settings for snippets > \stoplilypondpreamble > > \startlilypondpreamble[fullscore] > global settings for full scores > \stoplilypondpreamble > > \startlilypond[setup=fullscore] > the score > \stoplilypond > > etc. Yes. I can support the following syntax: \startbuffer[snippets] ... \stopbuffer \startbuffer[fullscore] ... \stopbuffer \startbuffer[common] ... \stopbuffer \startlilypond[bufferbefore={snippets,common}, bufferafter={....}] .... \stoplilypond (In fact, provide similar support for anything defined using the filter module). >> The other thing is to be able to change linespace, papersize, offset, etc >> using parameters, so that one can say: >> \startlilypond[linespace=...] >> ... >> \stoplilypond >> This will require some lua side processing. > > You mean, translate ConTeXt-style settings to LilyPond settings, like we did > with the old module? Yes. > That wouldn’t make much sense. LilyPond just has too much settings. And most > of them you can set in different ways. To fully support this, you’d need a > complete LilyPond parser including Scheme. And a small set of settings is > never the right set for everyone. OK. > Ok, there are a few settings that we could translate, e.g. set ConTeXt’s main > fonts also for LilyPond. Agreed. Does anyone know how to get the name of the current font in MkIV? > We don’t need LilyPond's layout settings, as long as we go the > \externalfigure path. But I think that at least automatic paper size settings (set paper size to be equal to text area) are needed. > I don’t know a solution for line breaking of scores - if you’d set LilyPond’s > page size to ConTeXt’s remaining space, it would stay the same for the second > page. Perhaps we can get single lines (systems) and let ConTeXt to the page > breaking. I’ll look into that. OK. > But I don’t know how we can make it "right" WRT LilyPond snippets - I’d want > to align a note systems’s base line with ConTeXt’s text baseline, but the > height and clipping of a snippet depends on the visible elements. Without > some picture analysis (or runtime data from LilyPond, that doesn’t exist > AFAIK) you need to adjust your snippets manually. Does lilypond-book handle this at all? It does not appear to. Manually adjusting each inline snippet will be too much work, IMO. >> Do you know how lilypond numbers its output files. In some cases I get >> filename-1.pdf sometimes not. Can I force it to always give filename-1.pdf >> or always give filename.pdf > > LilyPond adds a number to EPS, if there’s more that one page. > But in my songbook setup, I always get a filename-temp-lilypond-##.eps plus > an identical filename-temp-lilypond-##-1.eps > > When you order more than one \midi{} in several \score blocks, the first MIDI > file is unnumbered, the second gets number 1 etc.; didn’t try with different > \layout blocks yet. > > Seems like I must do some tests with multipage scores. Look at the current version on github. It should be able to handle multi-page snippets. Aditya [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-20 8:19 ` Lilypond Aditya Mahajan @ 2011-08-21 1:22 ` David Wooten 2011-08-21 12:07 ` Lilypond Henning Hraban Ramm 1 sibling, 0 replies; 17+ messages in thread From: David Wooten @ 2011-08-21 1:22 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 4704 bytes --] Hi Aditya & Hraban, I'm very glad to see improved Lilypond integration being discussed. I can't offer too much besides moral support, but would just point out one solution I've found for proper width/alignment of a snippet with extra-staff material (e.g. a piano staff marker { ): If the ConTeXt textwidth is equal to the Lilypond line-width, aligning the float to the right gives you a snippet nicely aligned with flush text (extra-staff material being pushed towards the left margin). Something like this (as in the example in the garden): \def\readlilypondoutput#1{\setupfloats[location=right,frame=off]\placefigure[]{}}{\externalfigure[#1]}} Regards, David On Aug 20, 2011, at 1:19 AM, Aditya Mahajan wrote: > On Fri, 19 Aug 2011, Henning Hraban Ramm wrote: > >> Am 2011-08-19 um 17:08 schrieb Aditya Mahajan: >> >> But - can you even support different setups, say >> >> \startlilypondpreamble >> global settings for everything >> \stoplilypondpreamble >> >> \startlilypondpreamble[snippet] >> global settings for snippets >> \stoplilypondpreamble >> >> \startlilypondpreamble[fullscore] >> global settings for full scores >> \stoplilypondpreamble >> >> \startlilypond[setup=fullscore] >> the score >> \stoplilypond >> >> etc. > > Yes. I can support the following syntax: > > \startbuffer[snippets] ... \stopbuffer > > \startbuffer[fullscore] ... \stopbuffer > > \startbuffer[common] ... \stopbuffer > > \startlilypond[bufferbefore={snippets,common}, bufferafter={....}] > .... \stoplilypond > > (In fact, provide similar support for anything defined using the filter module). > >>> The other thing is to be able to change linespace, papersize, offset, etc using parameters, so that one can say: >>> \startlilypond[linespace=...] >>> ... >>> \stoplilypond >>> This will require some lua side processing. >> >> You mean, translate ConTeXt-style settings to LilyPond settings, like we did with the old module? > > Yes. > >> That wouldn’t make much sense. LilyPond just has too much settings. And most of them you can set in different ways. To fully support this, you’d need a complete LilyPond parser including Scheme. And a small set of settings is never the right set for everyone. > > OK. > >> Ok, there are a few settings that we could translate, e.g. set ConTeXt’s main fonts also for LilyPond. > > Agreed. Does anyone know how to get the name of the current font in MkIV? > >> We don’t need LilyPond's layout settings, as long as we go the \externalfigure path. > > But I think that at least automatic paper size settings (set paper size to be equal to text area) are needed. > >> I don’t know a solution for line breaking of scores - if you’d set LilyPond’s page size to ConTeXt’s remaining space, it would stay the same for the second page. Perhaps we can get single lines (systems) and let ConTeXt to the page breaking. I’ll look into that. > > OK. > >> But I don’t know how we can make it "right" WRT LilyPond snippets - I’d want to align a note systems’s base line with ConTeXt’s text baseline, but the height and clipping of a snippet depends on the visible elements. Without some picture analysis (or runtime data from LilyPond, that doesn’t exist AFAIK) you need to adjust your snippets manually. > > Does lilypond-book handle this at all? It does not appear to. Manually adjusting each inline snippet will be too much work, IMO. > >>> Do you know how lilypond numbers its output files. In some cases I get filename-1.pdf sometimes not. Can I force it to always give filename-1.pdf or always give filename.pdf >> >> LilyPond adds a number to EPS, if there’s more that one page. >> But in my songbook setup, I always get a filename-temp-lilypond-##.eps plus an identical filename-temp-lilypond-##-1.eps >> >> When you order more than one \midi{} in several \score blocks, the first MIDI file is unnumbered, the second gets number 1 etc.; didn’t try with different \layout blocks yet. >> >> Seems like I must do some tests with multipage scores. > > Look at the current version on github. It should be able to handle multi-page snippets. > > Aditya___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ [-- Attachment #1.2: Type: text/html, Size: 8679 bytes --] [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-20 8:19 ` Lilypond Aditya Mahajan 2011-08-21 1:22 ` Lilypond David Wooten @ 2011-08-21 12:07 ` Henning Hraban Ramm 2011-08-21 18:25 ` Lilypond Henning Hraban Ramm 2011-08-21 22:14 ` Lilypond Aditya Mahajan 1 sibling, 2 replies; 17+ messages in thread From: Henning Hraban Ramm @ 2011-08-21 12:07 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2011-08-20 um 10:19 schrieb Aditya Mahajan: > >>> The other thing is to be able to change linespace, papersize, >>> offset, etc using parameters, so that one can say: >>> \startlilypond[linespace=...] >>> ... >>> \stoplilypond >>> This will require some lua side processing. >> >> You mean, translate ConTeXt-style settings to LilyPond settings, >> like we did with the old module? > Yes. >> That wouldn’t make much sense. LilyPond just has too much settings. >> And most of them you can set in different ways. To fully support >> this, you’d need a complete LilyPond parser including Scheme. And a >> small set of settings is never the right set for everyone. > OK. Or we support the same set of options as lilypond-book (the LaTeX module), see http://lilypond.org/doc/v2.14/Documentation/usage/music-fragment-options > >> Ok, there are a few settings that we could translate, e.g. set >> ConTeXt’s main fonts also for LilyPond. > > Agreed. Does anyone know how to get the name of the current font in > MkIV? > >> We don’t need LilyPond's layout settings, as long as we go the >> \externalfigure path. > > But I think that at least automatic paper size settings (set paper > size to be equal to text area) are needed. I wouldn’t try to adapt LilyPond’s paper size, but only set line width and use lilypond-book mode to get cropped scores. Otherwise we would need to account for margins and place the score with negative offset etc. At least for full scores it would make sense to synchronize: - line width to \textwidth - fonts: #(define fonts (make-pango-font-tree "TeX Gyre Schola" "LMSans10" "LMTypewriter10 Regular" (/ 14 20))) I’d even suggest to set Schola as ConTeXt’s default font in t- lilypond. - staff size according to body font (staff size 14 matches bodyfont 8.5pt) General settings: - no point-and-click: #(ly:set-option (quote no-point-and-click)) - no headers/footers/titles/pagination - ragged bottom - no indents (but that might be a matter of taste, since it’s LilyPond default to indent the first line) - keep lyrics inside line: \override PaperColumn #'keep-inside-line = ##t Everything else is just a matter of taste and design, I guess. >> I don’t know a solution for line breaking of scores - if you’d set >> LilyPond’s page size to ConTeXt’s remaining space, it would stay >> the same for the second page. Perhaps we can get single lines >> (systems) and let ConTeXt to the page breaking. I’ll look into that. > OK. I’m waiting for answers from the LP ML. >> But I don’t know how we can make it "right" WRT LilyPond snippets - >> I’d want to align a note systems’s base line with ConTeXt’s text >> baseline, but the height and clipping of a snippet depends on the >> visible elements. Without some picture analysis (or runtime data >> from LilyPond, that doesn’t exist AFAIK) you need to adjust your >> snippets manually. > > Does lilypond-book handle this at all? It does not appear to. > Manually adjusting each inline snippet will be too much work, IMO. Probably. >>> Do you know how lilypond numbers its output files. In some cases I >>> get filename-1.pdf sometimes not. Can I force it to always give >>> filename-1.pdf or always give filename.pdf >> >> LilyPond adds a number to EPS, if there’s more that one page. >> But in my songbook setup, I always get a filename-temp-lilypond- >> ##.eps plus an identical filename-temp-lilypond-##-1.eps >> >> When you order more than one \midi{} in several \score blocks, the >> first MIDI file is unnumbered, the second gets number 1 etc.; >> didn’t try with different \layout blocks yet. >> >> Seems like I must do some tests with multipage scores. > > Look at the current version on github. It should be able to handle > multi-page snippets. Problem is, if a multi-page score starts somewhere mid-page, e.g. below a title, LilyPond doesn’t know to break early enough. Please use -dno-gs-load-fonts i.e. *don’t* let GhostScript load its own fonts, since all needed fonts are in the (E)PS anyway, that makes processing faster. Current version doesn’t work at all: - it writes the buffer with doubled filename and extension parts, i.e. from foo.tex "foo-foo-temp-lilypond.tmp.tmp", but looks for "foo-temp- lilypond.tmp". - even if I rename the buffer file, LilyPond isn’t run. t-filter > current filter : lilypond t-filter > base file : test1-temp-lilypond t-filter > input file : test1-temp-lilypond.tmp t-filter > output file : t-filter > command : Greetlings from Lake Constance --- fiëé visuëlle Henning Hraban Ramm http://www.fiee.net http://angerweit.tikon.ch/lieder/ https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-21 12:07 ` Lilypond Henning Hraban Ramm @ 2011-08-21 18:25 ` Henning Hraban Ramm 2011-08-21 22:14 ` Lilypond Aditya Mahajan 1 sibling, 0 replies; 17+ messages in thread From: Henning Hraban Ramm @ 2011-08-21 18:25 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2011-08-21 um 14:07 schrieb Henning Hraban Ramm: >>> I don’t know a solution for line breaking of scores - if you’d set >>> LilyPond’s page size to ConTeXt’s remaining space, it would stay >>> the same for the second page. Perhaps we can get single lines >>> (systems) and let ConTeXt to the page breaking. I’ll look into that. >> OK. > I’m waiting for answers from the LP ML. Got an answer: If you include the scheme functions from share/lilypond/current/ly/ lilypond-book-preamble.ly, you get one file per system, if you don’t use a \book block within lilypond. The system count is in foo-systems.count, i.e. read the number from that file and use \externalfigure so often. This additional processing takes a lot of time, so we should only do it if we really need page breaking - best make it an option (split=yes). >>>> Do you know how lilypond numbers its output files. In some cases >>>> I get filename-1.pdf sometimes not. Can I force it to always give >>>> filename-1.pdf or always give filename.pdf IME there’s always a filename.pdf; you get filename-1.pdf for your first page; if you use the preamble quoted above, you’ll get filename-1.pdf etc. for every system. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-21 12:07 ` Lilypond Henning Hraban Ramm 2011-08-21 18:25 ` Lilypond Henning Hraban Ramm @ 2011-08-21 22:14 ` Aditya Mahajan 2011-08-21 22:24 ` Lilypond Hans Hagen 2011-08-22 1:53 ` Lilypond Aditya Mahajan 1 sibling, 2 replies; 17+ messages in thread From: Aditya Mahajan @ 2011-08-21 22:14 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: TEXT/PLAIN, Size: 837 bytes --] On Sun, 21 Aug 2011, Henning Hraban Ramm wrote: > Current version doesn’t work at all: > - it writes the buffer with doubled filename and extension parts, i.e. from > foo.tex "foo-foo-temp-lilypond.tmp.tmp", but looks for > "foo-temp-lilypond.tmp". The \savebuffer command has changed!!! \starttext \startbuffer[abc] test \stopbuffer \savebuffer[abc][name.ext] \stoptext now creates a file \jobname-name.ext, rather than name.ext. I'll provide a work around. > - even if I rename the buffer file, LilyPond isn’t run. > > t-filter > current filter : lilypond > t-filter > base file : test1-temp-lilypond > t-filter > input file : test1-temp-lilypond.tmp > t-filter > output file : > t-filter > command : With the latest version, I also get this. Strange. Aditya [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-21 22:14 ` Lilypond Aditya Mahajan @ 2011-08-21 22:24 ` Hans Hagen 2011-08-21 22:32 ` Lilypond Aditya Mahajan 2011-08-22 1:53 ` Lilypond Aditya Mahajan 1 sibling, 1 reply; 17+ messages in thread From: Hans Hagen @ 2011-08-21 22:24 UTC (permalink / raw) To: mailing list for ConTeXt users On 22-8-2011 00:14, Aditya Mahajan wrote: > On Sun, 21 Aug 2011, Henning Hraban Ramm wrote: > >> Current version doesn’t work at all: >> - it writes the buffer with doubled filename and extension parts, i.e. >> from foo.tex "foo-foo-temp-lilypond.tmp.tmp", but looks for >> "foo-temp-lilypond.tmp". > > The \savebuffer command has changed!!! well, you wanted a jobname as prefix -) (in mkii that only happens with the \protectbuffers flag is set, in mkiv always) Just tell me what you expect Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-21 22:24 ` Lilypond Hans Hagen @ 2011-08-21 22:32 ` Aditya Mahajan 0 siblings, 0 replies; 17+ messages in thread From: Aditya Mahajan @ 2011-08-21 22:32 UTC (permalink / raw) To: Hans Hagen; +Cc: mailing list for ConTeXt users [-- Attachment #1: Type: TEXT/PLAIN, Size: 1054 bytes --] On Mon, 22 Aug 2011, Hans Hagen wrote: > On 22-8-2011 00:14, Aditya Mahajan wrote: >> On Sun, 21 Aug 2011, Henning Hraban Ramm wrote: >> >>> Current version doesn’t work at all: >>> - it writes the buffer with doubled filename and extension parts, i.e. >>> from foo.tex "foo-foo-temp-lilypond.tmp.tmp", but looks for >>> "foo-temp-lilypond.tmp". >> >> The \savebuffer command has changed!!! > > well, you wanted a jobname as prefix -) In MkII, not MkIV :) > (in mkii that only happens with the \protectbuffers flag is set, in mkiv > always) > > Just tell me what you expect My preference is for \savebuffer[...][filename] to write contents in filename. No funny prefix or suffix. If you have to add prefix and suffixes, please make it configurable (like \bufferprefix and \f!temporaryfilenameextension in MkII). With the current MkIV implementation, I cannot directly write the buffer to a file in another directory. Of course, I can work around using file.move, but that is adding one extra step. Aditya [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-21 22:14 ` Lilypond Aditya Mahajan 2011-08-21 22:24 ` Lilypond Hans Hagen @ 2011-08-22 1:53 ` Aditya Mahajan 2011-08-22 13:59 ` Lilypond Henning Hraban Ramm 1 sibling, 1 reply; 17+ messages in thread From: Aditya Mahajan @ 2011-08-22 1:53 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: TEXT/PLAIN, Size: 1280 bytes --] On Sun, 21 Aug 2011, Aditya Mahajan wrote: > On Sun, 21 Aug 2011, Henning Hraban Ramm wrote: > >> - even if I rename the buffer file, LilyPond isn’t run. >> >> t-filter > current filter : lilypond >> t-filter > base file : test1-temp-lilypond >> t-filter > input file : test1-temp-lilypond.tmp >> t-filter > output file : >> t-filter > command : > > With the latest version, I also get this. Strange. This took a while to debug. The internal representation of the namespace macros has changed in MkIV. \definenamespace[whatever][...] \definewhatever[something][key=value] now defines a macro \whatever:something:key rather than \whateversomethingkey (note the extra colon). In the filter module, I had: \getparameters[\externalfilter::namespace#1][\s!parent=\externalfilter::namespace,#2] which fails in MkIV. To get a working solution in both MkII and MkIV I need: \setupexternalfilter[#1][\s!parent=\externalfilter::namespace,#2] @Hans and Wolfgang: Is it possible to change the internnal representation in mult-aux.mkii so that MkII and MkIV are consistent again? @Hraban: Long story short, the filter module is working again. Can you test the dev branch from the latest git version? Aditya [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-22 1:53 ` Lilypond Aditya Mahajan @ 2011-08-22 13:59 ` Henning Hraban Ramm 2011-08-22 15:18 ` Lilypond Aditya Mahajan 0 siblings, 1 reply; 17+ messages in thread From: Henning Hraban Ramm @ 2011-08-22 13:59 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2011-08-22 um 03:53 schrieb Aditya Mahajan: > @Hraban: Long story short, the filter module is working again. Can > you test the dev branch from the latest git version? Thank you! LilyPond ist called, but your approach of including the LaTeX file fails, since you don’t define \linebreak from: """ \includegraphics{test1-temp-lilypond-0-1}% \ifx\betweenLilyPondSystem \undefined \linebreak \else \expandafter\betweenLilyPondSystem{1}% \fi """ In my test case (where I include the "one system per file" patch) I can \def\linebreak{\relax} and get a nice multi-page score. Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Lilypond 2011-08-22 13:59 ` Lilypond Henning Hraban Ramm @ 2011-08-22 15:18 ` Aditya Mahajan 0 siblings, 0 replies; 17+ messages in thread From: Aditya Mahajan @ 2011-08-22 15:18 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1: Type: TEXT/PLAIN, Size: 1191 bytes --] On Mon, 22 Aug 2011, Henning Hraban Ramm wrote: > Am 2011-08-22 um 03:53 schrieb Aditya Mahajan: >> @Hraban: Long story short, the filter module is working again. Can you test >> the dev branch from the latest git version? > > Thank you! > LilyPond ist called, but your approach of including the LaTeX file fails, > since you don’t define \linebreak from: I need bigger test files :) I find creating TeX macros to parse the latex output easier than understanding what lilypond creates (there is very little documentation about what goes on behind the scenes). Even the generated latex output is horrible, but, at least, I understand what it does. > """ > \includegraphics{test1-temp-lilypond-0-1}% > \ifx\betweenLilyPondSystem \undefined > \linebreak > \else > \expandafter\betweenLilyPondSystem{1}% > \fi > """ Can you send me the complete example? > In my test case (where I include the "one system per file" patch) I can > \def\linebreak{\relax} and get a nice multi-page score. and also send the "one system per file" patch (is it just including lilypond-book-preamble.ly?). I'll add \let\linebreak\donothing to lilypond::setups. Aditya [-- Attachment #2: Type: text/plain, Size: 485 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: buffer names in MKII 2011-08-18 22:32 buffer names in MKII Mojca Miklavec 2011-08-18 21:29 ` Aditya Mahajan @ 2011-08-19 0:09 ` Aditya Mahajan 2011-08-19 7:53 ` Hans Hagen 2 siblings, 0 replies; 17+ messages in thread From: Aditya Mahajan @ 2011-08-19 0:09 UTC (permalink / raw) To: mailing list for ConTeXt users I have not tested this, but such a change will also breakthe filter module in MKII. On Aug 18, 2011, at 6:32 PM, Mojca Miklavec <mojca.miklavec.lists@gmail.com> wrote: > Dear Hans, > > something broke backward compatibility in MKII. > > When using buffers like in > > \startbuffer[buffername] > hello world > \stopbuffer > > the code now creates buffername.tmp instead of \jobname-buffername.tmp. > > This breaks the gnuplot module in weird ways. I can probably fix it in > one way or another, but I'm not sure why the behaviour would change. > To fix the vim module? :) :) :) > > OK, I need to take some time and try to use Aditya's code in the > background anyway, but I still wonder if the change was intentional or > not. > > Thanks, > Mojca > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: buffer names in MKII 2011-08-18 22:32 buffer names in MKII Mojca Miklavec 2011-08-18 21:29 ` Aditya Mahajan 2011-08-19 0:09 ` buffer names in MKII Aditya Mahajan @ 2011-08-19 7:53 ` Hans Hagen 2 siblings, 0 replies; 17+ messages in thread From: Hans Hagen @ 2011-08-19 7:53 UTC (permalink / raw) To: mailing list for ConTeXt users; +Cc: Mojca Miklavec On 19-8-2011 00:32, Mojca Miklavec wrote: > Dear Hans, > > something broke backward compatibility in MKII. > > When using buffers like in > > \startbuffer[buffername] > hello world > \stopbuffer > > the code now creates buffername.tmp instead of \jobname-buffername.tmp. > > This breaks the gnuplot module in weird ways. I can probably fix it in > one way or another, but I'm not sure why the behaviour would change. > To fix the vim module? :) :) :) > > OK, I need to take some time and try to use Aditya's code in the > background anyway, but I still wonder if the change was intentional or > not. Probably a side effect of some cleaning up of filename code deep down. Normally in mkiv buffers are not saved on disk (as with mkii). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2011-08-22 15:18 UTC | newest] Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-08-18 22:32 buffer names in MKII Mojca Miklavec 2011-08-18 21:29 ` Aditya Mahajan 2011-08-19 7:53 ` Henning Hraban Ramm 2011-08-19 15:08 ` Lilypond (Re: buffer names in MKII) Aditya Mahajan 2011-08-19 20:18 ` Lilypond Henning Hraban Ramm 2011-08-20 8:19 ` Lilypond Aditya Mahajan 2011-08-21 1:22 ` Lilypond David Wooten 2011-08-21 12:07 ` Lilypond Henning Hraban Ramm 2011-08-21 18:25 ` Lilypond Henning Hraban Ramm 2011-08-21 22:14 ` Lilypond Aditya Mahajan 2011-08-21 22:24 ` Lilypond Hans Hagen 2011-08-21 22:32 ` Lilypond Aditya Mahajan 2011-08-22 1:53 ` Lilypond Aditya Mahajan 2011-08-22 13:59 ` Lilypond Henning Hraban Ramm 2011-08-22 15:18 ` Lilypond Aditya Mahajan 2011-08-19 0:09 ` buffer names in MKII Aditya Mahajan 2011-08-19 7:53 ` Hans Hagen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).