]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc-de: update to usage manual
authorTill Paala <till.rettig@gmx.de>
Wed, 27 Oct 2010 18:39:40 +0000 (21:39 +0300)
committerTill Paala <till.rettig@gmx.de>
Wed, 27 Oct 2010 18:39:40 +0000 (21:39 +0300)
Documentation/de/usage/lilypond-book.itely

index 7b6b8c7acf077ece8120540618a910c56032f69d..9dca5ecd71d35d8b54f6394eadd5f322549931a5 100644 (file)
@@ -1,7 +1,7 @@
 @c -*- coding: utf-8; mode: texinfo; documentlanguage: de -*-
 
 @ignore
-    Translation of GIT committish: ab9e3136d78bfaf15cc6d77ed1975d252c3fe506
+    Translation of GIT committish: aa632c095138aaaa0f50f73c90e72efb4b61d745
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  For details, see the Contributors'
@@ -58,6 +58,7 @@ angewendet werden.
 * lilypond-book aufrufen::
 * Dateiendungen::
 * lilypond-book-Vorlagen::
+* Das Inhaltsverzeichnis flexibel einsetzen::
 * Alternative Methoden Text und Musik zu kombinieren::
 @end menu
 
@@ -1189,6 +1190,113 @@ lilypond-book.
 @end verbatim
 
 
+@node Das Inhaltsverzeichnis flexibel einsetzen
+@section Das Inhaltsverzeichnis flexibel einsetzen
+@translationof Sharing the table of contents
+
+Diese Funktionen existieren schon im OrchestraLily-Paket:
+
+@example
+@url{http://repo.or.cz/w/orchestrallily.git}
+@end example
+
+Um den Text flexibler behandeln zu können, bevorzugen manche Benutzer es,
+das Inhaltsverzeichnis aus LilyPond zu exportieren und dann mit 
+@LaTeX{} einzulesen.
+
+@subsubheading Das Ihaltsverzeichnis (ToC) aus LilyPond exportieren
+
+Hier wird angenommen, dass in Ihrer Partitur mehrere Sätze vorkommen, die
+sich alle in der selben LilyPond-Datei befinden.
+
+@smallexample
+#(define (oly:create-toc-file layout pages)
+  (let* ((label-table (ly:output-def-lookup layout 'label-page-table)))
+    (if (not (null? label-table))
+      (let* ((format-line (lambda (toc-item)
+             (let* ((label (car toc-item))
+                    (text  (caddr toc-item))
+                    (label-page (and (list? label-table)
+                                     (assoc label label-table)))
+                    (page (and label-page (cdr label-page))))
+               (format #f "~a, section, 1, @{~a@}, ~a" page text label))))
+             (formatted-toc-items (map format-line (toc-items)))
+             (whole-string (string-join formatted-toc-items ",\n"))
+             (output-name (ly:parser-output-name parser))
+             (outfilename (format "~a.toc" output-name))
+             (outfile (open-output-file outfilename)))
+        (if (output-port? outfile)
+            (display whole-string outfile)
+            (ly:warning (_ "Unable to open output file ~a for the TOC information") outfilename))
+        (close-output-port outfile)))))
+
+\paper @{
+  #(define (page-post-process layout pages) (oly:create-toc-file layout pages))
+@}
+@end smallexample
+
+@subsubheading Das Inhaltsverzeichnis in LaTeX importieren
+
+In der LaTeX-Datei sollte folgendes enthalten:
+
+@c no, this doesn't require the smallexample, but since the other
+@c two blocks on this page use it, I figured I might as well
+@c user it here as well, for consistency. -gp
+@smallexample
+\usepackage@{pdfpages@}
+\includescore@{nameofthescore@}
+@end smallexample
+
+@noindent
+wobei @code{\includescore} wiefolgt definiert ist:
+
+@smallexample
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% \includescore@{PossibleExtension@}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Read in the TOC entries for a PDF file from the corresponding .toc file.
+% This requires some heave latex tweaking, since reading in things from a file
+% and inserting it into the arguments of a macro is not (easily) possible
+
+% Solution by Patrick Fimml on #latex on April 18, 2009:
+% \readfile@{filename@}@{\variable@}
+% reads in the contents of the file into \variable (undefined if file
+% doesn't exist)
+\newread\readfile@@f
+\def\readfile@@line#1@{%
+@{\catcode`\^^M=10\global\read\readfile@@f to \readfile@@tmp@}%
+\edef\do@{\noexpand\g@@addto@@macro@{\noexpand#1@}@{\readfile@@tmp@}@}\do%
+\ifeof\readfile@@f\else%
+\readfile@@line@{#1@}%
+\fi%
+@}
+\def\readfile#1#2@{%
+\openin\readfile@@f=#1 %
+\ifeof\readfile@@f%
+\typeout@{No TOC file #1 available!@}%
+\else%
+\gdef#2@{@}%
+\readfile@@line@{#2@}%
+\fi
+\closein\readfile@@f%
+@}%
+
+
+\newcommand@{\includescore@}[1]@{
+\def\oly@@fname@{\oly@@basename\@@ifmtarg@{#1@}@{@}@{_#1@}@}
+\let\oly@@addtotoc\undefined
+\readfile@{\oly@@xxxxxxxxx@}@{\oly@@addtotoc@}
+\ifx\oly@@addtotoc\undefined
+\includepdf[pages=-]@{\oly@@fname@}
+\else
+\edef\includeit@{\noexpand\includepdf[pages=-,addtotoc=@{\oly@@addtotoc@}]
+@{\oly@@fname@}@}\includeit
+\fi
+@}
+@end smallexample
+
+
 @node Alternative Methoden Text und Musik zu kombinieren
 @section Alternative Methoden Text und Musik zu kombinieren
 @translationof Alternate methods of mixing text and music