]> git.donarmstrong.com Git - lilypond.git/commitdiff
Web build: complicate macro to create links.
authorGraham Percival <graham@percival-music.ca>
Sun, 20 Dec 2009 18:49:26 +0000 (18:49 +0000)
committerGraham Percival <graham@percival-music.ca>
Sun, 20 Dec 2009 18:51:02 +0000 (18:51 +0000)
This ensures a more unified approach, but more importantly means
that any mistakes will be more visible.

Also, it paves the way to do a complicated @iftex, @ifhtml @ifset
web, etc, to change the @url links.  (I mean, the horrible
construction that's upcoming will only be horrible in one place,
instead of duplicating this 10 times in manusl.itexi and
community.itexi)

Documentation/web.texi
Documentation/web/manuals.itexi
scripts/build/create-version-itexi.py

index 417b0ab988ab247c4e63de05155740fe21e15911..b75e37e5987d5c8484eda16c620cfbb7fb264034 100644 (file)
@@ -187,6 +187,65 @@ Distributions will want to install lilypond.info in postinstall, doing:
 @end direntry
 
 
+@c FIXME: this still doesn't solve the broken links in pdf and big
+@c        html; we'll need a bunch of @iftext and stuff in here. -gp
+@c ****************** SPECIAL MACROS FOR WEB MANUAL ************
+@macro docLinks{name,base,refLink,split,big,bigsize,pdf,pdfsize}
+@subheading Read it
+
+@itemize
+
+@c normal case, special online case
+@ifclear web_version
+  @item \refLink\:
+@end ifclear
+@ifset web_version
+  @c we assume that the online web version will be split html
+  @item \split\:
+@end ifset
+read this manual in the same format as this one.
+
+@end itemize
+
+@subheading All formats
+
+@divClass{keep-bullets}
+@itemize
+
+@ifclear web_version
+  @item @uref{../\base\/index.html, \name\ (split HTML)}:
+@end ifclear
+@ifset web_version
+  @item \split\
+@end ifset
+  the manual is split between many HTML pages.
+  @*@ @ @emph{(small download for each page)}
+
+@ifclear web_version
+  @item @uref{../\base\-big-page.html, \name\ (big HTML)}:
+@end ifclear
+@ifset web_version
+  @item \big\
+@end ifset
+  read this manual as one huge HTML page.
+  @*@ @ @emph{(large single download, \bigsize\)}
+
+@ifclear web_version
+  @item @uref{../\base\.pdf, \base\.pdf}:
+@end ifclear
+@ifset web_version
+  @item \pdf\
+@end ifset
+  download as a PDF file.
+  @*@ @ @emph{(large single download, \pdfsize\)}
+
+@end itemize
+
+@divEnd
+
+@end macro
+
+
 @include web/introduction.itexi
 @include web/download.itexi
 @include web/manuals.itexi
index b592e1452b696953f4aaa903bdd54d0ecc5d56ca..4591218c58b5554334ec2a3c054d2aa1c8c7164d 100644 (file)
@@ -157,60 +157,13 @@ and follow those cross-references for more information.
 @divEnd
 
 @divClass{column-right-bottom}
-@subheading Read it
-
-@itemize
-
-@c normal case, special online case
-@ifclear web_version
-  @item @rlearningnamed{Top,Learning}:
-@end ifclear
-@ifset web_version
-  @c we assume that the online web version will be split html
-  @item @manualStableLearningSplit
-@end ifset
-read this manual in the same format as this one.
-
-@end itemize
-
-@subheading All formats
 
-@divClass{keep-bullets}
-@itemize
-
-@ifclear web_version
-  @item @uref{../learning/index.html, Learning (split HTML)}:
-@end ifclear
-@ifset web_version
-  @item @manualStableLearningSplit
-@end ifset
-  the manual is split between many HTML pages.
-  @*@ @ @emph{(small download for each page)}
-
-@ifclear web_version
-  @item @uref{../learning-big-page.html, Learning (big HTML)}:
-@end ifclear
-@ifset web_version
-  @item @manualStableLearningBig
-@end ifset
-  read this manual as one huge HTML page.
-  @*@ @ @emph{(large single download, 1.5 Mb)}
-
-@ifclear web_version
-  @item @uref{../learning.pdf, learning.pdf}:
-@end ifclear
-@ifset web_version
-  @item @manualStableLearningPdf
-@end ifset
-  download as a PDF file.
-  @*@ @ @emph{(large single download, 3 Mb)}
-
-@c TODO: should make links to info?
-@c @item @uref{../TODO, learning.info}:
-@c GNU info format for documentation.  link broken.
+@docLinks{Learning, learning,
+  @rlearningnamed{Top,Learning},
+  @manualStableLearningSplit,
+  @manualStableLearningBig, 1.5 Mb,
+  @manualStableLearningPdf, 3 Mb}
 
-@end itemize
-@divEnd
 @divEnd
 
 
@@ -228,37 +181,13 @@ it is highly advisable to consult the glossary.
 @divEnd
 
 @divClass{column-right-bottom}
-@subheading Read it
-
-@itemize
-
-@item @rglosnamed{Top,Music glossary}:
-read this manual in the same format as this one.
-
-@end itemize
-
-@subheading All formats
-
-@divClass{keep-bullets}
-@itemize
-
-@item @uref{../music-glossary/index.html, Glossary (split HTML)}:
-the manual is split between many HTML pages.
-@*@ @ @emph{(small download for each page)}
 
-@item @uref{../music-glossary-big-page.html, Glossay (big HTML)}:
-read this manual as one huge HTML page.
-@*@ @ @emph{(large single download, 1 mb)}
-
-@item @uref{../music-glossary.pdf, glossary.pdf}:
-download as a PDF file.
-@*@ @ @emph{(large single download, 1.5 Mb)}
+@docLinks{Music glossary, music-glossary,
+  @rglosnamed{Top,Music glossary},
+  @manualStableGlossarySplit,
+  @manualStableGlossaryBig, 1 Mb,
+  @manualStableGlossaryPdf, 1.5 Mb}
 
-@c @item @uref{../TODO, glossary.info}:
-@c GNU info format for documentation.  TODO, link broken.
-
-@end itemize
-@divEnd
 @divEnd
 
 
index 1b71cd9f0e90ef70dbe580a68b081efad90c8d0f..228ade2c9721613d2d890f9479c10c59c5249bfd 100644 (file)
@@ -105,12 +105,18 @@ def make_manual_links(name, version):
                # FIXME: this is disgusting
                manual = m
                mshort = 'glossary' if m=='music-glossary' else m
-               make_ver_link("manual"+name+mshort.capitalize()+'Pdf', version,
-                         manual + '.pdf', manual+'.pdf')
-               make_ver_link("manual"+name+mshort.capitalize()+'Split', version,
-                         manual+'/index.html', manual+' (split HTML)')
-               make_ver_link("manual"+name+mshort.capitalize()+'Big', version,
-                         manual+'-big-page.html', manual + ' (big HTML)')
+               make_ver_link("manual"+name+mshort.capitalize()+'Pdf',
+                         version,
+                         manual + '.pdf',
+                         manual.capitalize() + '.pdf')
+               make_ver_link("manual"+name+mshort.capitalize()+'Split',
+                         version,
+                         manual+'/index.html',
+                         manual.capitalize() + ' (split HTML)')
+               make_ver_link("manual"+name+mshort.capitalize()+'Big',
+                         version,
+                         manual+'-big-page.html',
+                         manual.capitalize() + ' (big HTML)')
 
 
 print "@c ************************ Version numbers ************"