]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/usage/running.itely
Issue 5166/2: Doc: Delete note for svg backend which become unnecessary
[lilypond.git] / Documentation / usage / running.itely
index 7f42d14bdd8e83bf2807f281f649fd78f9f51636..4eeabc80dc587e6c033cebe160b6d8e66ffe3bb5 100644 (file)
@@ -128,6 +128,44 @@ particular shell, Command (Windows), Terminal or Console
 applications (MacOS X) to see if output redirection is supported or if
 the syntax is different.
 
+The following example searches and processes all input files in the
+current directory and all directories below it recursively.  The output
+files will be located in the same directory that the command was run in,
+rather than in the same directories as the original input files.
+
+@example
+find . -name '*.ly' -exec lilypond '@{@}' \;
+@end example
+
+@noindent
+This should also work for MacOS@tie{}X users.
+
+A Windows user would run;
+
+@example
+forfiles /s /M *.ly /c "cmd /c lilypond @@file"
+@end example
+
+@noindent
+entering these commands in a @code{command prompt} usually found under
+@code{Start > Accessories > Command Prompt} or for version 8 users,
+by typing in the search window @q{command prompt}.
+
+Alternatively, an explicit path to the top-level of your folder
+containing all the sub-folders that have input files in them can be
+stated using the @code{/p} option;
+
+@example
+forfiles /s /p C:\Documents\MyScores /M *.ly /c "cmd /c lilypond @@file"
+@end example
+
+If there are spaces in the path to the top-level folder, then the whole
+path needs to be inside double quotes;
+
+@example
+forfiles /s /p "C:\Documents\My Scores" /M *.ly /c "cmd /c lilypond @@file"
+@end example
+
 
 @node Basic command line options for LilyPond
 @unnumberedsubsec Basic command line options for LilyPond
@@ -141,6 +179,34 @@ The following options are supported:
 
 @table @code
 
+@item -b, --bigpdfs
+@cindex bigpdfs
+
+PDF files generated will be much larger than normal (due to little or no
+font optimization).  However, if two or more PDF files are included
+within @w{@code{pdftex}}, @w{@code{xetex}} or @w{@code{luatex}}
+documents they can then be processed further via ghostscript (merging
+duplicated font data) resulting in @emph{significantly} smaller PDF
+files.
+
+@example
+lilypond -b myfile
+@end example
+
+Then run @code{ghostscript};
+
+@example
+gs -q -sDEVICE=pdfwrite -o gsout.pdf myfile.pdf
+@end example
+
+@code{pdfsizeopt.py} can then be used to further optimize the size
+of file;
+
+@example
+pdfsizeopt.py --use-multivalent=no gsout.pdf final.pdf
+@end example
+
+
 @item -d, --define-default=@var{var}=@var{val}
 See @ref{Advanced command line options for LilyPond}.
 
@@ -180,6 +246,10 @@ which formats should be written.  Choices for @code{format} are
 
 Example: @code{lilypond -fpng @var{filename}.ly}
 
+@noindent
+For @code{svg} and @code{eps} formats use the @code{-dbackend} option.
+See @ref{Advanced command line options for LilyPond}.
+
 @item -h, --help
 Show a summary of usage.
 
@@ -345,8 +415,10 @@ Show the warranty with which GNU LilyPond comes.  (It comes with
 
 @table @code
 
-@item -d@var{[option-name]}=@var{[value]},--define-default=@var{[option-name]}=@var{[value]}
-This sets the equivalent internal Scheme function to @var{value}.
+@item -d@var{[option-name]}=@var{[value]},
+--define-default=@var{[option-name]}=@var{[value]}
+This sets the equivalent internal Scheme function to @var{value}.  For
+example;
 
 @example
 -dbackend=svg
@@ -354,7 +426,7 @@ This sets the equivalent internal Scheme function to @var{value}.
 
 If a @var{value} is not supplied, then the default value is used.  The
 prefix @code{no-} may be added to @var{option-name} to switch @q{off} an
-option, e.g.
+option.  For example;
 
 @cindex point and click, command line
 
@@ -379,46 +451,48 @@ default values:
 
 @item @code{anti-alias-factor}
 @tab @code{1}
-@tab Render at higher resolution (using given factor) and scale down
-result to prevent @q{jaggies} in @code{PNG} images.
+@tab Render at a higher resolution (using the given factor) and scale
+down the result to prevent @q{jaggies} in @code{PNG} images.
 
 @item @code{aux-files}
 @tab @code{#t}
-@tab Create @code{.tex}, @code{.texi}, @code{.count} files in the
-@code{EPS} backend.
+@tab Create @code{.tex}, @code{.texi} and @code{.count} files when used
+with the @code{eps} backend option.
 
 @item @code{backend}
 @tab @code{ps}
-@tab Select backend.  Postscript files (default) include @code{TTF},
-@code{Type1} and @code{OTF} fonts.  No subsetting of these fonts is
-done.  Using @q{oriental} character sets can lead to very large files.
+@tab This is the default setting.  Postscript files (default) include
+@code{TTF}, @code{Type1} and @code{OTF} fonts.  No @q{subsetting} of
+these fonts is done.  Be aware that using @q{oriental} character sets
+can lead to very large file sizes.
 
 @item
 @tab @code{eps}
-@tab Encapsulated PostScript.  This dumps every page (system) as a
-separate @file{EPS} file, without fonts, and as one collated @file{EPS}
-file with all pages (systems) including fonts.  Used as default by
-@command{lilypond-book}.
+@tab Used as default by the @command{lilypond-book} command.  This dumps
+every page as both a single file with all pages and fonts included and
+as separate encapsulated postscript files for each page but without fonts
+included.
 
 @item
 @tab @code{null}
-@tab Do not output a printed score; has the same effect as
+@tab Do not output a printed score.  This has the same effect as
 @code{-dno-print-pages}.
 
 @item
-@tab @code{svg}
-@tab Scalable Vector Graphics.  This creates a single SVG file,
-without embedded fonts, for every page of output.  It is recommended to
-install the Century Schoolbook fonts, included with your LilyPond
-installation, for optimal rendering.  Under UNIX, simply copy these
-fonts from the LilyPond directory (typically
-@file{/usr/share/lilypond/VERSION/fonts/otf/}) to @file{~/.fonts/}.
-There is also an option @code{svg-woff} (below) for use of woff font
-files in the SVG backend.
+@tab @code{scm}
+@tab This dumps out the raw, internal Scheme-based drawing commands.
 
 @item
-@tab @code{scm}
-@tab Dump of the raw, internal Scheme-based drawing commands.
+@tab @code{svg}
+@tab Scalable Vector Graphics.
+A single SVG file is created for every page of output.  Music glyphs
+are encoded as vector graphics, but text fonts are @emph{not} embedded
+in the SVG files.  Any SVG viewer will therefore need the relevant text
+fonts to be available to it for proper rendering of both text and
+lyrics.  It is recommended to not use font @q{lists} or @q{aliases}
+in case an SVG viewer is unable to handle them.  When using
+@emph{Web Open Font Format} (WOFF) files the additional
+@code{--svg-woff} switch is required.
 
 @item @code{check-internal-types}
 @tab @code{#f}
@@ -426,7 +500,10 @@ files in the SVG backend.
 
 @item @code{clip-systems}
 @tab @code{#f}
-@tab Generate cut-out snippets of a score.
+@tab Extract music fragments out of a score.  This requires that the
+@code{clip-regions} function has been defined within the @code{\layout}
+block.  See @ruser{Extracting fragments of music}.  No fragments are
+extracted though if used with the @option{-dno-print-pages} option.
 
 @item @code{datadir}
 @tab
@@ -479,11 +556,19 @@ compilation.
 @tab @code{#f}
 @tab Dump output signatures of each system. Used for regression testing.
 
+@item @code{embed-source-code}
+@tab @code{#f}
+@tab Embed the LilyPond source files inside the generated PDF document.
+
 @item @code{eps-box-padding}
 @tab @code{#f}
 @tab Pad left edge of the output EPS bounding box by the given amount
 (in mm).
 
+@item @code{font-export-dir}
+@tab @code{#f [dir]}
+@tab Directory for exporting fonts as PostScript files.
+
 @item @code{gs-load-fonts}
 @tab @code{#f}
 @tab Load fonts via Ghostscript.
@@ -492,6 +577,10 @@ compilation.
 @tab @code{#f}
 @tab Load only the LilyPond fonts via Ghostscript.
 
+@item @code{gs-never-embed-fonts}
+@tab @code{#f}
+@tab Make Ghostscript embed only TrueType fonts and no other font format.
+
 @item @code{gui}
 @tab @code{#f}
 @tab Runs silently and redirect all output to a log file.
@@ -682,7 +771,13 @@ size increases in PDF files.
 
 @item @code{svg-woff}
 @tab @code{#f}
-@tab Use woff font files in SVG backend.
+@tab This option is required when using Web Open Font Format (WOFF) font
+files with the backend @code{svg} command.  A single SVG file is created
+for every page of output.  Apart from LilyPond's own music glyphs, no
+other font information will be included.  Any SVG viewer will therefore
+require the fonts be available to it for the proper rendering of both
+text and lyrics.  It is also recommended not to use any font @q{aliases}
+or @q{lists} in case the SVG viewer cannot handle them.
 
 @item @code{trace-memory-frequency}
 @tab @code{#f}
@@ -947,6 +1042,7 @@ are easily handled.
 * Error message FT_Get_Glyph_Name::
 * Warning staff affinities should only decrease::
 * Error message unexpected new::
+* Warning this voice needs a voiceXx or shiftXx setting::
 @end menu
 
 @node Music runs off the page
@@ -990,9 +1086,9 @@ would cause all note heads within the following staff to be
 colored red, but in fact it results in two staves with the note
 heads remaining the default black in the lower staff.
 
-@lilypond[quote,verbatim,relative=2]
+@lilypond[quote,verbatim,fragment]
 \override Staff.NoteHead.color = #red
-\new Staff { a }
+\new Staff { a' }
 @end lilypond
 
 This is because a @code{Staff} context does not exist when the
@@ -1001,10 +1097,10 @@ is applied to it, but then the @code{\new Staff} command creates
 another, separate, staff into which the notes are placed.  The
 correct code to color all note heads red is
 
-@lilypond[quote,verbatim,relative=2]
+@lilypond[quote,verbatim]
 \new Staff {
   \override Staff.NoteHead.color = #red
-  a
+  a'
 }
 @end lilypond
 
@@ -1030,6 +1126,7 @@ UTF-8 encoding.  For details, see @ruser{Text encoding}.
 
 @node Warning staff affinities should only decrease
 @unnumberedsubsec Warning staff affinities should only decrease
+
 This warning can appear if there are no staves in the printed
 output, for example if there are just a @code{ChordName} context
 and a @code{Lyrics} context as in a lead sheet.  The warning
@@ -1093,3 +1190,37 @@ staves are introduced in parallel, i.e. simultaneously:
   >>
 }
 @end lilypond
+
+@node Warning this voice needs a voiceXx or shiftXx setting
+@unnumberedsubsec Warning this voice needs a @code{@bs{}voiceXx} or @code{@bs{}shiftXx} setting
+
+If notes from two different voices with stems in the same direction
+occur at the same musical moment, but the voices have no
+voice-specific shifts specified, the warning message
+@samp{warning: this voice needs a \voiceXx or \shiftXx setting} will appear
+when compiling the LilyPond file.  This warning will appear even when
+the notes have no visible stems, e.g. whole notes, if the stems for
+shorter notes at the same pitch would be in the same direction.
+
+Remember that the stem direction depends on the position of the
+note on the staff unless the stem direction is specified, for example
+by using @code{\voiceOne}, etc.  In this case the warning will appear
+only when the stems happen to be in the same direction, i.e. when the
+notes are in the same half of the staff.
+
+By placing the notes in voices with stem directions and shifts
+specified, for example by using @code{\voiceOne}, etc., these warnings
+may be avoided.
+
+Notes in higher numbered voices, @code{\voiceThree} etc., are
+automatically shifted to avoid clashing note columns.  This causes a
+visible shift for notes with stems, but whole notes are not visibly
+shifted unless an actual clash of the note heads occurs, or when the
+voices cross over from their natural order (when @code{\voiceThree}
+is higher than @code{\voiceOne}, etc.)
+
+@seealso
+@rlearning{Explicitly instantiating voices},
+@rlearning{Real music example},
+@ruser{Single-staff polyphony},
+@ruser{Collision resolution}.