]> git.donarmstrong.com Git - lilypond.git/commitdiff
Improve Snippets document (second and last try)
authorJohn Mandereau <john.mandereau@gmail.com>
Sat, 24 May 2008 07:50:04 +0000 (09:50 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Sat, 24 May 2008 07:50:04 +0000 (09:50 +0200)
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.

25 files changed:
buildscripts/add_html_footer.py
input/lsr/ancient-notation-intro.itely
input/lsr/chords-intro.itely
input/lsr/contexts-and-engravers-intro.itely
input/lsr/editorial-annotations-intro.itely
input/lsr/expressive-marks-intro.itely
input/lsr/fretted-strings-intro.itely
input/lsr/keyboards-intro.itely
input/lsr/lilypond-snippets.tely
input/lsr/midi-intro.itely
input/lsr/paper-and-layout-intro.itely
input/lsr/percussion-intro.itely
input/lsr/pitches-intro.itely
input/lsr/repeats-intro.itely
input/lsr/rhythms-intro.itely
input/lsr/simultaneous-notes-intro.itely
input/lsr/spacing-intro.itely
input/lsr/staff-notation-intro.itely
input/lsr/template-intro.itely
input/lsr/text-intro.itely
input/lsr/titles-intro.itely
input/lsr/tweaks-and-overrides-intro.itely
input/lsr/unfretted-strings-intro.itely
input/lsr/vocal-music-intro.itely
input/lsr/winds-intro.itely

index 00b48dc6ba5a5accfa490974419c33e396f0c077..34ada97aac97d2cb7a5cfc8af0c0c481aab23aec 100644 (file)
@@ -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):
index 52a221029e03c6955caddfc8ad5f327e0526a821..046148ec765731d930e971e53a20eec49cd7fb39 100644 (file)
@@ -1,5 +1,7 @@
 @node Ancient notation
-@unnumbered Ancient notation
+@chapter Ancient notation
+
+@ruser{Ancient notation}
 
 @lysnippets
 
index c9980477efcab8fce1be5d87ca590149bf42dbd0..89b80ee89546d0a3521f28538c7f16fc1d397d28 100644 (file)
@@ -1,5 +1,7 @@
 @node Chords
-@unnumbered Chords
+@chapter Chords
+
+@ruser{Chord notation}
 
 @lysnippets
 
index ca1031a98dc68c00f431c7c4b0e2ea70be9d386b..a79a0ba54d6ea2a77338a565ffa27aed1e97c2a3 100644 (file)
@@ -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
 
index 9d4658e30d82ae0ce1f29de4c885108ba2afd2a7..249eafecfad97a8a09bd9734510685e5ba61d910 100644 (file)
@@ -1,5 +1,7 @@
 @node Editorial annotations
-@unnumbered Editorial annotations
+@chapter Editorial annotations
+
+@ruser{Editorial annotations}
 
 @lysnippets
 
index 6b6550dd36a1962cbab426811b7b607c2a16562e..73d9cd80596a2f5c93fa2b220ace9af0cf17f604 100644 (file)
@@ -1,5 +1,7 @@
 @node Expressive marks
-@unnumbered Expressive marks
+@chapter Expressive marks
+
+@ruser{Expressive marks}
 
 @lysnippets
 
index bb149c1e2deed4694d71e7fa7c2597415e46d901..e298fe67ce6db70b3002724cbf0f6fb7b70f5570 100644 (file)
@@ -1,5 +1,7 @@
 @node Fretted strings
-@unnumbered Fretted strings
+@chapter Fretted strings
+
+@ruser{Fretted string instruments}
 
 @lysnippets
 
index 35b849e79c331dd49f84841eabe738fafd46d1c6..8607d8c94f85c2c5564b931085371eb162da895a 100644 (file)
@@ -1,5 +1,7 @@
 @node Keyboards
-@unnumbered Keyboards
+@chapter Keyboards
+
+@ruser{Keyboard instruments}
 
 @lysnippets
 
index b1c28b2af8503668778863108dd2cd3458a5a7c8..4ac69bf1821a1bad1b953583ca51b4c4746a1a7f 100644 (file)
 @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.
index e46fe431285e89b9f987f34debb1593e3f31a376..6236eebe372aa30fa3130d7a6df2772c73e61f9e 100644 (file)
@@ -1,5 +1,7 @@
 @node MIDI
-@unnumbered MIDI
+@chapter MIDI
+
+@ruser{MIDI output}
 
 @lysnippets
 
index 35774dfab19d7e78b6f06452a22b59b99e5f9be1..5ac1a33370d8a0d7378de554135cebebd85698ac 100644 (file)
@@ -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
 
index 9c2c6fdb12dbd1ccdfd513fe4d7a825027ba396d..cc7508d1c0b0abcaba28a0b1001d4b9acf35a1e0 100644 (file)
@@ -1,5 +1,7 @@
 @node Percussion
-@unnumbered Percussion
+@chapter Percussion
+
+@ruser{Percussion}
 
 @lysnippets
 
index 2d65d943550f9433ffd7be7cca72f4a00971d170..52b620186c1b254c15796193564311d1b28f3771 100644 (file)
@@ -1,5 +1,7 @@
 @node Pitches
-@unnumbered Pitches
+@chapter Pitches
+
+@ruser{Pitches}
 
 @lysnippets
 
index bda677755af584db9582ba0eca21e325db08ceec..2ffd50e94262665b5dd25e7c10ea9c31b8940eef 100644 (file)
@@ -1,5 +1,7 @@
 @node Repeats
-@unnumbered Repeats
+@chapter Repeats
+
+@ruser{Repeats}
 
 @lysnippets
 
index a250e5b39870edddd98a438e77f3739b303481fe..baa8d2b8c88023a1610ecccdc506c59d993e9ad2 100644 (file)
@@ -1,5 +1,7 @@
 @node Rhythms
-@unnumbered Rhythms
+@chapter Rhythms
+
+@ruser{Rhythms}
 
 @lysnippets
 
index 321010ab4c8a1dba0e53856e815750d3a538edaf..451bb9eb577eba0f95f7238660d787ff01a5ee6f 100644 (file)
@@ -1,5 +1,7 @@
 @node Simultaneous notes
-@unnumbered Simultaneous notes
+@chapter Simultaneous notes
+
+@ruser{Simultaneous notes}
 
 @lysnippets
 
index 7cd4fcd4776da105d5a191c702b948c32c8e0030..184646ef8073d44fd281bf69a41e2c99371984e3 100644 (file)
@@ -1,5 +1,7 @@
 @node Spacing
-@unnumbered Spacing
+@chapter Spacing
+
+@ruser{Spacing issues}
 
 @lysnippets
 
index 4a2103d87e103fc93465dc71c161e0ca1b31a75d..8606dd687e8d8d56e4c23912a0cabfaca0486c7a 100644 (file)
@@ -1,5 +1,7 @@
 @node Staff notation
-@unnumbered Staff notation
+@chapter Staff notation
+
+@ruser{Staff notation}
 
 @lysnippets
 
index 22c9952e840cbabbc9718ea396ed137ff104dc94..3fd680a451cb5f470b58f941935ebd37e719cbd0 100644 (file)
@@ -1,5 +1,5 @@
 @node Templates
-@unnumbered Templates
+@chapter Templates
 
 @lysnippets
 
index 29a4f45e0f271da1a576a4653f79f8b0cca152de..ab2e05225b5c0cd641e5f103769dd5d0fb077ef5 100644 (file)
@@ -1,5 +1,7 @@
 @node Text
-@unnumbered Text
+@chapter Text
+
+@ruser{Text}
 
 @lysnippets
 
index ef18b4d2e8839cd678760c334202f1f94896ff32..46365d8edf5c0e65e1421a85a04c41de68ced895 100644 (file)
@@ -1,5 +1,7 @@
 @node Titles
-@unnumbered Titles
+@chapter Titles
+
+@ruser{Titles and headers}
 
 @lysnippets
 
index e97bfdf0e2baca7d6b1945fb0fb69ed93f80fd89..6f47df836adb891c07dfbc05009fba823b404ac4 100644 (file)
@@ -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
 
index f5f5966e6e2cdaa3c746147b6a7e56a4c4be29f9..e1023f78aae09fba2ce179981ac1944abadc6589 100644 (file)
@@ -1,5 +1,7 @@
 @node Unfretted strings
-@unnumbered Unfretted strings
+@chapter Unfretted strings
+
+@ruser{Unfretted string instruments}
 
 @lysnippets
 
index 4a3866cca1d2b2260fcfbe9bb52cadd455f8be77..5574dd687805afca382d1e4b859a855fd1ef70fb 100644 (file)
@@ -1,5 +1,7 @@
 @node Vocal music
-@unnumbered Vocal music
+@chapter Vocal music
+
+@ruser{Vocal music}
 
 @lysnippets
 
index 8f7d4ddf236ba0cde6d3b5d8d339dceaf77ef32f..fdf171b4c41e29e1baccb8ec0d5fb9c6f440d031 100644 (file)
@@ -1,5 +1,7 @@
 @node Winds
-@unnumbered Winds
+@chapter Winds
+
+@ruser{Wind instruments}
 
 @lysnippets