<ul>
<li>
<a class="title" href="user/lilypond/index.de.html">Notationsreferenz (NR)</a>
- (auf <a class="title" href="user/lilypond-big-page.html">einer großen Seite</a> ~ 4 MB,
+ (auf <a class="title" href="user/lilypond-big-page.de.html">einer großen Seite</a> ~ 4 MB,
als <a class="title" href="user/lilypond.de.pdf">PDF</a>)
<br>(Notation mit LilyPond setzen.)
<br>(<strong>Achtung:</strong> dieses Dokument ist erst teilweise auf deutsch übersetzt,<br>
<ul>
<li>
<a class="title" href="user/lilypond-program/index.de.html">Anwendungsbenutzung (AU)</a>
- (auf <a class="title" href="user/lilypond-program-big-page.html">einer großen Seite</a>,
+ (auf <a class="title" href="user/lilypond-program-big-page.de.html">einer großen Seite</a>,
als <a class="title" href="user/lilypond-program.de.pdf">PDF</a>)
<br>(Wie das Programm installiert und gestartet wird.)</li>
ISOLANG = de
depth = ../../..
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-user
-BIG_PAGE_MANUALS = lilypond-learning
include $(depth)/make/stepmake.make
und die graphischen Objekte, so dass unmittelbar mit der Notation
begonnen werden kann. Siehe das folgende Beispiel:
-@lilypond[quote,ragged-right,packed,verbatim]
+@lilypond[quote,ragged-right,verbatim]
\include "gregorian.ly"
\score {
<<
(pos (ly:grob-property grob 'staff-position)))
(if (memq 'note-head-interface interfaces)
(begin
- (ly:grob-set-property! grob 'stencil ly:text-interface::print)
- (ly:grob-set-property! grob 'font-family 'roman)
- (ly:grob-set-property! grob 'text
- (make-raise-markup -0.5
- (case pos
- ((-5) (make-simple-markup "m"))
- ((-3) (make-simple-markup "c "))
- ((-2) (make-smaller-markup (make-bold-markup "2")))
- (else (make-simple-markup "bla")))))))))
+ (ly:grob-set-property! grob 'stencil
+ (grob-interpret-markup grob
+ (make-lower-markup 0.5
+ (case pos
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) (make-smaller-markup (make-bold-markup "2")))
+ (else "bla")))))))))
\new Voice \relative c' {
- \stemUp
- \set autoBeaming = ##f
- \time 2/4
- <d f g>4
- \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
- \once \override NoteHead #'font-size = #-7
- \once \override NoteHead #'font-family = #'sans
- \once \override NoteHead #'font-series = #'bold
- <d f g>
- \once \override NoteHead #'style = #'cross
- <d f g>
- \applyOutput #'Voice #mc-squared
- <d f g>
- <<
- { d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
- >>
+ \stemUp
+ \set autoBeaming = ##f
+ \time 2/4
+ <d f g>4
+ \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
+ \once \override NoteHead #'font-size = #-7
+ \once \override NoteHead #'font-family = #'sans
+ \once \override NoteHead #'font-series = #'bold
+ <d f g>4
+ \once \override NoteHead #'style = #'cross
+ <d f g>4
+ \applyOutput #'Voice #mc-squared
+ <d f g>4
+ <<
+ { d8[ es-( fis^^ g] fis2-) }
+ \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ >>
}
@end lilypond
Streckt Musikfragmente mit nur einer Notenzeile auf die volle Breite,
es wird also @code{ragged-right = ##f} in das Musikfragment eingefügt.
-@c does this option still exist in lilypond? -jm
-@item packed
-Erzeugt Notenzeilen mit möglichst engem Notenabstand, es wird also
-@code{packed = ##t} in das Musikfragment eingefügt.
-
@item line-width
@itemx line-width=@var{Breite}\@var{Einheit}
Setzt die Breite der Notenzeilen auf @var{Breite}, gemessen in Vielfachen
@ifhtml
+@ifset bigpage
+@macro untranslated
+@end macro
+@end ifset
+
+@ifclear bigpage
@macro untranslated
UNTRANSLATED NODE: IGNORE ME
@end macro
+@end ifclear
@end ifhtml
@ifnothtml
-
@macro untranslated
@end macro
-
@end ifnothtml
ISOLANG = es
depth = ../../..
LOCALSTEPMAKE_TEMPLATES = lilypond ly doc-i18n-user
-BIG_PAGE_MANUALS = lilypond-learning lilypond lilypond-program
include $(depth)/make/stepmake.make
forma que pueda inmediatamente comenzar a escribir el canto en sÃ,
como lo demuestra el siguiente fragmento:
-@lilypond[quote,ragged-right,packed,verbatim]
+@lilypond[quote,ragged-right,verbatim]
\include "gregorian.ly"
\score {
<<
(pos (ly:grob-property grob 'staff-position)))
(if (memq 'note-head-interface interfaces)
(begin
- (ly:grob-set-property! grob 'stencil ly:text-interface::print)
- (ly:grob-set-property! grob 'font-family 'roman)
- (ly:grob-set-property! grob 'text
- (make-raise-markup -0.5
- (case pos
- ((-5) (make-simple-markup "m"))
- ((-3) (make-simple-markup "c "))
- ((-2) (make-smaller-markup (make-bold-markup "2")))
- (else (make-simple-markup "bla")))))))))
+ (ly:grob-set-property! grob 'stencil
+ (grob-interpret-markup grob
+ (make-lower-markup 0.5
+ (case pos
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) (make-smaller-markup (make-bold-markup "2")))
+ (else "bla")))))))))
\new Voice \relative c' {
- \stemUp
- \set autoBeaming = ##f
- \time 2/4
- <d f g>4
- \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
- \once \override NoteHead #'font-size = #-7
- \once \override NoteHead #'font-family = #'sans
- \once \override NoteHead #'font-series = #'bold
- <d f g>
- \once \override NoteHead #'style = #'cross
- <d f g>
- \applyOutput #'Voice #mc-squared
- <d f g>
- <<
- { d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
- >>
+ \stemUp
+ \set autoBeaming = ##f
+ \time 2/4
+ <d f g>4
+ \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
+ \once \override NoteHead #'font-size = #-7
+ \once \override NoteHead #'font-family = #'sans
+ \once \override NoteHead #'font-series = #'bold
+ <d f g>4
+ \once \override NoteHead #'style = #'cross
+ <d f g>4
+ \applyOutput #'Voice #mc-squared
+ <d f g>4
+ <<
+ { d8[ es-( fis^^ g] fis2-) }
+ \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ >>
}
@end lilypond
pentagrama se amplÃe hasta igualar la anchura de la lÃnea, es decir,
se añade @code{ragged-right = ##f} al fragmento de LilyPond.
-@c does this option still exist in lilypond? -jm
-@item packed
-Producir lÃneas con el espaciado empaquetado, es decir, se añade
-@code{packed = ##t} al fragmento de código de LilyPond.
-
@item line-width
@itemx line-width=@var{tamaño}\@var{unidades}
Establecer el ancho de lÃnea como @var{tamaño}, utilizando
@ifhtml
+@ifset bigpage
+@macro untranslated
+@end macro
+@end ifset
+
+@ifclear bigpage
@macro untranslated
UNTRANSLATED NODE: IGNORE ME
@end macro
+@end ifclear
@end ifhtml
<li>
<a class="title"
href="user/lilypond-learning/index.fr.html">Manuel d'initiation</a>
- (partiellement traduit,<br>aussi en <a class="title" href="user/lilypond-learning-big-page.html">page
- unique en anglais</a> ~ 1,5 Mo, ou
+ (partiellement traduit,<br>aussi en <a class="title" href="user/lilypond-learning-big-page.fr.html">page
+ unique</a> ~ 1,5 Mo, ou
<a class="title" href="user/lilypond-learning.fr.pdf">au format PDF</a>)
<br>— commencer ici</li>
<li><a class="title" href="user/music-glossary/index.html">Glossaire</a>
<li>
<a class="title" href="user/lilypond/index.fr.html">Manuel de notation</a>
(partiellement traduit,<br>aussi en <a class="title"
- href="user/lilypond-big-page.html">page unique
- en anglais</a> ~ 4 Mo, ou
+ href="user/lilypond-big-page.fr.html">page unique</a> ~ 4 Mo, ou
<a class="title" href="user/lilypond.fr.pdf">au format PDF</a>)
<br>— gravure de musique avec LilyPond</li>
<li>
<a class="title" href="user/lilypond-internals/index.html">Référence des propriétés internes</a>
- <br>(en anglais, en <a class="title" href="user/lilypond-internals-big-page.html">page
+ <br>(en anglais, aussi en <a class="title" href="user/lilypond-internals-big-page.html">page
unique</a> ~ 1 Mo, <a class="title"
href="user/lilypond-internals.pdf">au format PDF</a>)
<br>— définitions pour les retouches</li>
<li>
<a class="title" href="user/lilypond-program/index.fr.html">Utilisation des programmes</a>
(partiellement traduit,<br>aussi en <a class="title"
- href="user/lilypond-program-big-page.html">page unique en anglais</a>, ou
+ href="user/lilypond-program-big-page.fr.html">page unique</a>, ou
<a class="title" href="user/lilypond-program.fr.pdf">au format PDF</a>)
<br>— installation et exécution des programmes</li>
<li><a class="title" href="../input/lsr/lilypond-snippets/index.html">Exemples de code</a>
-(en <a class="title" href="../input/lsr/lilypond-snippets-big-page.html">page unique en anglais</a> ~ 2 Mo,
+(en anglais, aussi en <a class="title" href="../input/lsr/lilypond-snippets-big-page.html">page unique</a> ~ 2 Mo,
au format <a class="title" href="user/lilypond-snippets.pdf">PDF</a>)
<br>— petits trucs, astuces et exemples</li>
</ul>
valeurs adéquates, de telle sorte que vous pouvez tout de suite vous
lancer dans la saisie de votre chant, comme ci-dessous :
-@lilypond[quote,ragged-right,packed,verbatim]
+@lilypond[quote,ragged-right,verbatim]
\include "gregorian.ly"
\score {
<<
(pos (ly:grob-property grob 'staff-position)))
(if (memq 'note-head-interface interfaces)
(begin
- (ly:grob-set-property! grob 'stencil ly:text-interface::print)
- (ly:grob-set-property! grob 'font-family 'roman)
- (ly:grob-set-property! grob 'text
- (make-raise-markup -0.5
- (case pos
- ((-5) (make-simple-markup "m"))
- ((-3) (make-simple-markup "c "))
- ((-2) (make-smaller-markup (make-bold-markup "2")))
- (else (make-simple-markup "bla")))))))))
+ (ly:grob-set-property! grob 'stencil
+ (grob-interpret-markup grob
+ (make-lower-markup 0.5
+ (case pos
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) (make-smaller-markup (make-bold-markup "2")))
+ (else "bla")))))))))
\new Voice \relative c' {
- \stemUp
- \set autoBeaming = ##f
- \time 2/4
- <d f g>4
- \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
- \once \override NoteHead #'font-size = #-7
- \once \override NoteHead #'font-family = #'sans
- \once \override NoteHead #'font-series = #'bold
- <d f g>
- \once \override NoteHead #'style = #'cross
- <d f g>
- \applyOutput #'Voice #mc-squared
- <d f g>
- <<
- { d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
- >>
+ \stemUp
+ \set autoBeaming = ##f
+ \time 2/4
+ <d f g>4
+ \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
+ \once \override NoteHead #'font-size = #-7
+ \once \override NoteHead #'font-family = #'sans
+ \once \override NoteHead #'font-series = #'bold
+ <d f g>4
+ \once \override NoteHead #'style = #'cross
+ <d f g>4
+ \applyOutput #'Voice #mc-squared
+ <d f g>4
+ <<
+ { d8[ es-( fis^^ g] fis2-) }
+ \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ >>
}
@end lilypond
@ifhtml
+@ifset bigpage
+@macro untranslated
+@end macro
+@end ifset
+
+@ifclear bigpage
@macro untranslated
UNTRANSLATED NODE: IGNORE ME
@end macro
+@end ifclear
@end ifhtml
proper values, so you can immediately go ahead entering the chant, as
the following excerpt demonstrates:
-@lilypond[quote,ragged-right,packed,verbatim]
+@lilypond[quote,ragged-right,verbatim]
\include "gregorian.ly"
\score {
<<
(pos (ly:grob-property grob 'staff-position)))
(if (memq 'note-head-interface interfaces)
(begin
- (ly:grob-set-property! grob 'stencil ly:text-interface::print)
- (ly:grob-set-property! grob 'font-family 'roman)
- (ly:grob-set-property! grob 'text
- (make-raise-markup -0.5
- (case pos
- ((-5) (make-simple-markup "m"))
- ((-3) (make-simple-markup "c "))
- ((-2) (make-smaller-markup (make-bold-markup "2")))
- (else (make-simple-markup "bla")))))))))
+ (ly:grob-set-property! grob 'stencil
+ (grob-interpret-markup grob
+ (make-lower-markup 0.5
+ (case pos
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) (make-smaller-markup (make-bold-markup "2")))
+ (else "bla")))))))))
\new Voice \relative c' {
- \stemUp
- \set autoBeaming = ##f
- \time 2/4
- <d f g>4
- \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
- \once \override NoteHead #'font-size = #-7
- \once \override NoteHead #'font-family = #'sans
- \once \override NoteHead #'font-series = #'bold
- <d f g>
- \once \override NoteHead #'style = #'cross
- <d f g>
- \applyOutput #'Voice #mc-squared
- <d f g>
- <<
- { d8[ es-( fis^^ g] fis2-) }
- \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
- >>
+ \stemUp
+ \set autoBeaming = ##f
+ \time 2/4
+ <d f g>4
+ \once \override NoteHead #'stencil = #ly:note-head::brew-ez-stencil
+ \once \override NoteHead #'font-size = #-7
+ \once \override NoteHead #'font-family = #'sans
+ \once \override NoteHead #'font-series = #'bold
+ <d f g>4
+ \once \override NoteHead #'style = #'cross
+ <d f g>4
+ \applyOutput #'Voice #mc-squared
+ <d f g>4
+ <<
+ { d8[ es-( fis^^ g] fis2-) }
+ \repeat unfold 5 { \applyOutput #'Voice #mc-squared s8 }
+ >>
}
@end lilypond
equal that of the line width, i.e., @code{ragged-right = ##f} is
added to the LilyPond snippet.
-@c does this option still exist in lilypond? -jm
-@item packed
-Produce lines with packed spacing, i.e., @code{packed = ##t} is added
-to the LilyPond snippet.
-
@item line-width
@itemx line-width=@var{size}\@var{unit}
Set line width to @var{size}, using @var{unit} as units. @var{unit} is
@snippets
-@ignore
-@c TODO Replace following example with this snippet when available
-@c Submitted to LSR 30 Nov 08
@lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
-{stand--alone-two--column-markup.ly}
-@end ignore
-
-Stand-alone text may be arranged in several columns using @code{\markup}
-commands:
-
-@lilypond[verbatim,quote]
-\markup {
- \fill-line {
- \hspace #1.0
- \column {
- \line {"O sacrum convivium" }
- \line {"in quo Christus sumitur," }
- \line {"recolitur memoria passionis ejus," }
- \line {"mens impletur gratia," }
- \line {"futurae gloriae nobis pignus datur." }
- \line {"Amen."}
- }
- \hspace #2
- \column {
- \line { \italic {"O sacred feast"} }
- \line { \italic {"in which Christ is received,"} }
- \line { \italic {"the memory of His Passion is renewed,"} }
- \line { \italic {"the mind is filled with grace," } }
- \line { \italic {"and a pledge of future glory is given to us." }}
- \line { \italic {"Amen."}}
- }
- \hspace #1.0
- }
-}
-@end lilypond
-@seealso
+{stand-alone-two-column-markup.ly}
@seealso
Notation Reference: @ref{Formatting text},
voice ignore the melisma. This is done by setting
@code{ignoreMelismata} in the Lyrics context.
-
-@c TODO: breaks compile
-@c seems to be fixed, does not break compile anymore --FV
@lilypond[verbatim,ragged-right,quote]
<<
\relative c' \new Voice = "lahlah" {
>>
@end lilypond
+@knownissues
+Unlike most @code{\set} commands, @code{\set ignoreMelismata} does
+not work if prefixed with @code{\once}. It is necessary to use
+@code{\set} and @code{\unset} to bracket the lyrics where melismata
+are to be ignored.
@subsubheading Switching to an alternative melody
Here is a simple explanation of the directory layout for LilyPond's
source files.
- . Toplevel READMEs, ChangeLog, build bootstrapping,
- patches for third party programs
+ . Toplevel READMEs, ChangeLog, build bootstrapping,
+ patches for third party programs
Documentation/
- bibliography/ .bib files with references to books and articles
- misc/ Old announcements, ChangeLogs and NEWS
- pictures/ The logo
- topdocs/ Sources for the toplevel READMEs
- (README.txt, INSTALL.txt, NEWS.txt etc.)
- user/ User manuals
- po/ translated manual node names
- fr/ es/ de/ docs translated to French, Spanish, German resp.
- buildscripts/ Scripts for the build process
- elisp/ Emacs LilyPond mode and syntax coloring
- flower/ A simple c++ library
- include/
- input/ Music input examples
- lsr/ Snippets from the LilyPond Snippet Repository
- (auto-generated, do not modify!)
- manual/ Examples from the manual
- mutopia/ Real music, more at www.mutopiaproject.org
- new/ Snippets which are too new for LSR
- regression/ Testing of features, one test per file
- texidocs/ Translations of texidoc and doctitle fields
- (for input/lsr)
- tutorial/ Examples from the tutorial
- lily/ C++ sources for LilyPond (lilypond-bin)
- include/
- ly/ System music include files
- make/ Specific make subroutines and packaging for
- Red Hat-like distributions (.spec files)
- mf/ MetaFont sources for the feta font
- po/ Translations
- ps/ PostScript library files
- python/ Python modules, MIDI module
- scm/ Scheme sources for LilyPond and subroutine files
- scripts/ End-user scripts
- stepmake/ Generic make subroutine files
- tex/ TeX library files
- vim/ Vi(M) LilyPond mode and syntax coloring
+ bibliography/ .bib files with references to books and articles
+ misc/ Old announcements, ChangeLogs and NEWS
+ pictures/ The logo
+ topdocs/ Sources for the toplevel READMEs
+ (README.txt, INSTALL.txt, NEWS.txt etc.)
+ user/ User manuals
+ po/ Translated manual node names
+ fr/ es/ de/ Docs translated to French, Spanish, German, resp.
+ buildscripts/ Scripts for the build process
+ elisp/ Emacs LilyPond mode and syntax coloring
+ flower/ A simple C++ library
+ input/ Music input examples
+ lsr/ Snippets from the LilyPond Snippet Repository
+ (auto-generated, do not modify!)
+ manual/ Examples from the manual
+ mutopia/ Real music, more at www.mutopiaproject.org
+ new/ Snippets which are too new for LSR
+ regression/ Testing of features, one test per file
+ texidocs/ Translations of texidoc and doctitle fields
+ (for input/lsr)
+ tutorial/ Examples from the tutorial
+ lily/ C++ sources for the LilyPond binary
+ ly/ System music include files
+ make/ Specific make subroutines and packaging for
+ Red Hat-like distributions (.spec files)
+ mf/ MetaFont sources for the Emmentaler and Aybabtu fonts
+ po/ Translations for binaries and end-user scripts
+ ps/ PostScript library files
+ python/ Python modules, MIDI module
+ scm/ Scheme sources for LilyPond and subroutine files
+ scripts/ End-user scripts
+ stepmake/ Generic make subroutine files
+ tex/ TeX and texinfo library files
+ vim/ Vi(M) LilyPond mode and syntax coloring
Trevor Daniels - Assistant Documentation Editor
Andrew Hawryluk - NR work
-Carl Sorenseon - NR work
+Carl Sorensen - NR work
Eyolf Østrem - NR work
Francisco Vila - NR work
Jay Hamilton - NR work
Joseph Harfouch - NR work
Patrick McCarty - NR work
Ralph Palmer - NR work
-Till Retting - NR work
+Till Rettig - NR work
Kurt Kroon - Glossary Updates, NR work
Alard de Boer - Formatting
Michael Rasmussen - Formatting
David Bobroff
David Griffel
Damien Heurtebise
+Daniel Hulme
Daniel Johnson
Dominic Neumann
Eduardo Vieira
Georg Dummer
Georg Romstorfer
Gilles Thibault
-Hernán J. González
+Hernán J. González
Hu Haipeng
Jay Anderson
James Kilfinger
Jesús Guillermo Andrade
Jonathan Henkelman
Kazuhiro Suzuki
+Kevin Dalley
Laura Conrad
Luc Wehli
-Maarten Hijzelendoorn
+Maarten Hijzelendoorn
Marc Lanoiselée
Mark Polesky
Matthijs Frankeno
return '<title>' + _ (m.group (1)) + double_punct_char_separator + ': ' \
+ m.group (2) + _ (m.group (3)) + '</title>'
-a_href_re = re.compile ('(?s)<a (?P<attributes>[^>]*?href="[\\w.#-_]+"[^>]*>)(?P<code><code>)?\
-(?P<appendix>Appendix )?(?P<leading>[A-Z0-9.]+ | (?:<){1,2} | [^:]+?: | |)\
-(?P<name>.+?)(?P<end_code>(?(code)</code>|))(?P<trailing>| (?:>){1,2} | |)</a>:?')
+a_href_re = re.compile ('(?s)<a (?P<attributes>[^>]*?href="[\\w.#-_]+"[^>]*?>)(?P<code><code>)?\
+(?P<appendix>Appendix )?(?P<leading>[A-Z0-9.]+ | (?:<){1,2} | [^>:]+?: | |)\
+(?P<name>(?:<samp><span class="command">|</?code>|</span>|[^>])+?)(?P<end_code>(?(code)</code>|))\
+(?P<trailing> (?:>){1,2} | |)</a>:?')
def a_href_gettext (m):
s = ''
\header {
lsrtags = "rhythms, editorial-annotations, chords, tweaks-and-overrides"
+ texidoces = "
+Las digitaciones y los números de cuerda aplicados a notas
+individuales evitan a las barras automáticamente, pero de forma
+predeterminada esto no es cierto para las digitaciones y números
+de cuerda que se aplican a notas concretas de acordes. El ejemplo
+siguiente muestra cómo se puede sobreescribir este comportamiento
+predeterminado:
+
+"
+ doctitlees = "Evitar colisiones entre digitaciones de acordes y barras de corchea"
+
texidoc = "
Fingerings and string numbers applied to individual notes will
automatically avoid beams, but this is not true by default for
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% Do not edit this file; it is auto-generated from input/new
%% This file is in the public domain.
\version "2.11.64"
\header {
- lsrtags = "expressive-marks, text"
-
texidoces = "
Este ejemplo proporciona una función para tipografiar un regulador
con texto por debajo, como \"molto\" o \"poco\". El ejemplo
"
doctitlees = "Centrar texto debajo de un regulador"
+ lsrtags = "expressive-marks, text"
+
texidoc = "
This example provides a function to typeset a hairpin (de)crescendo
with some additional text below it, such as \"molto\" or \"poco\". The
example also illustrates how to modify the way an object is normally
-printed, using some Scheme code.
-
+printed, using some Scheme code.
"
doctitle = "Center text below hairpin dynamics"
} % begin verbatim
-hairpinWithCenteredText = #(define-music-function (parser location text) (markup?)
+
+hairpinWithCenteredText =
+#(define-music-function (parser location text) (markup?)
#{
\override Voice.Hairpin #'stencil = #(lambda (grob)
- (ly:stencil-aligned-to
- (ly:stencil-combine-at-edge
- (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
- Y DOWN
- (ly:stencil-aligned-to (ly:text-interface::print grob) X CENTER))
- X LEFT))
- \override Voice.Hairpin #'text = $text
+ (ly:stencil-aligned-to
+ (ly:stencil-combine-at-edge
+ (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
+ Y DOWN
+ (ly:stencil-aligned-to (grob-interpret-markup grob $text) X CENTER))
+ X LEFT))
#})
hairpinMolto = \hairpinWithCenteredText \markup { \italic molto }
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% Do not edit this file; it is auto-generated from input/new
%% This file is in the public domain.
\version "2.11.64"
texidoc = "
The @code{\\applyOutput} command allows the tuning of any layout
-object, in any context. It requires a Scheme function with three
-arguments.
+object, in any context. It requires a Scheme function with three
+arguments."
-"
doctitle = "Changing properties for individual grobs"
} % begin verbatim
-\layout {
- ragged-right = ##t
-}
#(define (mc-squared grob grob-origin context)
(let*
- (
- (ifs (ly:grob-interfaces grob))
- (sp (ly:grob-property grob 'staff-position))
- )
- (if (memq 'note-head-interface ifs)
- (begin
- (ly:grob-set-property! grob 'stencil ly:text-interface::print)
- (ly:grob-set-property! grob 'font-family 'roman)
- (ly:grob-set-property! grob 'text
- (make-raise-markup -0.5
- (case sp
- ((-5) (make-simple-markup "m"))
- ((-3) (make-simple-markup "c "))
- ((-2) (make-smaller-markup (make-bold-markup "2")))
- (else (make-simple-markup "bla"))
- ))))
- )))
+ (
+ (ifs (ly:grob-interfaces grob))
+ (sp (ly:grob-property grob 'staff-position))
+ )
+ (if (memq 'note-head-interface ifs)
+ (begin
+ (ly:grob-set-property! grob 'stencil
+ (grob-interpret-markup grob
+ (make-lower-markup 0.5
+ (case sp
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) (make-smaller-markup (make-bold-markup "2")))
+ (else "bla")
+ ))))
+ ))))
\relative c' {
<d f g b>2
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% Do not edit this file; it is auto-generated from input/new
%% This file is in the public domain.
\version "2.11.64"
\header {
- lsrtags = "rhythms"
-
doctitlees = "Indicaciones de compases compuestos"
texidoces = "
Las indicaciones de compás poco frecuentes como \"5/8\" se pueden
"
doctitlede = "Zusammengesetzte Taktarten"
+ lsrtags = "rhythms"
texidoc = "
Odd 20th century time signatures (such as \"5/8\") can often be played
as compound time signatures (e.g. \"3/8 + 2/8\"), which combine two or
doctitle = "Compound time signatures"
} % begin verbatim
-#(define (compound-time one two num)
- (markup #:override '(baseline-skip . 0) #:number
- (#:line ((#:column (one num)) #:vcenter "+" (#:column (two num))))
- ))
-\relative {
- \override Staff.TimeSignature #'stencil = #ly:text-interface::print
- \override Staff.TimeSignature #'text = #(compound-time "2" "3" "8")
+#(define ((compound-time one two num) grob)
+ (grob-interpret-markup grob
+ (markup #:override '(baseline-skip . 0) #:number
+ (#:line (
+ (#:column (one num))
+ #:vcenter "+"
+ (#:column (two num))))
+ )))
+
+\relative c' {
+ \override Staff.TimeSignature #'stencil = #(compound-time "2" "3" "8")
\time 5/8
#(override-auto-beam-setting '(end 1 8 5 8) 1 4)
c8 d e fis gis
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% Do not edit this file; it is auto-generated from input/new
%% This file is in the public domain.
\version "2.11.64"
doctitle = "Flute slap notation"
} % begin verbatim
+
slap =
#(define-music-function (parser location music) (ly:music?)
-#{\override NoteHead #'stencil = #ly:text-interface::print
- \override NoteHead #'text = \markup \musicglyph #"scripts.sforzato"
- \override NoteHead #'extra-offset = #'(0.1 . 0.0 )
+#{
+ \override NoteHead #'stencil = #(lambda (grob)
+ (grob-interpret-markup grob
+ (markup #:musicglyph "scripts.sforzato")))
+ \override NoteHead #'extra-offset = #'(0.1 . 0.0)
$music
\revert NoteHead #'stencil
- \revert NoteHead #'text
- \revert NoteHead #'extra-offset #})
+ \revert NoteHead #'extra-offset
+#})
\relative c' {
- c \slap c d r \slap { g a } b r
+ c4 \slap c d r \slap { g a } b r
}
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% Do not edit this file; it is auto-generated from input/new
%% This file is in the public domain.
\version "2.11.64"
doctitle = "Heavily customized polymetric time signatures"
} % begin verbatim
-#(define (set-time-signature one two three four five six seven eight nine ten
- eleven num)
- (markup #:override '(baseline-skip . 0) #:number
- (#:line ((#:column (one num)) #:vcenter "+" (#:column (two num))
- #:vcenter "+" (#:column (three num)) #:vcenter "+" (#:column (four num))
- #:vcenter "+" (#:column (five num)) #:vcenter "+" (#:column (six num))
- #:vcenter "+" (#:column (seven num)) #:vcenter "+" (#:column (eight num))
- #:vcenter "+" (#:column (nine num)) #:vcenter "+" (#:column (ten num))
- #:vcenter "+" (#:column (eleven num))))
- ))
+#(define plus (markup #:vcenter "+"))
+#(define ((custom-time-signature one two three four five six
+ seven eight nine ten eleven num) grob)
+ (grob-interpret-markup grob
+ (markup #:override '(baseline-skip . 0) #:number
+ (#:line (
+ (#:column (one num)) plus
+ (#:column (two num)) plus
+ (#:column (three num)) plus
+ (#:column (four num)) plus
+ (#:column (five num)) plus
+ (#:column (six num)) plus
+ (#:column (seven num)) plus
+ (#:column (eight num)) plus
+ (#:column (nine num)) plus
+ (#:column (ten num)) plus
+ (#:column (eleven num))))
+ )))
melody = \relative c'' {
\set Staff.instrumentName = #"Bb Sop."
\key g \major
- \time 25/8
- \override Staff.TimeSignature #'stencil = #ly:text-interface::print
- \override Staff.TimeSignature #'text = #(set-time-signature "3" "2" "2" "3"
- "2" "2" "2" "2" "3" "2" "2" "8" )
- \set Staff.beatGrouping = #'(3 2 2 3 2 2 2 2 3 2 2)
- #(override-auto-beam-setting '(end * * 25 8) 3 8)
- #(override-auto-beam-setting '(end * * 25 8) 5 8)
- #(override-auto-beam-setting '(end * * 25 8) 7 8)
- #(override-auto-beam-setting '(end * * 25 8) 10 8)
- #(override-auto-beam-setting '(end * * 25 8) 12 8)
- #(override-auto-beam-setting '(end * * 25 8) 14 8)
- #(override-auto-beam-setting '(end * * 25 8) 16 8)
- #(override-auto-beam-setting '(end * * 25 8) 18 8)
- #(override-auto-beam-setting '(end * * 25 8) 21 8)
- #(override-auto-beam-setting '(end * * 25 8) 23 8)
-
+ #(set-time-signature 25 8 '(3 2 2 3 2 2 2 2 3 2 2))
+ \override Staff.TimeSignature #'stencil =
+ #(custom-time-signature "3" "2" "2" "3" "2" "2"
+ "2" "2" "3" "2" "2" "8")
c8 c c d4 c8 c b c b a4 g fis8 e d c b' c d e4-^ fis8 g \break
c,4. d4 c4 d4. c4 d c2 d4. e4-^ d4
c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break
@code{octave} specifies the octave (0 being the octave from middle C to
the B above), @code{step} specifies the note within the octave (0 means
C and 6 means B), and @code{alter} is @code{,SHARP ,FLAT ,DOUBLE-SHARP}
-etc. (Note the leading comma.)
+etc. (Note the leading comma.) The accidentals in the key signature
+will appear in the reverse order to that in which they are specified.
Alternatively, for each item in the list, using the more concise format
}
}
-\relative c {
- \set Score.timing = ##f
+\new Staff \relative c {
+ \cadenzaOn
\override Staff.Rest #'style = #'mensural
r\maxima^\markup \typewriter { mensural }
- r\longa r\breve r1 r2 r4 r8 r16 r32 r64 s128 s128
+ r\longa r\breve r1 r2 r4 r8 r16 s32 s64 s128 s128
\bar ""
\override Staff.Rest #'style = #'neomensural
r\maxima^\markup \typewriter { neomensural }
- r\longa r\breve r1 r2 r4 r8 r16 r32 r64 s128 s128
+ r\longa r\breve r1 r2 r4 r8 r16 s32 s64 s128 s128
\bar ""
\override Staff.Rest #'style = #'classical
--- /dev/null
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.64"
+
+\header {
+ lsrtags = "text"
+
+ texidoc = "
+Stand-alone text may be arranged in several columns using
+@code{\\markup} commands:
+
+"
+ doctitle = "Stand-alone two-column markup"
+} % begin verbatim
+
+\markup {
+ \fill-line {
+ \hspace #1.0
+ \column {
+ \line {"O sacrum convivium" }
+ \line {"in quo Christus sumitur," }
+ \line {"recolitur memoria passionis ejus," }
+ \line {"mens impletur gratia," }
+ \line {"futurae gloriae nobis pignus datur." }
+ \line {"Amen."}
+ }
+ \hspace #2
+ \column {
+ \line { \italic {"O sacred feast"} }
+ \line { \italic {"in which Christ is received,"} }
+ \line { \italic {"the memory of His Passion is renewed,"} }
+ \line { \italic {"the mind is filled with grace," } }
+ \line { \italic {"and a pledge of future glory is given to us." }}
+ \line { \italic {"Amen."}}
+ }
+ \hspace #1.0
+ }
+}
+
piano-template-with-centered-lyrics.ly
printing-marks-at-the-end-of-a-line-or-a-score.ly
printing-marks-on-every-staff.ly
+stand-alone-two-column-markup.ly
three-sided-box.ly
utf-8.ly
vocal-ensemble-template-with-lyrics-aligned-below-and-above-the-staves.ly
--- /dev/null
+\version "2.11.64"
+
+\header {
+ lsrtags = "expressive-marks, text"
+
+ texidoc = "
+This example provides a function to typeset a hairpin (de)crescendo
+with some additional text below it, such as \"molto\" or \"poco\". The
+example also illustrates how to modify the way an object is normally
+printed, using some Scheme code.
+"
+ doctitle = "Center text below hairpin dynamics"
+}
+
+hairpinWithCenteredText =
+#(define-music-function (parser location text) (markup?)
+#{
+ \override Voice.Hairpin #'stencil = #(lambda (grob)
+ (ly:stencil-aligned-to
+ (ly:stencil-combine-at-edge
+ (ly:stencil-aligned-to (ly:hairpin::print grob) X CENTER)
+ Y DOWN
+ (ly:stencil-aligned-to (grob-interpret-markup grob $text) X CENTER))
+ X LEFT))
+#})
+
+hairpinMolto = \hairpinWithCenteredText \markup { \italic molto }
+hairpinMore = \hairpinWithCenteredText \markup { \larger moltissimo }
+
+\layout { ragged-right = ##f }
+
+{
+ \hairpinMolto c'2\< c'\f
+ \hairpinMore c'2\< c'\f
+}
--- /dev/null
+\version "2.11.64"
+
+\header {
+ lsrtags = "tweaks-and-overrides"
+
+ texidoc = "
+The @code{\\applyOutput} command allows the tuning of any layout
+object, in any context. It requires a Scheme function with three
+arguments."
+
+ doctitle = "Changing properties for individual grobs"
+}
+
+#(define (mc-squared grob grob-origin context)
+ (let*
+ (
+ (ifs (ly:grob-interfaces grob))
+ (sp (ly:grob-property grob 'staff-position))
+ )
+ (if (memq 'note-head-interface ifs)
+ (begin
+ (ly:grob-set-property! grob 'stencil
+ (grob-interpret-markup grob
+ (make-lower-markup 0.5
+ (case sp
+ ((-5) "m")
+ ((-3) "c ")
+ ((-2) (make-smaller-markup (make-bold-markup "2")))
+ (else "bla")
+ ))))
+ ))))
+
+\relative c' {
+ <d f g b>2
+ \applyOutput #'Voice #mc-squared
+ <d f g b>2
+}
--- /dev/null
+\version "2.11.64"
+
+\header {
+ lsrtags = "rhythms"
+ texidoc = "
+Odd 20th century time signatures (such as \"5/8\") can often be played
+as compound time signatures (e.g. \"3/8 + 2/8\"), which combine two or
+more inequal metrics. LilyPond can make such music quite easy to read
+and play, by explicitly printing the compound time signatures and
+adapting the automatic beaming behavior. (Graphic measure grouping
+indications can also be added; see the appropriate snippet in this
+database.)
+
+"
+ doctitle = "Compound time signatures"
+}
+
+#(define ((compound-time one two num) grob)
+ (grob-interpret-markup grob
+ (markup #:override '(baseline-skip . 0) #:number
+ (#:line (
+ (#:column (one num))
+ #:vcenter "+"
+ (#:column (two num))))
+ )))
+
+\relative c' {
+ \override Staff.TimeSignature #'stencil = #(compound-time "2" "3" "8")
+ \time 5/8
+ #(override-auto-beam-setting '(end 1 8 5 8) 1 4)
+ c8 d e fis gis
+ c8 fis, gis e d
+ c8 d e4 gis8
+}
--- /dev/null
+\version "2.11.64"
+
+\header {
+ lsrtags = "winds"
+
+ texidoc = "
+It is possible to indicate special articulation techniques such as
+flute's \"tongue slap\", by replacing the note head with the
+appropriate glyph.
+
+"
+ doctitle = "Flute slap notation"
+}
+
+slap =
+#(define-music-function (parser location music) (ly:music?)
+#{
+ \override NoteHead #'stencil = #(lambda (grob)
+ (grob-interpret-markup grob
+ (markup #:musicglyph "scripts.sforzato")))
+ \override NoteHead #'extra-offset = #'(0.1 . 0.0)
+ $music
+ \revert NoteHead #'stencil
+ \revert NoteHead #'extra-offset
+#})
+
+\relative c' {
+ c4 \slap c d r \slap { g a } b r
+}
--- /dev/null
+\version "2.11.64"
+
+\header {
+ lsrtags = "rhythms, percussion"
+
+ texidoc = "
+Though the polymetric time signature shown was not the most essential
+item here, it has been included to show the beat of this piece (which
+is the template of a real Balkan song!).
+
+"
+ doctitle = "Heavily customized polymetric time signatures"
+}
+
+#(define plus (markup #:vcenter "+"))
+#(define ((custom-time-signature one two three four five six
+ seven eight nine ten eleven num) grob)
+ (grob-interpret-markup grob
+ (markup #:override '(baseline-skip . 0) #:number
+ (#:line (
+ (#:column (one num)) plus
+ (#:column (two num)) plus
+ (#:column (three num)) plus
+ (#:column (four num)) plus
+ (#:column (five num)) plus
+ (#:column (six num)) plus
+ (#:column (seven num)) plus
+ (#:column (eight num)) plus
+ (#:column (nine num)) plus
+ (#:column (ten num)) plus
+ (#:column (eleven num))))
+ )))
+
+melody = \relative c'' {
+ \set Staff.instrumentName = #"Bb Sop."
+ \key g \major
+ #(set-time-signature 25 8 '(3 2 2 3 2 2 2 2 3 2 2))
+ \override Staff.TimeSignature #'stencil =
+ #(custom-time-signature "3" "2" "2" "3" "2" "2"
+ "2" "2" "3" "2" "2" "8")
+ c8 c c d4 c8 c b c b a4 g fis8 e d c b' c d e4-^ fis8 g \break
+ c,4. d4 c4 d4. c4 d c2 d4. e4-^ d4
+ c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break
+ c4. d4 c4 d4. c4 d c2 d4. e4-^ d4
+ c4. d4 c4 d4. c4 d c2 d4. e4-^ d4 \break
+}
+
+drum = \new DrumStaff \drummode {
+ \bar "|:" bd4.^\markup { "Drums" } sn4 bd \bar ":" sn4.
+ bd4 sn \bar ":" bd sn bd4. sn4 bd \bar ":|"
+}
+
+{
+ \melody
+ \drum
+}
"
}
-\layout {
- ragged-right = ##t
-}
-
#(define (mc-squared gr org cur)
(let*
- (
- (ifs (ly:grob-interfaces gr))
- (sp (ly:grob-property gr 'staff-position))
- )
- (if (memq 'note-head-interface ifs)
- (begin
- (ly:grob-set-property! gr 'stencil ly:text-interface::print)
- (ly:grob-set-property! gr 'font-family 'roman)
- (ly:grob-set-property! gr 'text
- (make-raise-markup -0.5
- (case sp
- ((-5) (make-simple-markup "m"))
- ((-3) (make-simple-markup "c "))
- ((-2) (make-smaller-markup (make-bold-markup "2")))
- (else (make-simple-markup "bla"))
- ))))
- )))
-
-\context Voice \relative c' {
- \stemUp
+ (
+ (ifs (ly:grob-interfaces gr))
+ (sp (ly:grob-property gr 'staff-position))
+ )
+ (if (memq 'note-head-interface ifs)
+ (begin
+ (ly:grob-set-property! gr 'stencil
+ (grob-interpret-markup gr
+ (make-raise-markup -0.5
+ (case sp
+ ((-5) (make-simple-markup "m"))
+ ((-3) (make-simple-markup "c "))
+ ((-2) (make-smaller-markup (make-bold-markup "2")))
+ (else (make-simple-markup "bla"))
+ ))))
+ ))))
+
+\new Voice \relative c' {
\set autoBeaming = ##f
- { <d f g b>8
+ <d f g b>8
- \applyOutput #'Voice #mc-squared
- <d f g b>
- }
+ \applyOutput #'Voice #mc-squared
+ <d f g b>8
}
-
-% EOF
%% Modern notation:
\new Staff {
\relative c'' {
- \key es \major \time 3/4
-
- %% this bar contains no \breathe
- <<
- { g4 as g } \\
- { es4 bes es }
- >> |
-
%% by default, \breathe uses the rcomma, just as if saying:
- %% \override BreathingSign #'text =
- % #(make-musicglyph-markup "scripts.rcomma")
- <<
- { g4 as g } \\
- { es4 \breathe bes es }
- >> |
+ %% \override BreathingSign #'text =
+ %% #(make-musicglyph-markup "scripts.rcomma")
+ %%
+ c4 c \breathe c c |
%% rvarcomma and lvarcomma are variations of the default rcomma
%% and lcomma
-
- %% N.B.: must use Staff context here, since we start a Voice below
- \override Staff.BreathingSign #'text =
- #(make-musicglyph-markup "scripts.rvarcomma")
- <<
- { g4 as g } \\
- { es4 \breathe bes es }
- >> |
+ %%
+ \override Staff.BreathingSign #'text =
+ #(make-musicglyph-markup "scripts.rvarcomma")
+ c4 c \breathe c c |
%% wedge
- \override BreathingSign #'text =
- #(make-musicglyph-markup "scripts.upbow")
- es8 d es f g8 \breathe f |
+ %%
+ \override BreathingSign #'text =
+ #(make-musicglyph-markup "scripts.upbow")
+ c4 c \breathe c c |
%% caesurae
- \override BreathingSign #'text =
- #(make-musicglyph-markup "scripts.caesura.curved.curved")
- es8[ d] \breathe
- \override BreathingSign #'text =
- #(make-musicglyph-markup "scripts.caesura.curved.straight")
- es[ f] \breathe g[ f] |
- es2 r4 \bar "||" \break
+ %%
+ \override BreathingSign #'text =
+ #(make-musicglyph-markup "scripts.caesura.curved")
+ c4 c \breathe c c |
+
+ \override BreathingSign #'text =
+ #(make-musicglyph-markup "scripts.caesura.straight")
+ c4 c \breathe c c |
}
}
}
\test "" ##[ \noPageTurn #]
%% Checks
-\test "" ##[ \octave a' #] % RelativeOctaveCheck
+\test "" ##[ \octaveCheck a' #] % RelativeOctaveCheck
\test "" ##[ | #] % BarCheck
%% Marks
\header {
-
- texidoc = "This file demonstrates how to load different
- (postscript) fonts. The file @file{font.scm} shows how to define
- the scheme-function @code{make-century-schoolbook-tree}.
-
- This file should be run with the TeX and extra options should be
- passed to LaTeX and dvips to help it find the uncb font."
-
+ texidoc = "This file demonstrates how to load different (postscript)
+fonts. The file @file{font.scm} shows how to define the scheme-function
+@code{make-century-schoolbook-tree}."
}
+
\version "2.11.51"
-\paper
-{
- #(define text-font-defaults
- '((font-encoding . latin1)
- (baseline-skip . 2)
- (word-space . 0.6)))
+\paper {
+ #(define text-font-defaults
+ '((font-encoding . latin1)
+ (baseline-skip . 2)
+ (word-space . 0.6)))
- #(set! fonts (make-century-schoolbook-tree 1.0))
+ #(set! fonts (make-century-schoolbook-tree 1.0))
}
-%ugh.
-% do this here so we don't forget the connection with
-% this file.
-#(system "afm2tfm `kpsewhich uncb8a.afm` uncb8a.tfm")
-
\layout {
- line-width = 160 \mm - 2.0 * 9.0 \mm
+ line-width = 160 \mm - 2.0 * 9.0 \mm
-
- indent = 0.0\mm
- ragged-right = ##t
+ indent = 0.0\mm
+ ragged-right = ##t
}
{
- \key a \major
- \time 6/8
- cis''8.
-
-%% uncomment to test postscript fonts.
-% ^"test!"
-
-
-
- d''16 cis''8 e''4 e''8
+ \key a \major
+ \time 6/8
+ cis''8.^"test!" d''16 cis''8 e''4 e''8
}
-
+\version "2.11.65"
\header {
texidoc = " A dotted whole note displayed via the @code{\\note}
command must separate the note head and the dot. The dot avoids the upflag."
}
-\paper {
- packed = ##T
-}
-
-\version "2.11.51"
-
-\relative {
- c^\markup { \note #"1." #1 }
- c^\markup { \note #"2." #1 }
- c^\markup { \note #"8." #1 }
+\relative c' {
+ c4^\markup { \note #"1." #1 }
+ c4^\markup { \note #"2." #1 }
+ c4^\markup { \note #"8." #1 }
}
-
-\version "2.11.51"
+\version "2.11.65"
\header {
texidoc = "Mensural ligatures show different shapes, depending on the
\layout {
ragged-right = ##t
- packed = ##t
indent = 0.0
\context {
\Voice
- \remove Ligature_bracket_engraver
- \consists Mensural_ligature_engraver
+ \remove "Ligature_bracket_engraver"
+ \consists "Mensural_ligature_engraver"
+ }
+ \context {
+ \Score
+ \override SpacingSpanner #'packed-spacing = ##t
}
}
-\context Voice{
+\context Voice {
\clef "petrucci-c4"
\set Staff.printKeyCancellation = ##f
\cadenzaOn % turn off bar lines
#(set-accidental-style 'forget)
+ \textLengthOn
% ligaturae binaria
\version "2.11.51"
\relative c'{
- a\rest a8[ a\rest b] |
+ a\rest a8[ a\rest b]
}
} }
>>
\break
- c4) f='2.(\break
+ c4) f,='2.(\break
a2.)
\stemUp
<d='' d'>8( <c c'> \break
\relative {
- \grace e=''16( d8.[) c16]
+ \grace e'=''16( d8.[) c16]
d=''8.[ \grace f16( e16)]
s2
<< {c=''8.([ es16] bes4~bes )}
{r8 <as es> r <f des> r }
>>
\new Voice { \voiceOne b='8[ c16( d]) }
- g='8[( a b b! ] c4 bes)
+ g,='8[( a b b! ] c4 bes)
bes='8( f' des bes) as4( bes)
r8 d( f e d c b a)
- cis=''4( d) f'=''16( e) d( c)
+ cis=''4( d) f=''16( e) d( c)
s4
- c'=''2(~c8 d16 c b8 a)
+ c=''2(~c8 d16 c b8 a)
- <c=' g>4 ( f <g b>) f
+ <c,=' g>4 ( f <g b>) f
<c g>^( f <g b>) f
<c g>_( f <g b>)
<g b>_( g <b d>)
s2.|
e4( dis4)
e4( dis4)
- g='16( b d fis)
- \clef bass a=8[ e16(f] g[ a b d,)] s4 | \break
+ g,='16( b d fis)
+ \clef bass a,,=8[ e16(f] g[ a b d,)] s4 | \break
e=8[( f] g[ a b d,)] s4 |
\clef treble
\new Voice {
\slurDown
- c=''4(^"slurs forced down" d, c') s4
+ c''=''4(^"slurs forced down" d, c') s4
f=''2( d4 f | g c a f | d c f2 | f1) |
}
\set tieWaitForNote = ##f
<c e> ~
<c e c'>
- |
}
/* properties */
"accidental-grobs "
+ "direction "
"left-padding "
"padding "
"positioning-done "
}
#if HAVE_PANGO_FT2
- if (scm_is_string (name)
- && is_pango_format_global)
+ if (scm_is_string (name))
return select_pango_font (layout, chain);
else
#endif
DECLARE_UNSMOB (Font_metric, metrics);
-Box lookup_tex_text_dimension (Font_metric *font, SCM text);
-
char *pfb2pfa (Byte const *pfb, int length);
#endif /* FONT_METRIC_HH */
class Swallow_performer;
class System;
class Tempo_performer;
-class Tex_font_metric;
class Tie;
class Tie_details;
class Tie_configuration;
extern bool be_safe_global;
extern bool be_verbose_global;
extern bool do_internal_type_checking_global;
-extern bool is_pango_format_global;
-extern bool is_TeX_format_global;
extern bool point_and_click_global;
extern string lilypond_datadir;
extern bool use_object_keys;
Box get_indexed_char (size_t) const;
size_t index_to_ascii (size_t) const;
Box get_ascii_char (size_t) const;
- Box tex_kludge (string) const;
};
#endif /* MODIFIED_FONT_METRIC_HH */
+++ /dev/null
-/*
- text-metrics.hh -- declare text metric lookup functions
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2004--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#ifndef TEXT_METRICS_HH
-#define TEXT_METRICS_HH
-
-#include "lily-guile.hh"
-#include "box.hh"
-
-void try_load_text_metrics (string);
-SCM ly_load_text_dimensions (SCM);
-Box lookup_tex_text_dimension (Font_metric *font,
- SCM text);
-
-#endif /* TEXT_METRICS_HH */
-
#include "parser.hh"
#include "score.hh"
#include "sources.hh"
-#include "text-metrics.hh"
#include "warn.hh"
#include "program-option.hh"
void
Lily_parser::parse_file (string init, string name, string out_name)
{
- if (get_output_backend_name () == "tex")
- try_load_text_metrics (out_name);
-
// TODO: use $parser
lexer_->set_identifier (ly_symbol2scm ("parser"), self_scm ());
output_basename_ = out_name;
/* Output formats to generate. */
string output_format_global = "";
-bool is_pango_format_global;
-bool is_TeX_format_global;
-
/* Current output name. */
string output_name_global;
/* Bug in option parser: --output =foe is taken as an abbreviation
for --output-format. */
{_i ("FORMATs"), "formats", 'f', _i ("dump FORMAT,... Also as separate options:")},
- {0, "dvi", 0, _i ("generate DVI (tex backend only)")},
{0, "pdf", 0, _i ("generate PDF (default)")},
{0, "png", 0, _i ("generate PNG")},
{0, "ps", 0, _i ("generate PostScript")},
- {0, "tex", 0, _i ("generate TeX (tex backend only)")},
{0, "help", 'h', _i ("show this help and exit")},
{_i ("FIELD"), "header", 'H', _i ("dump header field FIELD to file\n"
"named BASENAME.FIELD")},
if (be_verbose_global)
dir_info (stderr);
- is_pango_format_global = !is_TeX_format_global;
init_scheme_variables_global = "(list " + init_scheme_variables_global + ")";
init_scheme_code_global = "(begin " + init_scheme_code_global + ")";
init_freetype ();
ly_reset_all_fonts ();
- is_TeX_format_global = (get_output_backend_name () == "tex"
- || get_output_backend_name () == "texstr");
-
-
/* We accept multiple independent music files on the command line to
reduce compile time when processing lots of small files.
Starting the GUILE engine is very time consuming. */
setlocale (LC_ALL, "");
/* FIXME: check if this is still true.
- Disable localisation of float values. This breaks TeX output. */
+ Disable localisation of float values. */
setlocale (LC_NUMERIC, "C");
string localedir = LOCALEDIR;
switch (opt->shortname_char_)
{
case 0:
- if (string (opt->longname_str0_) == "dvi"
- || string (opt->longname_str0_) == "pdf"
+ if (string (opt->longname_str0_) == "pdf"
|| string (opt->longname_str0_) == "png"
- || string (opt->longname_str0_) == "ps"
- || string (opt->longname_str0_) == "tex")
+ || string (opt->longname_str0_) == "ps")
add_output_format (opt->longname_str0_);
else if (string (opt->longname_str0_) == "relocate")
relocate_binary = true;
#include "modified-font-metric.hh"
#include "pango-font.hh"
-#include "text-metrics.hh"
#include "warn.hh"
#include "stencil.hh"
#include "main.hh"
{
}
-/* TODO: put this klutchness behind ly:option switch. */
-Box
-Modified_font_metric::tex_kludge (string text) const
-{
- Interval ydims;
- Real w = 0;
- for (ssize i = 0; i < text.length (); i++)
- {
- switch (text[i])
- {
- case '\\':
- /* Accent marks use width of base letter */
- if (i < text.length () - 1)
- {
- if (text[i + 1]=='\'' || text[i + 1]=='`' || text[i + 1]=='"'
- || text[i + 1]=='^')
- {
- i++;
- break;
- }
- /* For string width \\ is a \ and \_ is a _. */
- if (text[i + 1]=='\\' || text[i + 1]=='_')
- break;
- }
-
- for (i++; (i < text.length ()) && !isspace (text[i])
- && text[i]!='{' && text[i]!='}'; i++)
- ;
-
- /* Compensate for the auto-increment in the outer loop. */
- i--;
- break;
-
- case '{': // Skip '{' and '}'
- case '}':
- break;
-
- default:
- Box b = get_ascii_char ((unsigned char)text[i]);
-
- /* Use the width of 'x' for unknown characters */
- if (b[X_AXIS].length () == 0)
- b = get_ascii_char ((unsigned char)'x');
-
- w += b[X_AXIS].length ();
- ydims.unite (b[Y_AXIS]);
- break;
- }
- }
-
- if (ydims.is_empty ())
- ydims = Interval (0, 0);
-
- return Box (Interval (0, w), ydims);
-}
-
Stencil
Modified_font_metric::text_stencil (string text) const
{
Box
Modified_font_metric::text_dimension (string text) const
{
- SCM stext = ly_string2scm (text);
-
Box b;
- if (get_output_backend_name () == "tex")
- {
- b = lookup_tex_text_dimension (orig_, stext);
-
- if (!b[Y_AXIS].is_empty ())
- {
- b.scale (magnification_);
- return b;
- }
-
- b = tex_kludge (text);
- return b;
- }
-
Interval ydims;
-
Real w = 0.0;
for (ssize i = 0; i < text.length (); i++)
#include "engraver.hh"
+#include "hairpin.hh"
#include "international.hh"
#include "item.hh"
#include "note-column.hh"
if (current_spanner_)
{
current_spanner_->set_bound (LEFT, script_);
- set_nested_property (current_spanner_,
- scm_list_3 (ly_symbol2scm ("bound-details"),
- ly_symbol2scm ("left"),
- ly_symbol2scm ("attach-dir")
- ),
- scm_from_int (RIGHT));
+
+ if (!Hairpin::has_interface (current_spanner_))
+ set_nested_property (current_spanner_,
+ scm_list_3 (ly_symbol2scm ("bound-details"),
+ ly_symbol2scm ("left"),
+ ly_symbol2scm ("attach-dir")
+ ),
+ scm_from_int (RIGHT));
}
}
" Takes three arguments, @var{layout}, @var{props}, and @var{markup}.\n"
"\n"
"@var{layout} is a @code{\\layout} block; it may be obtained from a grob with"
-" @code{ly:grob-layout}. @var{props} is a alist chain, ie. a list of alists."
-" This is typically obtained with"
+" @code{ly:grob-layout}. @var{props} is an alist chain, i.e. a list of"
+" alists. This is typically obtained with"
" @code{(ly:grob-alist-chain (ly:layout-lookup layout 'text-font-defaults))}."
" @var{markup} is the markup text to be processed.");
SCM
+++ /dev/null
-/*
- text-metrics.cc -- implement text metric lookup functions
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2004--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
-*/
-
-#include "dimensions.hh"
-#include "font-metric.hh"
-#include "main.hh"
-#include "file-path.hh"
-
-static SCM text_dimension_hash_tab;
-
-Box
-lookup_tex_text_dimension (Font_metric *font, SCM text)
-{
- Box b;
-
- /*
- Actually, it's defined in framework-texstr, but let's see how long
- it takes before we get a bugreport. HWN 13/2/2006.
- */
- SCM limit = ly_lily_module_constant ("TEX_STRING_HASHLIMIT");
- string key_str = ly_scm2string (font->font_file_name ());
- int hash_code = scm_to_int (scm_hash (text, limit));
- key_str = to_string (hash_code) + key_str;
-
- SCM val = SCM_BOOL_F;
- if (text_dimension_hash_tab)
- {
- scm_hash_ref (text_dimension_hash_tab,
- ly_string2scm (key_str),
- SCM_BOOL_F);
- }
- if (scm_is_pair (val))
- {
- b[X_AXIS][LEFT] = 0.0;
- b[X_AXIS][RIGHT] = scm_to_double (scm_car (val)) * point_constant;
- val = scm_cdr (val);
- b[Y_AXIS][UP] = scm_to_double (scm_car (val)) * point_constant;
- val = scm_cdr (val);
- b[Y_AXIS][DOWN] = scm_to_double (scm_car (val)) * point_constant;
- }
-
- return b;
-}
-
-LY_DEFINE (ly_load_text_dimensions, "ly:load-text-dimensions",
- 1, 0, 0,
- (SCM dimension_alist),
- "Load dimensions from @TeX{} in a @code{(KEY . (W H D))} format"
- " alist.")
-{
- if (!text_dimension_hash_tab)
- {
- text_dimension_hash_tab
- = scm_gc_protect_object (scm_c_make_hash_table (113));
- }
-
- for (SCM s = dimension_alist;
- scm_is_pair (s);
- s = scm_cdr (s))
- {
- SCM key = scm_caar (s);
- SCM val = scm_cdar (s);
-
- if (scm_hash_ref (text_dimension_hash_tab, key, SCM_BOOL_F)
- == SCM_BOOL_F)
- scm_hash_set_x (text_dimension_hash_tab, key, val);
- }
-
- return SCM_UNSPECIFIED;
-}
-
-void
-try_load_text_metrics (string basename)
-{
- string path = global_path.find (basename + ".textmetrics");
- if (path != "")
- {
- string contents (gulp_file_to_string (path, true, -1));
- contents = "(quote (" + contents + "))";
-
- SCM lst = scm_c_eval_string (contents.c_str ());
- ly_load_text_dimensions (lst);
- }
-}
%
\layout {
indent = 0.0
- packed = ##t
%%% TODO: should raggedright be the default?
%ragged-right = ##t
#(use-modules (scm layout-page-layout))
\paper {
- %%%% WARNING
-
- %%% if you add any new dimensions, don't forget to update
- %%% the dimension-variables variable. see paper.scm
+ %%% WARNING
+ %%%
+ %%% If you add any new dimensions, don't forget to update
+ %%% the dimension-variables variable. See paper.scm.
unit = #(ly:unit)
mm = 1.0
in = 25.4
- pt = #(/ in 72.27)
+ pt = #(/ in 72.27)
cm = #(* 10 mm)
- %% This is weird; `everyone' uses LATIN1? How does I select TeX
- %% input encoding in EMACS? -- jcn
- %%%%input-encoding = #"TeX"
- input-encoding = #"latin1"
print-page-number = ##t
%%
#(define font-defaults
'((font-encoding . fetaMusic)))
- %% use lmodern in latin1 (cork) flavour if EC is not available.
+ %%
+ %% the font encoding `latin1' is a dummy value for Pango fonts
+ %%
#(define text-font-defaults
- `((font-encoding .
- ,(cond
- (tex-backend? 'Extended-TeX-Font-Encoding---Latin)
- (else 'latin1)))
- ;; add to taste here.
-
+ `((font-encoding . latin1)
(baseline-skip . 3)
(word-space . 0.6)))
local-WWW-1: $(MASTER_TEXI_FILES) $(PDF_FILES) $(XREF_MAPS_FILES)
-# BIG_PAGE_HTML_FILES is defined differently in each language makefile
local-WWW-2: $(DEEP_HTML_FILES) $(BIG_PAGE_HTML_FILES) $(DOCUMENTATION_LOCALE_TARGET)
find $(outdir) -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | xargs $(PYTHON) $(buildscript-dir)/html-gettext.py $(ISOLANG)
find $(outdir) -name '*.html' | xargs grep -L --label="" 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(outdir)/!!g' | xargs $(PYTHON) $(buildscript-dir)/mass-link.py --prepend-suffix .$(ISOLANG) hard $(outdir) $(top-build-dir)/Documentation/user/$(outdir) $(TELY_FILES:%.tely=%.pdf)
TELY_FILES := $(call src-wildcard,*.tely)
MASTER_TEXI_FILES := $(TELY_FILES:%.tely=$(outdir)/%.texi)
-BIG_PAGE_HTML_FILES := $(BIG_PAGE_MANUALS:%=$(outdir)/%-big-page.html)
+BIG_PAGE_HTML_FILES := $(TELY_FILES:%.tely=$(outdir)/%-big-page.html)
DEEP_HTML_FILES := $(TELY_FILES:%.tely=$(outdir)/%/index.html)
PDF_FILES := $(TELY_FILES:%.tely=$(outdir)/%.pdf)
% (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
% Jan Nieuwenhuizen <janneke@gnu.org>
%
-% these macros help create ascii logging output
-% to automate generation of lily tables and tex backend
-% The output should be parsed by the mf-to-table script
+% These macros help create ascii logging output
+% to automate generation of the lily tables.
+% The output should be parsed by the mf-to-table script.
message "******************************************************";
b4_Inc_state restore
} bind def
-/set_tex_dimen
-{
- cvr def
-} bind def
-
/stroke_and_fill {
gsave
stroke
(set! formats (cons "ps" formats)))
(for-each (lambda (x)
(if (member x formats) (set! new-fmts (cons x new-fmts))))
- '("tex" "dvi" "ps" "pdf" "png"))
+ '("ps" "pdf" "png"))
(uniq-list (reverse new-fmts)))
(define (header-to-file file-name key value)
@code{#LEFT}=@code{-1}, @code{#RIGHT}=@code{1}, @code{#CENTER}=@code{0}.")
(dot-count ,integer? "The number of dots.")
(dot-negative-kern ,number? "The space to remove between a dot
-a and slash in percent repeat glyphs. Larger values bring the two
+and a slash in percent repeat glyphs. Larger values bring the two
elements closer together.")
(dot-placement-list ,list? "List
consisting of @code{(@var{description} @var{string-number}
number, the quicker the slur attains its @code{height-limit}.")
(remove-empty ,boolean? "If set, remove group if it contains no
interesting items.")
- (remove-first ,boolean? "Remove the first staff of a orchestral
+ (remove-first ,boolean? "Remove the first staff of an orchestral
score?")
(restore-first ,boolean? "Print a natural before the
accidental.")
(object-callbacks . ((normal-stems . ,ly:beam::calc-normal-stems)))
(interfaces . (staff-symbol-referencer-interface
unbreakable-spanner-interface
- beam-interface))))))
+ beam-interface
+ font-interface))))))
(BendAfter
. (
(interfaces . (paper-column-interface
axis-group-interface
separation-item-interface
- spaceable-grob-interface))))))
+ spaceable-grob-interface
+ font-interface))))))
(NoteCollision
. (
font-interface
note-head-interface
ledgered-interface
- staff-symbol-referencer-interface))))))
+ staff-symbol-referencer-interface
+ gregorian-ligature-interface
+ mensural-ligature-interface
+ vaticana-ligature-interface))))))
(NoteSpacing
. (
(interfaces . (paper-column-interface
separation-item-interface
axis-group-interface
- spaceable-grob-interface))))))
+ spaceable-grob-interface
+ font-interface))))))
(ParenthesesItem
. ((stencil . ,parentheses-item::print)
text-interface
instrument-specific-markup-interface
side-position-interface
+ self-alignment-interface
font-interface))))))
(TextSpanner
()
"
@cindex inserting PostScript directly into text
-
This inserts @var{str} directly into the output as a PostScript
-command string. Due to technicalities of the output backends,
-different scales should be used for the @TeX{} and PostScript backend,
-selected with @code{-f}.
-
-For the @TeX{} backend, the following string prints a rotated text
-
-@example
-0 0 moveto /ecrm10 findfont
-1.75 scalefont setfont 90 rotate (hello) show
-@end example
-
-@noindent
-The magical constant 1.75 scales from LilyPond units (staff spaces) to
-@TeX{} dimensions.
-
-For the postscript backend, use the following
-
-@example
-gsave /ecrm10 findfont
- 10.0 output-scale div
- scalefont setfont 90 rotate (hello) show grestore
-@end example
+command string.
@lilypond[verbatim,quote]
eyeglassesps = #\"
(define-span-event-display-method CrescendoEvent (event parser) #f "\\<" "\\!")
(define-span-event-display-method DecrescendoEvent (event parser) #f "\\>" "\\!")
(define-span-event-display-method PhrasingSlurEvent (event parser) #f "\\(" "\\)")
-(define-span-event-display-method SustainEvent (event parser) #f "\\sustainDown" "\\sustainUp")
-(define-span-event-display-method SostenutoEvent (event parser) #f "\\sostenutoDown" "\\sostenutoUp")
+(define-span-event-display-method SustainEvent (event parser) #f "\\sustainOn" "\\sustainOff")
+(define-span-event-display-method SostenutoEvent (event parser) #f "\\sostenutoOn" "\\sostenutoOff")
(define-span-event-display-method TextSpanEvent (event parser) #f "\\startTextSpan" "\\stopTextSpan")
(define-span-event-display-method TrillSpanEvent (event parser) #f "\\startTrillSpan" "\\stopTrillSpan")
(define-span-event-display-method StaffSpanEvent (event parser) #f "\\startStaff" "\\stopStaff")
(define-display-method RelativeOctaveCheck (octave parser)
(let ((pitch (ly:music-property octave 'pitch)))
- (format #f "\\octave ~a~a"
+ (format #f "\\octaveCheck ~a~a"
(note-name->lily-string pitch parser)
(octave->lily-string pitch))))
;; TODO:
;; - generate this list by registering the output-backend-commands
;; output-backend-commands should have docstrings.
-;; - remove hard copies in output-ps output-tex
+;; - remove hard copies in output-ps
(define-public (ly:all-output-backend-commands)
"Return list of output backend commands."
;;;; encoding.scm -- font encoding
;;;;
;;;; source file of the GNU LilyPond music typesetter
-;;;;
+;;;;
;;;; (c) 2004--2008 Jan Nieuwenhuizen <janneke@gnu.org>
-
-
-(define-public latin1-coding-vector #(.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef space exclam quotedbl numbersign dollar percent ampersand quoteright parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore quoteleft a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef dotlessi grave acute circumflex tilde macron breve dotaccent dieresis .notdef ring cedilla .notdef hungarumlaut ogonek caron space exclamdown cent sterling currency yen brokenbar section dieresis copyright ordfeminine guillemotleft logicalnot hyphen registered macron degree plusminus twosuperior threesuperior acute mu paragraph periodcentered cedilla onesuperior ordmasculine guillemotright onequarter onehalf threequarters questiondown Agrave Aacute Acircumflex Atilde Adieresis Aring AE Ccedilla Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis multiply Oslash Ugrave Uacute Ucircumflex Udieresis Yacute Thorn germandbls agrave aacute acircumflex atilde adieresis aring ae ccedilla egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis eth ntilde ograve oacute ocircumflex otilde odieresis divide oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis))
+(define-public latin1-coding-vector
+ #(.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+ .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+ .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+ .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+ %% 0x20
+ space exclam quotedbl numbersign dollar percent ampersand quoteright
+ parenleft parenright asterisk plus comma hyphen period slash
+ zero one two three four five six seven
+ eight nine colon semicolon less equal greater question
+ %% 0x40
+ at A B C D E F G
+ H I J K L M N O
+ P Q R S T U V W
+ X Y Z bracketleft backslash bracketright asciicircum underscore
+ %% 0x60
+ `quoteleft a b c d e f g
+ h i j k l m n o
+ p q r s t u v w
+ x y z braceleft bar braceright asciitilde .notdef
+ %% 0x80
+ .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+ .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef
+ dotlessi grave acute circumflex tilde macron breve dotaccent
+ dieresis .notdef ring cedilla .notdef hungarumlaut ogonek caron
+ %% 0xA0
+ space exclamdown cent sterling currency yen brokenbar section
+ dieresis copyright ordfeminine guillemotleft logicalnot hyphen registered macron
+ degree plusminus twosuperior threesuperior acute mu paragraph periodcentered
+ cedilla onesuperior ordmasculine guillemotright onequarter onehalf threequarters questiondown
+ %% 0xC0
+ Agrave Aacute Acircumflex Atilde Adieresis Aring AE Ccedilla
+ Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis
+ Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis multiply
+ Oslash Ugrave Uacute Ucircumflex Udieresis Yacute Thorn germandbls
+ %% 0xE0
+ agrave aacute acircumflex atilde adieresis aring ae ccedilla
+ egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis
+ eth ntilde ograve oacute ocircumflex otilde odieresis divide
+ oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis))
(define-public (decode-byte-string str)
(let* ((len (string-length str))
(output-vector (make-vector len '.notdef)))
-
(do
((idx 0 (1+ idx)))
((>= idx len) output-vector)
(vector-set! output-vector idx
- (vector-ref latin1-coding-vector
- (char->integer (string-ref str idx)))))))
+ (vector-ref latin1-coding-vector
+ (char->integer (string-ref str idx)))))))
(define convert-to-pdf convert-to-pdf)
(define convert-to-ps convert-to-ps)
(define convert-to-png convert-to-png)
-(define convert-to-tex convert-to-tex)
-(define convert-to-dvi convert-to-dvi)
-
-
(define-public (convert-to-ps . args) #t)
(define-public (convert-to-pdf . args) #t)
(define-public (convert-to-png . args) #t)
-(define-public (convert-to-dvi . args) #t)
-(define-public (convert-to-tex . args) #t)
"%" "_" name)))
"m" (string-encode-integer (inexact->exact (round (* 1000 magnify)))))))
-(define (tex-font? fontname)
- (or
- (equal? (substring fontname 0 2) "cm")
- (equal? (substring fontname 0 2) "ec")))
-
(define (define-fonts paper)
(define font-list (ly:paper-fonts paper))
(define (define-font command fontname scaling)
(* paper-height output-scale (/ (ly:bp 1)))
name)))
-(define-public (convert-to-dvi book name)
- (ly:warning (_ "cannot generate ~S using the postscript back-end") "DVI"))
-
-(define-public (convert-to-tex book name)
- (ly:warning (_ "cannot generate ~S using the postscript back-end") "TeX"))
-
(define-public (convert-to-ps book name)
#t)
(define-public (convert-to-ps . args) #t)
(define-public (convert-to-pdf . args) #t)
(define-public (convert-to-png . args) #t)
-(define-public (convert-to-dvi . args) #t)
-(define-public (convert-to-tex . args) #t)
(define-public (convert-to-ps . args) #t)
(define-public (convert-to-pdf . args) #t)
(define-public (convert-to-png . args) #t)
-(define-public (convert-to-dvi . args) #t)
-(define-public (convert-to-tex . args) #t)
+++ /dev/null
-;;;; framework-tex.scm -- structure for TeX output
-;;;;
-;;;; source file of the GNU LilyPond music typesetter
-;;;;
-;;;; (c) 2004--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-(define-module (scm framework-tex)
- #:export (output-framework-tex
- output-classic-framework-tex))
-
-(use-modules (ice-9 regex)
- (ice-9 string-fun)
- (scm page)
- (scm paper-system)
- (guile)
- (srfi srfi-1)
- (srfi srfi-13)
- (srfi srfi-14)
- (scm kpathsea)
- (lily))
-
-(define format ergonomic-simple-format)
-
-(define (output-formats)
- (define formats (ly:output-formats))
- (set! formats (completize-formats formats))
- (if (member "ps" formats)
- (set! formats (cons "dvi" formats)))
- (if (member "dvi" formats)
- (set! formats (cons "tex" formats)))
-
- (uniq-list formats))
-
-(define framework-tex-module (current-module))
-(define-public (sanitize-tex-string s)
- (if (ly:get-option 'safe)
- (regexp-substitute/global
- #f "\\\\"
- (regexp-substitute/global #f "([{}])" s 'pre "\\" 1 'post)
- 'pre "$\\backslash$" 'post)
- s))
-
-(define (symbol->tex-key sym)
- (regexp-substitute/global
- #f "_" (sanitize-tex-string (symbol->string sym)) 'pre "X" 'post))
-
-(define (tex-number-def prefix key number)
- (string-append
- "\\def\\" prefix (symbol->tex-key key) "{" number "}%\n"))
-
-(define-public (digits->letters str)
- (regexp-substitute/global
- #f "[-\\._]"
- (regexp-substitute/global
- #f "([0-9])" str
- 'pre
- (lambda (match)
- (make-string
- 1
- (integer->char
- (+ (char->integer #\A)
- (- (char->integer #\0))
- (char->integer (string-ref (match:substring match 1) 0)))
- )))
- 'post)
- 'pre ""
- 'post))
-
-(define-public (tex-font-command-raw name magnification)
- (string-append
- "magfont"
- (digits->letters (format "~a" name))
- "m"
- (string-encode-integer
- (inexact->exact (round (* 1000 magnification))))))
-
-(define-public (tex-font-command font)
- (tex-font-command-raw
- (ly:font-file-name font) (ly:font-magnification font)))
-
-(define (otf-font-load-command paper font)
- (let* ((sub-fonts (ly:font-sub-fonts font)))
- (string-append
- (apply string-append
- (map
- (lambda (sub-name)
- (format "\\font\\~a=~a scaled ~a%\n"
- (tex-font-command-raw
- sub-name (ly:font-magnification font))
- sub-name
- (ly:number->string
- (inexact->exact
- (round (* 1000
- (ly:font-magnification font)
- (ly:paper-output-scale paper)))))))
- sub-fonts)))))
-
-(define (simple-font-load-command paper font)
- (format
- "\\font\\~a=~a scaled ~a%\n"
- (tex-font-command font)
- (ly:font-file-name font)
- (inexact->exact
- (round (* 1000
- (ly:font-magnification font)
- (ly:paper-output-scale paper))))))
-
-(define (font-load-command paper font)
- (if (pair? (ly:font-sub-fonts font))
- (otf-font-load-command paper font)
- (simple-font-load-command paper font)))
-
-(define (define-fonts paper)
- (string-append
- ;; UGH. FIXME.
- "\\def\\lilypondpaperunit{mm}%\n"
- (tex-number-def "lilypondpaper" 'output-scale
- (number->string (exact->inexact
- (ly:paper-output-scale paper))))
- (tex-string-def "lilypondpaper" 'papersize
- (eval 'papersizename (ly:output-def-scope paper)))
- ;; paper/layout?
- (tex-string-def "lilypondpaper" 'input-encoding
- (eval 'input-encoding (ly:output-def-scope paper)))
-
- (apply string-append
- (map (lambda (x) (font-load-command paper x))
- (ly:paper-fonts paper)))))
-
-(define (tex-string-def prefix key str)
- (if (equal? "" (sans-surrounding-whitespace (sanitize-tex-string str)))
- (string-append "\\let\\" prefix (symbol->tex-key key) "\\undefined%\n")
- (string-append "\\def\\" prefix (symbol->tex-key key)
- "{" (sanitize-tex-string str) "}%\n")))
-
-(define (header paper page-count classic?)
- (let ((scale (ly:output-def-lookup paper 'output-scale))
- (texpaper (string-append
- (ly:output-def-lookup paper 'papersizename)
- "paper"))
- (landscape? (eq? #t (ly:output-def-lookup paper 'landscape))))
- (string-append
- "% Generated by LilyPond "
- (lilypond-version) "\n"
- "% at " "time-stamp,FIXME" "\n"
- (if classic?
- (tex-string-def "lilypond" 'classic "1")
- "")
-
- (if (ly:get-option 'safe)
- "\\nofiles\n"
- "")
-
- (tex-string-def
- "lilypondpaper" 'line-width
- (ly:number->string (* scale (ly:output-def-lookup paper 'line-width))))
- "\\def\\lilyponddocumentclassoptions{"
- (sanitize-tex-string texpaper)
- (if landscape? ",landscape" "")
- "}%\n"
- )))
-
-(define (header-end)
- (string-append
- "\\def\\scaletounit{ "
- (number->string lily-unit->bigpoint-factor)
- " mul }%\n"
- "\\ifx\\lilypondstart\\undefined\n"
- " \\input lilyponddefs\n"
- "\\fi\n"
- "\\lilypondstart\n"
- "\\lilypondspecial\n"
- "\\lilypondpostscript\n"))
-
-(define (dump-page putter page last? with-extents?)
- (ly:outputter-dump-string
- putter
- (format "\\lybox{~a}{~a}{%\n"
- (if with-extents?
- (interval-start (ly:stencil-extent page X))
- 0.0)
- (if with-extents?
- (- (interval-start (ly:stencil-extent page Y)))
- 0.0)))
- (ly:outputter-dump-stencil putter page)
- (ly:outputter-dump-string
- putter
- (if last?
- "}%\n\\vfill\n"
- "}%\n\\vfill\n\\lilypondpagebreak\n")))
-
-(define-public (output-framework basename book scopes fields)
- (let* ((filename (format "~a.tex" basename))
- (outputter (ly:make-paper-outputter (open-file filename "wb") 'tex))
- (paper (ly:paper-book-paper book))
- (page-stencils (map page-stencil (ly:paper-book-pages book)))
- (last-page (car (last-pair pages)))
- (with-extents
- (eq? #t (ly:output-def-lookup paper 'dump-extents))))
- (for-each
- (lambda (x)
- (ly:outputter-dump-string outputter x))
- (list
- (header paper (length page-stencils) #f)
- (define-fonts paper)
- (header-end)))
- (ly:outputter-dump-string outputter "\\lilypondnopagebreak\n")
- (for-each
- (lambda (page)
- (dump-page outputter page (eq? last-page page) with-extents))
- page-stencils)
- (ly:outputter-dump-string outputter "\\lilypondend\n")
- (ly:outputter-close outputter)
- (postprocess-output book framework-tex-module filename
- (output-formats))))
-
-(define (dump-line putter line last?)
- (ly:outputter-dump-string
- putter
- (format "\\lybox{~a}{~a}{%\n"
- (ly:number->string
- (max 0 (interval-end (paper-system-extent line X))))
- (ly:number->string
- (interval-length (paper-system-extent line Y)))))
-
- (ly:outputter-dump-stencil putter (paper-system-stencil line))
- (ly:outputter-dump-string
- putter
- (if last?
- "}%\n"
- "}\\interscoreline\n")))
-
-(define-public (output-classic-framework
- basename book scopes fields)
- (let* ((filename (format "~a.tex" basename))
- (outputter (ly:make-paper-outputter
- (open-file filename "w") 'tex))
- (paper (ly:paper-book-paper book))
- (lines (ly:paper-book-systems book))
- (last-line (car (last-pair lines))))
- (for-each
- (lambda (x)
- (ly:outputter-dump-string outputter x))
- (list
- ;;FIXME
- (header paper (length lines) #f)
- "\\def\\lilypondclassic{1}%\n"
- (output-scopes scopes fields basename)
- (define-fonts paper)
- (header-end)))
-
- (for-each
- (lambda (line) (dump-line outputter line (eq? line last-line))) lines)
- (ly:outputter-dump-string outputter "\\lilypondend\n")
- (ly:outputter-close outputter)
- (postprocess-output book framework-tex-module filename
- (output-formats))
- ))
-
-(define-public (output-preview-framework
- basename book scopes fields)
- (let* ((filename (format "~a.tex" basename))
- (outputter (ly:make-paper-outputter (open-file filename "wb")
- 'tex))
- (paper (ly:paper-book-paper book))
- (lines (ly:paper-book-systems book))
- (first-notes-index (list-index
- (lambda (s) (not (ly:paper-system-title? s)))
- lines)))
-
- (for-each
- (lambda (x)
- (ly:outputter-dump-string outputter x))
- (list
-
- ;;FIXME
- (header paper (length lines) #f)
- "\\def\\lilypondclassic{1}%\n"
- (output-scopes scopes fields basename)
- (define-fonts paper)
- (header-end)))
-
- (for-each
- (lambda (lst)
- (dump-line outputter lst (not (ly:paper-system-title? lst))))
- (take lines (1+ first-notes-index)))
- (ly:outputter-dump-string outputter "\\lilypondend\n")
- (ly:outputter-close outputter)
- (postprocess-output book framework-tex-module filename
- (output-formats))))
-
-(define-public (convert-to-pdf book name)
- (let* ((defs (ly:paper-book-paper book))
- (paper-width (ly:output-def-lookup defs 'paper-width))
- (paper-height (ly:output-def-lookup defs 'paper-height))
- (output-scale (ly:output-def-lookup defs 'output-scale)))
- (postscript->pdf (* paper-width output-scale (/ (ly:bp 1)))
- (* paper-height output-scale (/ (ly:bp 1)))
- (string-append (dir-basename name ".tex") ".ps"))))
-
-(define-public (convert-to-png book name)
- (let* ((defs (ly:paper-book-paper book))
- (resolution (ly:output-def-lookup defs 'pngresolution))
- (paper-width (ly:output-def-lookup defs 'paper-width))
- (paper-height (ly:output-def-lookup defs 'paper-height))
- (output-scale (ly:output-def-lookup defs 'output-scale)))
- (postscript->png
- (if (number? resolution)
- resolution
- (ly:get-option 'resolution))
-
- (* paper-width output-scale (/ (ly:bp 1)))
- (* paper-height output-scale (/ (ly:bp 1)))
-
- (string-append (dir-basename name ".tex") ".ps"))))
-
-(define-public (convert-to-ps book name)
- (let* ((paper (ly:paper-book-paper book))
- (preview? (string-contains name ".preview"))
- (papersizename (ly:output-def-lookup paper 'papersizename))
- (landscape? (eq? #t (ly:output-def-lookup paper 'landscape)))
- (base (dir-basename name ".tex"))
- (ps-name (format "~a.ps" base ".ps"))
- (cmd (string-append "dvips"
- (if preview?
- " -E"
- (string-append
- " -t"
- ;; careful: papersizename is user-set.
- (sanitize-command-option papersizename)
- ""))
- (if landscape? " -tlandscape" "")
- (if (ly:kpathsea-find-file "lm.map")
- " -u+lm.map" "")
- (if (ly:kpathsea-find-file "ecrm10.pfa")
- " -u+ec-mftrace.map" "")
- " -u+lilypond.map -Ppdf" ""
- " -o" ps-name
- " " base)))
- (if (access? ps-name W_OK)
- (delete-file ps-name))
- (if (not (ly:get-option 'verbose))
- (begin
- (ly:message (_ "Converting to `~a'...") (string-append base ".ps"))
- (ly:progress "\n")))
- (ly:system cmd)))
-
-(define-public (convert-to-dvi book name)
- (let* ((curr-extra-mem
- (string->number
- (regexp-substitute/global
- #f " *%.*\n?"
- (ly:kpathsea-expand-variable "extra_mem_top")
- 'pre "" 'post)))
- (base (dir-basename name ".tex"))
- (cmd (format
- #f "latex \\\\nonstopmode \\\\input '~a'" name)))
-
- ;; FIXME: latex 'foo bar' works, but \input 'foe bar' does not?
- (if (string-index name (char-set #\space #\ht #\newline #\cr))
- (ly:error (_"TeX file name must not contain whitespace: `~a'") name))
-
- (setenv "extra_mem_top" (number->string (max curr-extra-mem 1024000)))
- (let ((dvi-name (string-append base ".dvi")))
- (if (access? dvi-name W_OK)
- (delete-file dvi-name)))
- (if (not (ly:get-option 'verbose))
- (begin
- (ly:message (_ "Converting to `~a'...") (string-append base ".dvi"))
- (ly:progress "\n")))
-
- ;; FIXME: set in environment?
- (if (ly:get-option 'safe)
- (set! cmd (string-append "openout_any=p " cmd)))
-
- (ly:system cmd)))
-
-(define-public (convert-to-tex book name)
- #t)
-
+++ /dev/null
-;;;; framework-tex.scm --
-;;;;
-;;;; source file of the GNU LilyPond music typesetter
-;;;;
-;;;; (c) 2004--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-(define-module (scm framework-texstr)
- #:export (output-framework-tex
- output-classic-framework-tex))
-
-(use-modules (ice-9 regex)
- (scm paper-system)
- (ice-9 string-fun)
- (guile)
- (srfi srfi-1)
- (srfi srfi-13)
- (lily))
-
-(define format ergonomic-simple-format)
-
-(define (header filename)
- (format "% header
-\\input{lilypond-tex-metrics}
-\\documentclass{article}
-\\lilyglobalscale{1.0}
-\\lilymetricsfile{~a.textmetrics}
-\\begin{document}
-" filename))
-
-(define (footer)
- "
-\\end{document}
-")
-
-(define-public (output-classic-framework basename book scopes fields)
- (let* ((filename (format #f "~a.texstr" basename))
- (outputter (ly:make-paper-outputter
- (open-file filename "wb")
- (ly:get-option 'backend)))
- (paper (ly:paper-book-paper book))
- (lines (ly:paper-book-systems book)))
- (ly:outputter-dump-string outputter (header basename))
- (for-each
- (lambda (system)
- (ly:outputter-dump-stencil outputter (paper-system-stencil system)))
- lines)
- (ly:outputter-dump-string outputter (footer))))
-
-(define-public (output-framework basename book scopes fields )
- (let* ((filename (format #f "~a.texstr" basename))
- (outputter
- (ly:make-paper-outputter
- (open-file filename "wb")
- (ly:get-option 'backend)))
- (paper (ly:paper-book-paper book))
- (pages (ly:paper-book-pages book)))
- (ly:outputter-dump-string outputter (header basename))
- (for-each
- (lambda (page)
- (ly:outputter-dump-stencil outputter page))
- pages)
- (ly:outputter-dump-string outputter (footer))))
-
-(define-public (convert-to-ps . args) #t)
-(define-public (convert-to-pdf . args) #t)
-(define-public (convert-to-png . args) #t)
-(define-public (convert-to-dvi . args) #t)
-(define-public (convert-to-tex . args) #t)
;; - [subject-]-verb-object-object
(anti-alias-factor 1 "render at higher resolution and scale down result\nto prevent jaggies in PNG")
- (backend ps "which backend to use by default; Options: eps, ps [default], scm, svg, tex, texstr)")
+ (backend ps "which backend to use by default; Options: eps, ps [default], scm, svg)")
(check-internal-types #f "check every property assignment for types")
(clip-systems #f "Generate cut-out snippets of a score")
(datadir #f "LilyPond prefix for data files (Readonly).")
(if (ly:get-option 'trace-scheme-coverage)
(coverage:enable))
-(define-public tex-backend?
- (member (ly:get-option 'backend) '(texstr tex)))
-
(define-public parser #f)
-;; TeX C++ code actually hooks into TEX_STRING_HASHLIMIT
-(define-public TEX_STRING_HASHLIMIT 10000000)
-
-
-
;; gettext wrapper for guile < 1.7.2
(if (defined? 'gettext)
(define-public _ gettext)
;;(define-public (output-framework) (write "hello\n"))
-(define output-tex-module
- (make-module 1021 (list (resolve-interface '(scm output-tex)))))
(define output-ps-module
(make-module 1021 (list (resolve-interface '(scm output-ps)))))
+++ /dev/null
-;;;; tex.scm -- implement Scheme output routines for TeX
-;;;;
-;;;; source file of the GNU LilyPond music typesetter
-;;;;
-;;;; (c) 1998--2008 Jan Nieuwenhuizen <janneke@gnu.org>
-;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-
-;; The public interface is tight.
-;; It has to be, because user-code is evalled with this module.
-
-;; ***It should also be clean, well defined, documented and reviewed***
-
-;; To be reasonably safe, you probably do not want to use the TeX
-;; backend anyway, but rather the PostScript backend. You may want
-;; to run gs in a uml sandbox too.
-
-
-(define-module (scm output-tex)
- #:re-export (quote)
-
- ;; JUNK this -- see lily.scm: ly:all-output-backend-commands
- #:export (unknown
- blank
- circle
- dot
- dashed-slur
- named-glyph
- dashed-line
- comment
- repeat-slash
- placebox
- bezier-sandwich
- round-filled-box
- text
- setcolor
- resetcolor
- polygon
- draw-line
- no-origin
- grob-cause))
-
-(use-modules (ice-9 regex)
- (ice-9 string-fun)
- (guile)
- (srfi srfi-13)
- (scm framework-tex)
- (lily))
-
-
-
-;;;;;;;;
-;;;;;;;; DOCUMENT ME!
-;;;;;;;;
-
-
-(define (char font i)
- (string-append "\\" (tex-font-command font)
- "\\char" (ly:inexact->string i 10) " "))
-
-(define (unknown)
- "%\n\\unknown\n")
-
-(define (url-link url x y)
- "")
-
-(define (blank)
- "")
-
-(define (circle radius thick)
- (embedded-ps (list 'circle radius thick)))
-
-(define (dot x y radius)
- (embedded-ps (list 'dot x y radius)))
-
-(define (embedded-ps string)
- (embedded-ps (list 'embedded-ps string)))
-
-(define (dashed-slur thick on off lst)
- (embedded-ps (list 'dashed-slur thick on off `(quote ,lst))))
-
-(define (named-glyph font name)
- (let* ((info (ly:otf-font-glyph-info font name))
- (subfont (assoc-get 'subfont info))
- (subidx (assoc-get 'subfont-index info)))
-
- ;;(stderr "INFO: ~S\n" info)
- ;;(stderr "FONT: ~S\n" font)
- (if (and subfont subidx)
- (string-append "\\" (tex-font-command-raw
- subfont
- (ly:font-magnification font))
- "\\char" (number->string subidx))
-
- (begin
- (ly:warning (_ "cannot find ~a in ~a" name font))
- ""))))
-
-(define (dashed-line thick on off dx dy phase)
- (embedded-ps (list 'dashed-line thick on off dx dy phase)))
-
-(define (embedded-ps expr)
- (let ((ps-string
- (with-output-to-string
- (lambda () (ps-output-expression expr (current-output-port))))))
- (string-append "\\embeddedps{" ps-string "}")))
-
-(define (repeat-slash w a t)
- (embedded-ps (list 'repeat-slash w a t)))
-
-(define (number->dim x)
- (string-append
- ;;ugh ly:* in backend needs compatibility func for standalone output
- (ly:number->string x) " \\output-scale "))
-
-(define (placebox x y s)
- (string-append
- "\\lyitem{" (ly:number->string x) "}{" (ly:number->string y) "}{" s "}%\n"))
-
-(define (bezier-sandwich lst thick)
- (embedded-ps (list 'bezier-sandwich `(quote ,lst) thick)))
-
-
-(define (round-filled-box x y width height blotdiam)
- (embedded-ps (list 'round-filled-box x y width height blotdiam)))
-
-(define (text font s)
- (format #f
- "\\hbox{\\~a{}~a}" (tex-font-command font)
- (sanitize-tex-string s)))
-
-(define (setcolor r g b)
- (string-append "\\color[rgb]{"
- (number->string r) ", "
- (number->string g) ", "
- (number->string b) "}"))
-
-;; FIXME
-;; The PostScript backend saves the current color
-;; during setcolor and restores it during resetcolor.
-;; We don't do that here.
-(define (resetcolor)
- (string-append "\\color[rgb]{0,0,0}\n"))
-
-(define (polygon points blot-diameter fill)
- (embedded-ps (list 'polygon `(quote ,points) blot-diameter fill)))
-
-(define (draw-line thick fx fy tx ty)
- (embedded-ps (list 'draw-line thick fx fy tx ty)))
-
-;; no-origin not yet supported by Xdvi
-(define (no-origin) "")
-
-
-(define-public (line-location file line col)
- "Print an input location, without column number ."
- (string-append (number->string line) " " file))
-
-(define-public point-and-click #f)
-
-(define (grob-cause offset grob)
- (define (line-column-location file line col)
- "Print an input location, including column number ."
- (string-append (number->string line) ":"
- (number->string col) " " file))
-
- (if (procedure? point-and-click)
- (let* ((cause (ly:grob-property grob 'cause))
- (music-origin (if (ly:stream-event? cause)
- (ly:event-property cause 'origin)))
- (location (if (ly:input-location? music-origin)
- (ly:input-file-line-column music-origin))))
- (if (pair? location)
- ;;; \\string ?
- (string-append "\\special{src:"
- (line-column-location location) "}")
- ""))
- ""))
+++ /dev/null
-;;;; texstr.scm -- implement Scheme output routines for TeX strings
-;;;;
-;;;; source file of the GNU LilyPond music typesetter
-;;;;
-;;;; (c) 2004--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-(define-module (scm output-texstr))
-(define this-module (current-module))
-
-(use-modules
- (guile)
- (ice-9 regex)
- (srfi srfi-13)
- (scm framework-tex)
- (lily))
-
-(define (dummy . foo) #f)
-
-(map (lambda (x) (module-define! this-module x dummy))
- (ly:all-stencil-expressions))
-
-(define-public (grob-cause . x) "")
-(define-public (no-origin . x) "")
-(define-public (placebox
- x y what)
- (if (string? what)
- what
- ""))
-
-
-(define-public (text font str)
- (call-with-output-string
- (lambda (port)
- (display (format "\\lilygetmetrics{~a~a}{~a}{1.0}{~a}\n"
-
- (hash str TEX_STRING_HASHLIMIT)
- (ly:font-file-name font)
- (ly:font-file-name font)
- (sanitize-tex-string str))
- port)
- )))
(setm! 'text-font-size (* 12 factor))
(setm! 'output-scale ss)
- (setm! 'fonts
- (if tex-backend?
- (make-cmr-tree factor)
- (make-century-schoolbook-tree factor)))
+ (setm! 'fonts (make-century-schoolbook-tree factor))
(setm! 'staff-height staff-height)
(setm! 'staff-space ss)
NOTIME = 'notime'
OUTPUT = 'output'
OUTPUTIMAGE = 'outputimage'
-PACKED = 'packed'
PAPER = 'paper'
PREAMBLE = 'preamble'
PRINTFILENAME = 'printfilename'
RAGGED_RIGHT: r'''ragged-right = ##t''',
NORAGGED_RIGHT: r'''ragged-right = ##f''',
-
- PACKED: r'''packed = ##t''',
},
##
depth = ..
TEX_FILES = $(filter-out texinfo.tex, $(call src-wildcard,*.tex))
-EXTRA_DIST_FILES = $(TEX_FILES) texinfo.tex quotes.patch
-STEPMAKE_TEMPLATES=install install-out
+EXTRA_DIST_FILES = $(TEX_FILES) texinfo.tex
+STEPMAKE_TEMPLATES = install install-out
-INSTALLATION_DIR=$(local_lilypond_datadir)/tex/
-INSTALLATION_FILES=$(TEX_FILES)
+INSTALLATION_DIR = $(local_lilypond_datadir)/tex/
+INSTALLATION_FILES = $(TEX_FILES)
include $(depth)/make/stepmake.make
-rmdir $(DESTDIR)$(local_lilypond_datadir)/tex
all: $(INSTALLATION_FILES)
-
+++ /dev/null
-%% lily-ps-defs.tex
-%%
-\edef\lilypsdefsELC{\the\endlinechar}%
-\endlinechar -1\relax
-
-%% Header info (macros/defs, etc) should go into a \special{! ... };
-%% note the ! sign. See dvips.info for details.
-%%
-%% We protect punctuation characters with \string to avoid problems with
-%% language specific shorthands (e.g. `:' for French, `"' for German, etc.).
-
-\gdef\lilypondsetdimen#1{
- \expandafter\gdef\csname #1ps\endcsname{}
- \special{
- \string!
- /#1 (\csname #1\endcsname) set_tex_dimen}}
-
-\gdef\lilypondspace{ }
-
-\gdef\lilypondpostscript{
- %% A document processed with lilypond-book can contain music fragments in
- %% different sizes. To reduce overhead, we define `lyscaleXXX' PS macros
- %% only once.
- \lilypondifundefined{lyscale\lilypondpaperoutputscale}
- {\expandafter\gdef\csname lyscale\lilypondpaperoutputscale\endcsname{}
- %% This sets CTM so that you get to the currentpoint
- %% by executing a 0 0 moveto
- \special{
- \string!
- /lyscale\lilypondpaperoutputscale
- {\lilypondpaperoutputscale\lilypondspace\scaletounit %
- dup scale} def}}
- {}
-
- \def\embeddedps##1{
- \special{
- \string"
- lyscale\lilypondpaperoutputscale\lilypondspace ##1}}}
-
-\endlinechar \lilypsdefsELC
-\endinput
-
-%% end lily-ps-defs.tex
+++ /dev/null
-%%% lilyponddefs.tex -- TeX macros for LilyPond output.
-%%%
-%%% source file of the GNU LilyPond music typesetter
-%%%
-%%% (c) 1998--2008 Jan Nieuwenhuizen <janneke@gnu.org>
-%%% Han-Wen Nienhuys <hanwen@cs.uu.nl>
-%%% Mats Bengtsson <mats.bengtsson@s3.kth.se>
-%%%
-%%
-%% Avoid \par while reading this file.
-%%
-\edef\lilyponddefsELC{\the\endlinechar}%
-\endlinechar -1\relax
-
-%% This runs with plain TeX, LaTeX, pdftex, and texinfo.
-%%
-%% To avoid interferences, lilyponddefs.tex must be loaded within a group.
-%% It is loaded only once, so the definitions must be global.
-%%
-%% The overall structure of a file created by LilyPond is as follows:
-%%
-%% <lilypond parameter definitions>
-%% <font setup>
-%% \ifx\lilypondstart \undefined
-%% \input lilyponddefs
-%% \fi
-%% \lilypondstart
-%% <note output>
-%% \lilypondend
-
-%% A temporary variable.
-%%
-\newdimen\lytempdim
-
-%% The scaling factor for all dimensions.
-%%
-\newdimen\outputscale
-
-\long\gdef\lilypondfirst#1#2{#1}
-\long\gdef\lilypondsecond#1#2{#2}
-
-%% \lilypondundefined{xxx}{foo}{bar}
-%%
-%% If `xxx' (without the leading backslash) is an undefined macro,
-%% execute block `foo'. Otherwise, execute block `bar'. Based on
-%% a similar macro from the LaTeX kernel.
-%%
-\gdef\lilypondifundefined#1{
- \expandafter\ifx\csname#1\endcsname\relax
- \expandafter\lilypondfirst
- \else
- \expandafter\lilypondsecond
- \fi
-}
-
-%% Urgh. LilyPond uses EC fonts, but texinfo is based on CM. We thus
-%% have to handle T1 font encoding by ourselves; all manipulations are
-%% collected in the macro \lilypondECencoding. Note that the following
-%% code only provides the texinfo interface, not complete access to all
-%% EC glyphs.
-%%
-%% All definitions are taken from texinfo or LaTeX (with modifications
-%% if necessary).
-%%
-\begingroup
-\catcode `\@=11\relax
-\gdef\lilypondECencoding{
- \def\"##1{
- {\accent4 ##1}}
- \def\'##1{
- {\accent1 ##1}}
- \def\,##1{
- {\leavevmode
- \setbox\z@\hbox{##1}
- \ifdim\ht\z@=1ex
- \accent11 ##1
- \else
- {\ooalign{
- \unhbox\z@
- \crcr
- \hidewidth
- \char11
- \hidewidth}}
- \fi}}
- \def\=##1{
- {\accent9 ##1}}
- \def\^##1{
- {\accent2 ##1}}
- \def\`##1{
- {\accent0 ##1}}
- \def\~##1{
- {\accent3 ##1}}
- \def\dotaccent##1{
- {\accent10 ##1}}
- \def\H##1{
- {\accent5 ##1}}
- \def\ringaccent##1{
- {\accent6 ##1}}
-% \def\tieaccent##1{} % unsupported: this is TS1
- \def\u##1{
- {\accent8 ##1}}
- \def\ubaraccent##1{
- {\o@lign{
- \relax
- ##1
- \crcr
- \hidewidth
- \sh@ft{29}\vbox to.2ex{
- \hbox{\char9}
- \vss}
- \hidewidth}}}
- \def\udotaccent##1{
- {\o@lign{
- \relax
- ##1
- \crcr
- \hidewidth
- \sh@ft{10}.
- \hidewidth}}}
- \def\v##1{
- {\accent7 ##1}}
-
- \chardef\exclamdown=189
- \chardef\questiondown=190
-
- \def\aa{
- \ringaccent{a}}
- \def\AA{
- \ringaccent{A}}
- \chardef\AE=198
- \chardef\ae=230
- \chardef\ptexi=25
- \chardef\j=26
- \chardef\L=138
- \chardef\l=170
- \chardef\O=216
- \chardef\o=248
- \chardef\OE=215
- \chardef\oe=247
- \chardef\ss=255
-}
-\endgroup
-
-%% This macro provides the necessary setup to make the lilypond data
-%% work with plain TeX, LaTeX, and texinfo.
-%%
-%% The reason of using \begingroup and \endgroup is to make the macro \x
-%% immediately disappear after it has been executed. Since we have \def
-%% within \def within \gdef, four hash signs (`#') are needed for
-%% parameters.
-%%
-%% \lilypondfontencoding is emitted by LilyPond to set the encoding of
-%% text strings.
-%%
-\gdef\lilypondstart{
- \frenchspacing
- \outputscale \lilypondpaperoutputscale\lilypondpaperunit
-
- \begingroup
- \catcode `\@=11\relax
-
- %% \@nodocument is defined as \relax after `\begin{document}'
- \lilypondifundefined{@nodocument}
- {%% Either plain TeX or texinfo or not at the beginning of LaTeX input.
- \def\x{
- \endgroup
-
- \def\lilypondfontencoding####1{
- \lilypondECencoding}
- \def\lilypondpagebreak{
- \eject}
- \def\lilypondnopagebreak{
- \ifvmode
- \penalty 10000\relax
- \fi}}}
-
- {%% LaTeX mode: Provide a complete preamble.
- \def\x{
- \endgroup
-
- %% Indicate that we shall emit `\end{document}' while executing
- %% \lilypondend.
- \def\lilyponddocument{}
-
- \def\lilypondfontencoding####1{
- \fontencoding{####1}
- \selectfont}
- \def\lilypondpagebreak{
- \newpage}
- \def\lilypondnopagebreak{
- \nopagebreak}
-
- \documentclass[\lilyponddocumentclassoptions]{article}
-
- %% As a safety guard, don't produce auxiliary files.
- \nofiles
-
- %% FIXME: workaround non-existent TeX.def.
- \def\TeXdef{TeX}\ifx\TeXdef\lilypondpaperinputencoding
- \usepackage[latin1]{inputenc}
- \else
- \usepackage[\lilypondpaperinputencoding]{inputenc}
- \fi
- \pagestyle{empty}
-
- \usepackage{color}
-
- \lilypondifundefined{lilypondclassic}
- {%% If not in `classic' mode, undo LaTeX's page layout settings
- %% since LilyPond does the layout by itself.
- \topmargin-1in
- \headheight0pt\headsep0pt
- \oddsidemargin-1in
- \evensidemargin\oddsidemargin}
-
- {%% Otherwise center output horizontally, without changing the
- %% vertical positioning.
- \hsize\lilypondpaperlinewidth\lilypondpaperunit
- \lytempdim \paperwidth
- \advance\lytempdim -\the\hsize
- \lytempdim 0.5\lytempdim
- \advance\lytempdim -1in
- \oddsidemargin \lytempdim
- \evensidemargin \lytempdim}
-
- \parindent 0pt
-
- %% We can't directly say `\begin{document}' in this macro since
- %% older versions of texinfo.tex define \begin as \outer; this
- %% means that it causes an error if \begin is found within another
- %% macro (even if the corresponding code will never be executed).
- %% As a workaround we use \csname to call \begin.
- \csname begin\endcsname{document}}}
- \x}
-
-%% The opposite of \lilypondstart.
-%%
-\gdef\lilypondend{
- %% Handle the `lastpagefill' parameter from the \layout block.
- %% Ignore it if \lilypondbook is defined.
- \lilypondifundefined{lilypondbook}
- {\lilypondifundefined{lilypondpaperlastpagefill}
- {\vskip 0pt plus\lilypondpaperinterscorelinefill00 fill}
- {}}
- {}
-
- \begingroup
- \lilypondifundefined{lilyponddocument}
- {\def\x{
- \endgroup}}
- {\def\x{
- \endgroup
- \csname end\endcsname{document}}}
- \x}
-
-%% Load the PostScript drawing routines. This is done using \special.
-%% To avoid multiple inclusions, redefine \lilypondspecial to a no-op
-%% afterwards.
-%%
-\gdef\lilypondspecial{
- \special{header=music-drawing-routines.ps}
- \gdef\lilypondspecial{}}
-
-%% The most used macro in LilyPond output. Put #3 into a zero-width box
-%% which is moved to the right by #1 (scaled by \outputscale) and moved
-%% up by #2 (also scaled by \outputscale).
-%%
-\gdef\lyitem#1#2#3{
- \raise #2\outputscale \hbox to 0pt {
- \kern #1\outputscale
- #3
- \hss}}
-
-%% All LilyPond music data is enclosed in this macro (as third argument).
-%% The data (which consists of boxes with zero width) gets an artificial
-%% width of #1 and a height of #2. The resulting box is then centered
-%% vertically along the x-height of the current font.
-%%
-%% Parameters #1 and #2 are scaled by \outputscale.
-%%
-\gdef\lybox#1#2#3{
- \lytempdim #2\outputscale
- \lytempdim -0.5\lytempdim
- \advance\lytempdim 1ex
- \leavevmode
- \raise \lytempdim \hbox to #1\outputscale {
- %% Convert depth of #3 into height only.
- \vbox to #2\outputscale {\hbox{#3}\vss}
- \hss}}
-
-%% Produce a black bar (width #2, depth #3, height #4) with a vertical
-%% offset #1. Everything is scaled by \outputscale.
-%%
-\gdef\lyvrule#1#2#3#4{
- \kern#1\outputscale
- \vrule width #2\outputscale depth #3\outputscale height #4\outputscale}
-
-%% FIXME: 'interscoreline' and 'lilypondPAPERinterscoreline
-%%
-\lilypondifundefined{lilypondpaperinterscorelinefill}
- {\gdef\lilypondpaperinterscorelinefill{0}}
- {\gdef\lilypondpaperinterscorelinefill{1}}
-
-%% Allow overriding of interscoreline, e.g., for LilyPond's --preview
-%%
-\lilypondifundefined{interscoreline}
- {\lilypondifundefined{lilypondclassic}
- {\gdef\interscoreline{}}
- {\gdef\interscoreline{
- \vskip\lilypondpaperinterscoreline\lilypondpaperunit
- plus \lilypondpaperinterscorelinefill fill}}}
- {}
-
-%% Include PostScript definitions (which are differently defined for
-%% TeX and pdfTeX). This is loaded once only because the inputted files
-%% define \lilypondpostscript.
-%%
-%% (Don't remove the spaces after the arguments to \input!)
-%%
-%
-%% In teTeX-3.0, latex is actually pdfetex, and we need
-%% ifpdf.sty to determinine if we are really *tex or pdf*tex.
-%
-%% \input ifpdf.sty
-%
-%% However, ifpfd.sty is too smart for LilyPond, so we copy the
-%% logic here. Using \input ifpdf.sty is a no-op when using latex,
-%% and the \ifpdf switch is needed before \documentclass, using
-%% \usepackage{ifpdf} is not an option.
-%
-\input lily-ps-defs
-
-% barfs with texi
-% Runaway argument?
-%{
-%! Forbidden control sequence found while scanning use of \lilypondfirst.
-%<inserted text>
-% \par
-%<to be read again>
-% \newif
-%l.330 {\newif
-% \ifpdf
-%?
-%
-%%
-%\lilypondifundefined{lilypondpostscript}
-% {\newif\ifpdf
-% \ifx\pdfoutput\undefined
-% \else
-% \ifx\pdfoutput\relax
-% \else
-% \ifcase\pdfoutput
-% \else
-% \pdftrue
-% \fi
-% \fi
-% \fi
-% \ifpdf
-% {\input lily-pdf-defs }
-% \else
-% {\input lily-ps-defs }
-% \fi}
-% {}
-%
-%% Restore newline functionality (disabled to avoid \par).
-%%
-\endlinechar \lilyponddefsELC
-\endinput
-
-%% end lilyponddefs.tex
+++ /dev/null
---- texinfo/doc/texinfo.tex 2006-06-02 03:19:04.000000000 +0200
-+++ texinfo.tex 2006-06-02 03:19:10.000000000 +0200
-@@ -1878,9 +1878,12 @@
- {
- \catcode`\-=\active
- \catcode`\_=\active
-+ \catcode`\'=\active
- %
- \global\def\code{\begingroup
- \catcode`\-=\active \catcode`\_=\active
-+ \catcode`\'=\active
-+ \let'\singlequotechar
- \ifallowcodebreaks
- \let-\codedash
- \let_\codeunder
-@@ -5059,11 +5062,10 @@
- %
- \maketwodispenvs {lisp}{example}{%
- \nonfillstart
-- \tt
-+ \tt\quoteexpand
- \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
- \gobble % eat return
- }
--
- % @display/@smalldisplay: same as @lisp except keep current font.
- %
- \makedispenv {display}{%
-@@ -5191,6 +5193,12 @@
- \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
- %
- \def\starttabbox{\setbox0=\hbox\bgroup}
-+%
-+%
-+% Don't replace quotes with curly quotes. This makes cut & pasting
-+% from a PDF file problematic.
-+%
-+\def\singlequotechar{\char'15\relax}
- \begingroup
- \catcode`\^^I=\active
- \gdef\tabexpand{%
-@@ -5203,6 +5211,11 @@
- \wd0=\dimen0 \box0 \starttabbox
- }%
- }
-+ \catcode`\'=\active
-+ \gdef\quoteexpand{%
-+ \catcode`\'=\active
-+ \def'{\singlequotechar}
-+ }%
- \endgroup
- \def\setupverbatim{%
- \let\nonarrowing = t%
-@@ -5212,6 +5225,7 @@
- \def\par{\leavevmode\egroup\box0\endgraf}%
- \catcode`\`=\active
- \tabexpand
-+ \quoteexpand
- % Respect line breaks,
- % print special symbols as themselves, and
- % make each space count