From c3dc976aed1f0f3429f59fa6713ec8d8447ec4d5 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Sun, 20 Dec 2009 18:49:26 +0000 Subject: [PATCH] Web build: complicate macro to create links. 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 | 59 +++++++++++++++++ Documentation/web/manuals.itexi | 91 +++------------------------ scripts/build/create-version-itexi.py | 18 ++++-- 3 files changed, 81 insertions(+), 87 deletions(-) diff --git a/Documentation/web.texi b/Documentation/web.texi index 417b0ab988..b75e37e598 100644 --- a/Documentation/web.texi +++ b/Documentation/web.texi @@ -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 diff --git a/Documentation/web/manuals.itexi b/Documentation/web/manuals.itexi index b592e1452b..4591218c58 100644 --- a/Documentation/web/manuals.itexi +++ b/Documentation/web/manuals.itexi @@ -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 diff --git a/scripts/build/create-version-itexi.py b/scripts/build/create-version-itexi.py index 1b71cd9f0e..228ade2c97 100644 --- a/scripts/build/create-version-itexi.py +++ b/scripts/build/create-version-itexi.py @@ -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 ************" -- 2.39.2