From 0e557f25dd0457ee8e5a9c861327d0fb2701b8d8 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 25 Jul 2002 22:54:52 +0000 Subject: [PATCH] move output-formats doco to WikiWiki. --- ChangeLog | 8 ++ Documentation/index.texi | 5 +- Documentation/user/internals.itely | 179 ----------------------------- Documentation/user/invoking.itexi | 7 +- Documentation/user/tutorial.itely | 6 +- input/test/count-systems.ly | 4 +- lily/main.cc | 11 +- po/fr.po | 14 +-- scm/documentation-lib.scm | 3 - scm/lily.scm | 35 +++--- 10 files changed, 60 insertions(+), 212 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75acf689b5..e44454bc01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ +2002-07-26 Han-Wen + + * Documentation/user/internals.itely: move output-formats doco to + WikiWiki. + + 2002-07-25 Han-Wen + + * po/fr.po: update from TP * input/template/GNUmakefile (TITLE): add lysdoc target for the templates diff --git a/Documentation/index.texi b/Documentation/index.texi index f350e61600..83d9533fc5 100644 --- a/Documentation/index.texi +++ b/Documentation/index.texi @@ -113,8 +113,11 @@ familiar with English terms for notation. Full documentation of internals, generated from the sources. If you want to fine-tune output, you need the information in this document. +@item @uref{../../input/templates/out-www/templates.html,Templates} +input templates, for different formats of music. Add notes, and done! + @item @uref{../../input/test/out-www/test.html,Input snippets} -All of the example input snippets, with the corresponding output +All of the tips-and-trick input snippets, with the corresponding output shown. Also available in @uref{../../input/test/out-www/test.ps.gz,PostScript} and @uref{../../input/test/out-www/test.pdf,PDF} formats. diff --git a/Documentation/user/internals.itely b/Documentation/user/internals.itely index 3956ee4816..44c5a8624a 100644 --- a/Documentation/user/internals.itely +++ b/Documentation/user/internals.itely @@ -124,190 +124,11 @@ section. @c FIXME: Note entry vs Music entry at top level menu is confusing. @c . {Music entry} @menu -* Output formats:: * Interpretation context:: * Syntactic details:: * Lexical details:: @end menu -@c . {Output formats} -@node Output formats -@section Output formats - -LilyPond can output processed music in different output formats. They -can be used by invoking lilypond directly, i.e. not through ly2dvi, -and supplying the @code{-f} command line option. See also -@ref{Invoking LilyPond}. - -@menu -* @TeX{} output:: -* PostScript output:: -* Scheme output:: -* ASCIIScript output:: -* Sketch output:: -@end menu - -@node @TeX{} output -@subsection @TeX{} output -@cindex @TeX{} output - -LilyPond will use @TeX{} by default. Even if you want to produce -PostScript output for viewing or printing, you should normally have -LilyPond produce @TeX{} first. The .tex output must be processed by -@TeX{} (@strong{not} La@TeX{}) to generate a .dvi. Then, @file{Dvips} -is used to generate PostScript. Alternatively, @file{ly2dvi} can be -used to generate the .dvi for you. - -@refbugs - -Titling is not generated unless you use @file{ly2dvi}. - - -@node PostScript output -@subsection PostScript output -@cindex PostScript output -@cindex direct PostScript output - -LilyPond can produce PostScript directly, without going through @TeX{}. -Currently, this is mainly useful if you cannot use TeX, because direct -PostScript output has some problems; see Bugs below. - -@example -$ lilypond -fps foo.ly -GNU LilyPond 1.3.144 -Now processing: `foo.ly' -Parsing... -Interpreting music...[3] -Preprocessing elements... -Calculating column positions... -paper output to foo.ps... - -$ cat /usr/share/lilypond/pfa/feta20.pfa foo.ps | lpr -@end example - - -@refbugs - -Text font selection is broken. - -The .ps file does not contain the .pfa font files. To print a .ps -created through direct postscript output, you should prepend the -necessary .pfa files to LilyPond's .ps output, or upload them to the -printer before printing. - -The line height calculation is broken, you must set @var{lineheight} in -the paperblock if you have more than one staff in your score, e.g. - -@example - ... - \paper @{ - % Set line height to 40 staff spaces - lineheight = 40 - @} -@end example - -@node Scheme output -@subsection Scheme output -@cindex Scheme output - -In the typesetting stage, LilyPond builds a page description, which is -then written to disk in postscript, @TeX{} or ASCII art. Before it is -written, the page description is represented as Scheme expressions. You -can also dump these Scheme expressions to a file, which may be -convenient for debugging output routines. This is done with the Scheme -output format - -@example -$ lilypond -fscm foo.ly -GNU LilyPond 1.3.144 -Now processing: `foo.ly' -Parsing... -Interpreting music...[3] -Preprocessing elements... -Calculating column positions... -paper output to foo.scm... - -$ head -4 foo.scm -;;; Usage: guile -s x.scm > x.tex - (primitive-load-path 'standalone.scm) -; (scm-tex-output) - (scm-ps-output) - -$ guile -s foo.scm > foo.tex -@end example - - -@node ASCIIScript output -@subsection ASCIIScript output -@cindex ASCIIScript output -@cindex ascii script -@cindex ascii art - -LilyPond can output ASCII Art. This is a two step process, LilyPond -produces an ASCII description file, dubbed ASCIIScript (extension -@file{.as}). ASCIIScript has a small and simple command set that -includes font selection, character and string printing and line drawing -commands. The program @file{as2text} is used to translate an .as file -to text. - -To produce ASCII Art, you must include an ASCII Art paper definition -file in your .ly, one of: -@example -\include "paper-as5.ly" -\include "paper-as9.ly" -@end example - -Here's an example use for ASCII Art output (the example file -@file{as-email.ly} is included in the LilyPond distribution), the staff -symbol has been made invisible: - -@example -$ lilypond -fas as-email.ly -GNU LilyPond 1.3.144 -Now processing: `as-email.ly' -Parsing... -Interpreting music...[3] -Preprocessing elements... -Calculating column positions... [2] -paper output to as-email.as... - -$ as2text as-email.as 2>/dev/null - |\ - |/ |##|##| | | | | | - /| | | | | |\ |\ |\ |\ |\ | - / |_ 3 | | | | 5 | )| )| )| )| )| - | /| \ 8 * * * | 8 * * * * * | - \_|_/ | | - *_| - - lily -@end example - - -@refbugs - -The ASCII Art fonts are far from complete and not very well designed. -It's easy to change the glyphs, though; if you think you can do better, -have a look at @file{mf/*.af}. - -Lots of resizable symbols such as slurs, ties and tuplets are missing. - -The poor looks of most ASCII Art output and its limited general -usefulness gives ASCII Art output a low priority; it may be -dropped in future versions. - - -@node Sketch output -@subsection Sketch output - -@uref{http://sketch.sourceforge.net,Sketch} is a Free vector drawing -program. LilyPond includes bare bones output for Sketch version -0.7. - -@cindex Sketch -@cindex vector drawing -@cindex drawing program - @node Interpretation context @section Interpretation context diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index 0cbbec4fe0..27faa46090 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -58,6 +58,11 @@ output, to be processed with plain @TeX{}, or through ly2dvi), @code{scm} (for a Scheme dump), @code{sk} (for Sketch) and @code{as} (for ASCII-art). +@strong{This option is only for developers}. Only the @TeX{} output of +these is usable for real work. More information can be found at +@uref{http://lilypond.org/wiki?OutputFormats}. + + @cindex output format, setting @cindex Sketch output @cindex ASCII-art output @@ -65,8 +70,6 @@ output, to be processed with plain @TeX{}, or through ly2dvi), @cindex PostScript output @cindex Scheme dump -Unless you have special requirements, you should use @TeX{} -output. All other options are experimental. @item -h,--help Show a summary of usage. @item --include, -I=@var{directory} diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 22de59d79f..52f5cdf3e1 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -2783,8 +2783,10 @@ hacker. From here, you can try fiddling with input files, coming back to the reference manual for information. Also don't forget to check out the @ifhtml -@uref{,templates}, @uref{,example} and -@uref{,feature test} snippets. +@uref{../../templates/out-www/templates.html,templates}, +@uref{../../test/out-www/test.html,example} and +@uref{../../regression/out-www/regression.html,feature test} +snippets. @end ifhtml @ifnothtml templates, example and feature test snippets. diff --git a/input/test/count-systems.ly b/input/test/count-systems.ly index f342b183eb..1717ee753e 100644 --- a/input/test/count-systems.ly +++ b/input/test/count-systems.ly @@ -7,7 +7,7 @@ } #(define (display-systemno smob) - (let* ((this-system (get-line smob)) + (let* ((this-system (get-system smob)) (systems (get-broken-into (get-original this-system)))) (display smob) @@ -34,4 +34,4 @@ \paper{ indent = 0.0\mm linewidth = 10.0\mm } -} \ No newline at end of file +} diff --git a/lily/main.cc b/lily/main.cc index 8f9f34a1ba..62ad88655f 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -109,7 +109,7 @@ static Long_option_init options_static[] = { {_i ("EXPR"), "evaluate", 'e',_i ("Scheme options: try -e \"(set-lily-option 'help 0)\" for more help.")}, /* another bug in option parser: --output=foe is taken as an abbreviation for --output-format */ - {_i ("EXT"), "format", 'f', _i ("use output format EXT (tex [default], pdftex, ps, scm or as)")}, + {_i ("EXT"), "format", 'f', _i ("use output format EXT")}, {0, "help", 'h', _i ("this help")}, {_i ("FIELD"), "header", 'H', _i ("write header field to BASENAME.FIELD")}, {_i ("DIR"), "include", 'I', _i ("add DIR to search path")}, @@ -462,7 +462,14 @@ main (int argc, char **argv) exit (0); break; case 'f': - output_format_global = oparser_p_static->optional_argument_ch_C_; + if (output_name_global == "help") + { + cout << \ + "See http://lilypond.org/wiki?OutputFormats for more information.\n"\ + "This option is for developers only.\n"; + exit (0); + } + output_format_global = oparser_p_static->optional_argument_ch_C_; break; case 'P': dependency_prefix_global = oparser_p_static->optional_argument_ch_C_; diff --git a/po/fr.po b/po/fr.po index f312dfcc01..ad3bd3adde 100644 --- a/po/fr.po +++ b/po/fr.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: lilypond 1.5.69\n" "POT-Creation-Date: 2002-07-21 01:00+0200\n" -"PO-Revision-Date: 2002-07-24 08:00-0500\n" +"PO-Revision-Date: 2002-07-25 08:00-0500\n" "Last-Translator: Michel Robitaille \n" "Language-Team: French \n" "MIME-Version: 1.0\n" @@ -245,11 +245,11 @@ msgstr "DUR*NUM/DEN" #: midi2ly.py:102 msgid "allow tuplet durations DUR*NUM/DEN" -msgstr "" +msgstr "permettre un tuplet de durées DUR*NUM/DEN" #: midi2ly.py:106 msgid "treat every text as a lyric" -msgstr "" +msgstr "traiter chaque texte comme des paroles" #: midi2ly.py:1027 msgid "Example:" @@ -428,22 +428,22 @@ msgstr "Erreur de programmation: %s (Poursuite; croisons les doigts)\n" #: accidental-engraver.cc:181 new-accidental-engraver.cc:234 #, c-format msgid "Accidental typesetting list must begin with context-name: %s" -msgstr "" +msgstr "Liste de mise en page accidentelle doit débuter avec un nom de contexte: %s" #: accidental-engraver.cc:206 new-accidental-engraver.cc:259 #, c-format msgid "unknown accidental typesetting: %s. Ignored" -msgstr "" +msgstr "mise en page accidentelle inconnue: %s. Ignorée" #: accidental-engraver.cc:222 new-accidental-engraver.cc:275 #, c-format msgid "Symbol is not a parent context: %s. Ignored" -msgstr "" +msgstr "Symbole n'est pas un contexte parent: %s. Ignoré" #: accidental-engraver.cc:225 new-accidental-engraver.cc:278 #, c-format msgid "Accidental typesetting must be pair or context-name: %s" -msgstr "" +msgstr "Mise en page accidentelle doit être pair ou un nom de contexte: %s" #: afm.cc:60 #, c-format diff --git a/scm/documentation-lib.scm b/scm/documentation-lib.scm index 0ea2a97946..ba9685ad0a 100644 --- a/scm/documentation-lib.scm +++ b/scm/documentation-lib.scm @@ -119,9 +119,6 @@ Add a ref if REF is set (texi-menu items-alist))) -(define (pad-string-to str wid) - (string-append str (make-string (max (- wid (string-length str)) 0) #\ )) - ) (define (texi-file-head name file-name top items-alist) diff --git a/scm/lily.scm b/scm/lily.scm index e8dac6b527..8e00cc15dd 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -128,26 +128,33 @@ (define output-alist `( - ("tex" . ,tex-output-expression) - ("ps" . ,ps-output-expression) - ("scm" . ,write) - ("as" . ,as-output-expression) -; ("pysk" . ,pysk-output-expression) - ("sketch" . ,sketch-output-expression) - ("pdftex" . ,pdftex-output-expression) -)) + ("tex" . ("TeX output. The default output form." ,tex-output-expression)) + ("ps" . ("Direct postscript. Requires setting GS_LIB and GS_FONTPATH" ,ps-output-expression)) + ("scm" . ("Scheme dump: debug scheme molecule expressions" ,write)) + ("as" . ("Asci-script. Postprocess with as2txt to get ascii art" ,as-output-expression)) + ("sketch" . ("Bare bones Sketch output. Requires sketch 0.7" ,sketch-output-expression)) + ("pdftex" . ("PDFTeX output. Was last seen nonfunctioning." ,pdftex-output-expression)) + )) + +(define (pad-string-to str wid) + (string-append str (make-string (max (- wid (string-length str)) 0) #\ )) + ) +(define (document-format-dumpers) + (map + (lambda (x) + (display (string-append (pad-string-to 5 (car x)) (cadr x) "\n")) + output-alist) + )) (define (find-dumper format ) (let* ((d (assoc format output-alist))) - (if (pair? d) - (cdr d) - scm-output-expression) - )) - - + (if (pair? d) + (caddr d) + (scm-error "Could not find dumper for format ~s" format)) + )) (define X 0) (define Y 1) -- 2.39.5