From a9afe2a11c0a9e7b8eed97f2b25f47548b33f1a6 Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Sat, 24 May 2008 09:50:04 +0200 Subject: [PATCH] Improve Snippets document (second and last try) This is mostly commit 4855828813819a29471669f1d07e4b9cb03fc31e that has been reverted, plus some fixes. * add cross-references to Notation Reference and Learning Manual, * use @chapter iso. @unnumbered for better formatting with texi2html (see 7252bf00bde86d69c8272761d75686aab5ef2af8), * update add_html_footer.py accordingly. --- buildscripts/add_html_footer.py | 8 +++++-- input/lsr/ancient-notation-intro.itely | 4 +++- input/lsr/chords-intro.itely | 4 +++- input/lsr/contexts-and-engravers-intro.itely | 8 ++++++- input/lsr/editorial-annotations-intro.itely | 4 +++- input/lsr/expressive-marks-intro.itely | 4 +++- input/lsr/fretted-strings-intro.itely | 4 +++- input/lsr/keyboards-intro.itely | 4 +++- input/lsr/lilypond-snippets.tely | 22 ++++++++++++++++++++ input/lsr/midi-intro.itely | 4 +++- input/lsr/paper-and-layout-intro.itely | 5 ++++- input/lsr/percussion-intro.itely | 4 +++- input/lsr/pitches-intro.itely | 4 +++- input/lsr/repeats-intro.itely | 4 +++- input/lsr/rhythms-intro.itely | 4 +++- input/lsr/simultaneous-notes-intro.itely | 4 +++- input/lsr/spacing-intro.itely | 4 +++- input/lsr/staff-notation-intro.itely | 4 +++- input/lsr/template-intro.itely | 2 +- input/lsr/text-intro.itely | 4 +++- input/lsr/titles-intro.itely | 4 +++- input/lsr/tweaks-and-overrides-intro.itely | 8 ++++++- input/lsr/unfretted-strings-intro.itely | 4 +++- input/lsr/vocal-music-intro.itely | 4 +++- input/lsr/winds-intro.itely | 4 +++- 25 files changed, 104 insertions(+), 25 deletions(-) diff --git a/buildscripts/add_html_footer.py b/buildscripts/add_html_footer.py index 00b48dc6ba..34ada97aac 100644 --- a/buildscripts/add_html_footer.py +++ b/buildscripts/add_html_footer.py @@ -90,6 +90,7 @@ def source_links_replace (m, source_val): splitted_docs_re = re.compile ('(input/lsr/out-www/lilypond-snippets|Documentation/user/out-www/(lilypond|music-glossary|lilypond-program|lilypond-learning))/') snippets_ref_re = re.compile (r'href="(\.\./)?lilypond-snippets') +user_ref_re = re.compile (r'href="(?:\.\./)?lilypond(|-internals|-learning|-program)') ## Windows does not support symlinks. # This function avoids creating symlinks for splitted HTML manuals @@ -99,8 +100,11 @@ def hack_urls (s, prefix): if splitted_docs_re.match (prefix): s = re.sub ('(href|src)="(../lily-.*?|.*?[.]png)"', '\\1="../\\2"', s) - # fix Snippets xrefs ad hoc - s = snippets_ref_re.sub ('href="source/input/lsr/lilypond-snippets', s) + # fix xrefs between documents in different directories ad hoc + if 'user/out-www/lilypond' in prefix: + s = snippets_ref_re.sub ('href="source/input/lsr/lilypond-snippets', s) + elif 'input/lsr' in prefix: + s = user_ref_re.sub ('href="source/Documentation/user/lilypond\\1', s) source_path = os.path.join (os.path.dirname (prefix), 'source') if not os.path.islink (source_path): diff --git a/input/lsr/ancient-notation-intro.itely b/input/lsr/ancient-notation-intro.itely index 52a221029e..046148ec76 100644 --- a/input/lsr/ancient-notation-intro.itely +++ b/input/lsr/ancient-notation-intro.itely @@ -1,5 +1,7 @@ @node Ancient notation -@unnumbered Ancient notation +@chapter Ancient notation + +@ruser{Ancient notation} @lysnippets diff --git a/input/lsr/chords-intro.itely b/input/lsr/chords-intro.itely index c9980477ef..89b80ee895 100644 --- a/input/lsr/chords-intro.itely +++ b/input/lsr/chords-intro.itely @@ -1,5 +1,7 @@ @node Chords -@unnumbered Chords +@chapter Chords + +@ruser{Chord notation} @lysnippets diff --git a/input/lsr/contexts-and-engravers-intro.itely b/input/lsr/contexts-and-engravers-intro.itely index ca1031a98d..a79a0ba54d 100644 --- a/input/lsr/contexts-and-engravers-intro.itely +++ b/input/lsr/contexts-and-engravers-intro.itely @@ -1,5 +1,11 @@ @node Contexts and engravers -@unnumbered Contexts and engravers +@chapter Contexts and engravers + +@c FIXME make xref more precise when the chapter has been +@c revised in GDP +@ruser{Changing defaults} + +@rlearning{Contexts and engravers} @lysnippets diff --git a/input/lsr/editorial-annotations-intro.itely b/input/lsr/editorial-annotations-intro.itely index 9d4658e30d..249eafecfa 100644 --- a/input/lsr/editorial-annotations-intro.itely +++ b/input/lsr/editorial-annotations-intro.itely @@ -1,5 +1,7 @@ @node Editorial annotations -@unnumbered Editorial annotations +@chapter Editorial annotations + +@ruser{Editorial annotations} @lysnippets diff --git a/input/lsr/expressive-marks-intro.itely b/input/lsr/expressive-marks-intro.itely index 6b6550dd36..73d9cd8059 100644 --- a/input/lsr/expressive-marks-intro.itely +++ b/input/lsr/expressive-marks-intro.itely @@ -1,5 +1,7 @@ @node Expressive marks -@unnumbered Expressive marks +@chapter Expressive marks + +@ruser{Expressive marks} @lysnippets diff --git a/input/lsr/fretted-strings-intro.itely b/input/lsr/fretted-strings-intro.itely index bb149c1e2d..e298fe67ce 100644 --- a/input/lsr/fretted-strings-intro.itely +++ b/input/lsr/fretted-strings-intro.itely @@ -1,5 +1,7 @@ @node Fretted strings -@unnumbered Fretted strings +@chapter Fretted strings + +@ruser{Fretted string instruments} @lysnippets diff --git a/input/lsr/keyboards-intro.itely b/input/lsr/keyboards-intro.itely index 35b849e79c..8607d8c94f 100644 --- a/input/lsr/keyboards-intro.itely +++ b/input/lsr/keyboards-intro.itely @@ -1,5 +1,7 @@ @node Keyboards -@unnumbered Keyboards +@chapter Keyboards + +@ruser{Keyboard instruments} @lysnippets diff --git a/input/lsr/lilypond-snippets.tely b/input/lsr/lilypond-snippets.tely index b1c28b2af8..4ac69bf182 100644 --- a/input/lsr/lilypond-snippets.tely +++ b/input/lsr/lilypond-snippets.tely @@ -19,6 +19,28 @@ @section \TEXT\ @end macro +@ifnottex +@macro ruser{NAME} +These snippets illustrate the User Manual, +section @ref{\NAME\,,,lilypond,Notation Reference}. +@end macro + +@macro rlearning{NAME} +See also Learning Manual, section +@ref{\NAME\,,,lilypond-learning,Learning Manual}. +@end macro +@end ifnottex + +@iftex +@macro ruser{NAME} +These snippets illustrate @ref{\NAME\,,,lilypond,Notation Reference}. +@end macro + +@macro rlearning{NAME} +See also @ref{\NAME\,,,lilypond-learning,Learning Manual}. +@end macro +@end iftex + @dircategory GNU LilyPond --- the music typesetter @direntry * LilyPond Snippets: (lilypond-snippets). Short tricks, tips, and examples. diff --git a/input/lsr/midi-intro.itely b/input/lsr/midi-intro.itely index e46fe43128..6236eebe37 100644 --- a/input/lsr/midi-intro.itely +++ b/input/lsr/midi-intro.itely @@ -1,5 +1,7 @@ @node MIDI -@unnumbered MIDI +@chapter MIDI + +@ruser{MIDI output} @lysnippets diff --git a/input/lsr/paper-and-layout-intro.itely b/input/lsr/paper-and-layout-intro.itely index 35774dfab1..5ac1a33370 100644 --- a/input/lsr/paper-and-layout-intro.itely +++ b/input/lsr/paper-and-layout-intro.itely @@ -1,5 +1,8 @@ @node Paper and layout -@unnumbered Paper and layout +@chapter Paper and layout + +@c FIXME not precise enough reference? +@ruser{Spacing issues} @lysnippets diff --git a/input/lsr/percussion-intro.itely b/input/lsr/percussion-intro.itely index 9c2c6fdb12..cc7508d1c0 100644 --- a/input/lsr/percussion-intro.itely +++ b/input/lsr/percussion-intro.itely @@ -1,5 +1,7 @@ @node Percussion -@unnumbered Percussion +@chapter Percussion + +@ruser{Percussion} @lysnippets diff --git a/input/lsr/pitches-intro.itely b/input/lsr/pitches-intro.itely index 2d65d94355..52b620186c 100644 --- a/input/lsr/pitches-intro.itely +++ b/input/lsr/pitches-intro.itely @@ -1,5 +1,7 @@ @node Pitches -@unnumbered Pitches +@chapter Pitches + +@ruser{Pitches} @lysnippets diff --git a/input/lsr/repeats-intro.itely b/input/lsr/repeats-intro.itely index bda677755a..2ffd50e942 100644 --- a/input/lsr/repeats-intro.itely +++ b/input/lsr/repeats-intro.itely @@ -1,5 +1,7 @@ @node Repeats -@unnumbered Repeats +@chapter Repeats + +@ruser{Repeats} @lysnippets diff --git a/input/lsr/rhythms-intro.itely b/input/lsr/rhythms-intro.itely index a250e5b398..baa8d2b8c8 100644 --- a/input/lsr/rhythms-intro.itely +++ b/input/lsr/rhythms-intro.itely @@ -1,5 +1,7 @@ @node Rhythms -@unnumbered Rhythms +@chapter Rhythms + +@ruser{Rhythms} @lysnippets diff --git a/input/lsr/simultaneous-notes-intro.itely b/input/lsr/simultaneous-notes-intro.itely index 321010ab4c..451bb9eb57 100644 --- a/input/lsr/simultaneous-notes-intro.itely +++ b/input/lsr/simultaneous-notes-intro.itely @@ -1,5 +1,7 @@ @node Simultaneous notes -@unnumbered Simultaneous notes +@chapter Simultaneous notes + +@ruser{Simultaneous notes} @lysnippets diff --git a/input/lsr/spacing-intro.itely b/input/lsr/spacing-intro.itely index 7cd4fcd477..184646ef80 100644 --- a/input/lsr/spacing-intro.itely +++ b/input/lsr/spacing-intro.itely @@ -1,5 +1,7 @@ @node Spacing -@unnumbered Spacing +@chapter Spacing + +@ruser{Spacing issues} @lysnippets diff --git a/input/lsr/staff-notation-intro.itely b/input/lsr/staff-notation-intro.itely index 4a2103d87e..8606dd687e 100644 --- a/input/lsr/staff-notation-intro.itely +++ b/input/lsr/staff-notation-intro.itely @@ -1,5 +1,7 @@ @node Staff notation -@unnumbered Staff notation +@chapter Staff notation + +@ruser{Staff notation} @lysnippets diff --git a/input/lsr/template-intro.itely b/input/lsr/template-intro.itely index 22c9952e84..3fd680a451 100644 --- a/input/lsr/template-intro.itely +++ b/input/lsr/template-intro.itely @@ -1,5 +1,5 @@ @node Templates -@unnumbered Templates +@chapter Templates @lysnippets diff --git a/input/lsr/text-intro.itely b/input/lsr/text-intro.itely index 29a4f45e0f..ab2e05225b 100644 --- a/input/lsr/text-intro.itely +++ b/input/lsr/text-intro.itely @@ -1,5 +1,7 @@ @node Text -@unnumbered Text +@chapter Text + +@ruser{Text} @lysnippets diff --git a/input/lsr/titles-intro.itely b/input/lsr/titles-intro.itely index ef18b4d2e8..46365d8edf 100644 --- a/input/lsr/titles-intro.itely +++ b/input/lsr/titles-intro.itely @@ -1,5 +1,7 @@ @node Titles -@unnumbered Titles +@chapter Titles + +@ruser{Titles and headers} @lysnippets diff --git a/input/lsr/tweaks-and-overrides-intro.itely b/input/lsr/tweaks-and-overrides-intro.itely index e97bfdf0e2..6f47df836a 100644 --- a/input/lsr/tweaks-and-overrides-intro.itely +++ b/input/lsr/tweaks-and-overrides-intro.itely @@ -1,5 +1,11 @@ @node Tweaks and overrides -@unnumbered Tweaks and overrides +@chapter Tweaks and overrides + +@c FIXME make xref more precise when the chapter has been +@c revised in GDP +@ruser{Changing defaults} + +@rlearning{Tweaking output} @lysnippets diff --git a/input/lsr/unfretted-strings-intro.itely b/input/lsr/unfretted-strings-intro.itely index f5f5966e6e..e1023f78aa 100644 --- a/input/lsr/unfretted-strings-intro.itely +++ b/input/lsr/unfretted-strings-intro.itely @@ -1,5 +1,7 @@ @node Unfretted strings -@unnumbered Unfretted strings +@chapter Unfretted strings + +@ruser{Unfretted string instruments} @lysnippets diff --git a/input/lsr/vocal-music-intro.itely b/input/lsr/vocal-music-intro.itely index 4a3866cca1..5574dd6878 100644 --- a/input/lsr/vocal-music-intro.itely +++ b/input/lsr/vocal-music-intro.itely @@ -1,5 +1,7 @@ @node Vocal music -@unnumbered Vocal music +@chapter Vocal music + +@ruser{Vocal music} @lysnippets diff --git a/input/lsr/winds-intro.itely b/input/lsr/winds-intro.itely index 8f7d4ddf23..fdf171b4c4 100644 --- a/input/lsr/winds-intro.itely +++ b/input/lsr/winds-intro.itely @@ -1,5 +1,7 @@ @node Winds -@unnumbered Winds +@chapter Winds + +@ruser{Wind instruments} @lysnippets -- 2.39.5