From 26deeae8dc07dae6a04f61b20185c864dcf6a961 Mon Sep 17 00:00:00 2001 From: John Mandereau Date: Sat, 23 Feb 2008 15:29:43 +0100 Subject: [PATCH] Always use Lily current version number in docs --- Documentation/user/README.txt | 2 +- Documentation/user/fundamental.itely | 13 ++++++------ Documentation/user/lilypond-book.itely | 3 ++- Documentation/user/lilypond-learning.tely | 25 ++++------------------- Documentation/user/lilypond-program.tely | 25 ++++------------------- Documentation/user/lilypond.tely | 25 ++++------------------- Documentation/user/tutorial.itely | 4 ++-- Documentation/user/working.itely | 4 ++-- Documentation/user/writing-texinfo.txt | 13 ++++++++++++ stepmake/stepmake/texinfo-vars.make | 3 ++- 10 files changed, 40 insertions(+), 77 deletions(-) diff --git a/Documentation/user/README.txt b/Documentation/user/README.txt index 6b39a974a3..ae345e03d0 100644 --- a/Documentation/user/README.txt +++ b/Documentation/user/README.txt @@ -11,7 +11,7 @@ General policy: policy.txt convert-ly -e --from=... --to=... --no-version *.itely % to find the current version number, -grep "version \"" tutorial.itely +grep "version \"" fundamental.itely Please don't forget updating translated docs (in LANGS/user) too! diff --git a/Documentation/user/fundamental.itely b/Documentation/user/fundamental.itely index 1e56b0e4f2..1ccf9bcf02 100644 --- a/Documentation/user/fundamental.itely +++ b/Documentation/user/fundamental.itely @@ -40,7 +40,7 @@ description of the input format, see @ruser{File structure}. A basic example of a lilypond input file is @example -\version "2.11.38" +\version @w{"@version{}"} \score @{ @var{...compound music expression...} % all the music goes here! \header @{ @} @@ -1739,7 +1739,7 @@ cello. In this case, we would start with @q{Notes and lyrics} (for the soprano part). @example -\version "2.11.38" +\version @w{"@version{}"} melody = \relative c' @{ \clef treble \key c \major @@ -1767,7 +1767,7 @@ text = \lyricmode @{ Now we want to add a cello part. Let's look at the @q{Notes only} example: @example -\version "2.11.38" +\version @w{"@version{}"} melody = \relative c' @{ \clef treble \key c \major @@ -1804,7 +1804,7 @@ celli normally use bass clef. We'll also give the cello some different notes. @example -\version "2.11.38" +\version @w{"@version{}"} sopranoMusic = \relative c' @{ \clef treble \key c \major @@ -1873,7 +1873,7 @@ This looks a bit messy; the indentation is messed up now. That is easily fixed. Here's the complete soprano and cello template. @lilypond[quote,verbatim,ragged-right] -\version "2.11.37" +\version "2.11.38" sopranoMusic = \relative c' { \clef treble \key c \major @@ -1921,7 +1921,6 @@ from Handel's Messiah: @c The following should appear as music without code @lilypond[quote,ragged-right] -\version "2.11.38" global = { \key d \major \time 4/4 } sopMusic = \relative c'' { \clef "treble" @@ -2193,7 +2192,7 @@ music definitions and one to define the time signature and key: @example -\version "2.11.38" +\version @w{"@version{}"} \header @{ title = "Jesu, meine Freude" composer = "J S Bach" diff --git a/Documentation/user/lilypond-book.itely b/Documentation/user/lilypond-book.itely index 86b274f9cf..f0af1fcf17 100644 --- a/Documentation/user/lilypond-book.itely +++ b/Documentation/user/lilypond-book.itely @@ -105,9 +105,10 @@ directory as this file.) Save the code above to a file called @file{lilybook.lytex}, then in a terminal run +@c keep space after @version{} so TeX doesn't choke @example lilypond-book --output=out --pdf lilybook.lytex -@emph{lilypond-book (GNU LilyPond) 2.11.37} +@emph{lilypond-book (GNU LilyPond) @version{} } @emph{Reading lilybook.lytex...} @emph{..lots of stuff deleted..} @emph{Compiling lilybook.tex...} diff --git a/Documentation/user/lilypond-learning.tely b/Documentation/user/lilypond-learning.tely index c1e811970a..fac164092e 100644 --- a/Documentation/user/lilypond-learning.tely +++ b/Documentation/user/lilypond-learning.tely @@ -10,6 +10,8 @@ @documentencoding UTF-8 @documentlanguage en +@include macros.itexi + @iftex @afourpaper @c don't replace quotes with directed quotes @@ -64,21 +66,7 @@ Free Documentation License''. @vskip 20pt -@lilypond[ragged-right] -\score { - \context Lyrics { - \override Score.RehearsalMark #'self-alignment-X = #LEFT - \override Score.RehearsalMark #'font-size = #-2 - \mark #(ly:export (string-append - "(For LilyPond version " (lilypond-version) ")")) - s2 - } - \layout { - indent = 0.0\pt - } -} -@end lilypond - +For LilyPond version @version{} @end titlepage @copying @@ -114,10 +102,7 @@ Free Documentation License''. @top GNU LilyPond --- learning manual @c HJJ: Info needs `@top', which is a synonym for `@unnumbered' in TeX. -This is the learning manual for GNU LilyPond 2.11.x series. -@ifhtml -(See the bottom of this page for the exact version number). -@end ifhtml +This is the learning manual for GNU LilyPond version @version{}. @cindex web site @cindex URL @@ -147,8 +132,6 @@ Appendices @contents -@include macros.itexi - @include preface.itely @include introduction.itely @include tutorial.itely diff --git a/Documentation/user/lilypond-program.tely b/Documentation/user/lilypond-program.tely index 6fa9f3900b..18ced37734 100644 --- a/Documentation/user/lilypond-program.tely +++ b/Documentation/user/lilypond-program.tely @@ -10,6 +10,8 @@ @documentencoding UTF-8 @documentlanguage en +@include macros.itexi + @iftex @afourpaper @c don't replace quotes with directed quotes @@ -64,21 +66,7 @@ Free Documentation License''. @vskip 20pt -@lilypond[ragged-right] -\score { - \context Lyrics { - \override Score.RehearsalMark #'self-alignment-X = #LEFT - \override Score.RehearsalMark #'font-size = #-2 - \mark #(ly:export (string-append - "(For LilyPond version " (lilypond-version) ")")) - s2 - } - \layout { - indent = 0.0\pt - } -} -@end lilypond - +For LilyPond version @version{} @end titlepage @copying @@ -114,10 +102,7 @@ Free Documentation License''. @top GNU LilyPond --- program usage @c HJJ: Info needs `@top', which is a synonym for `@unnumbered' in TeX. -This is the program usage manual for GNU LilyPond 2.11.x series. -@ifhtml -(See the bottom of this page for the exact version number). -@end ifhtml +This is the program usage manual for GNU LilyPond version @version{}. @cindex web site @cindex URL @@ -143,8 +128,6 @@ Appendices @contents -@include macros.itexi - @include install.itely @include setup.itely @include running.itely diff --git a/Documentation/user/lilypond.tely b/Documentation/user/lilypond.tely index 0631951f5a..7c203800d7 100644 --- a/Documentation/user/lilypond.tely +++ b/Documentation/user/lilypond.tely @@ -10,6 +10,8 @@ @documentencoding UTF-8 @documentlanguage en +@include macros.itexi + @iftex @afourpaper @c don't replace quotes with directed quotes @@ -98,21 +100,7 @@ Free Documentation License''. @vskip 20pt -@lilypond[ragged-right] -\score { - \context Lyrics { - \override Score.RehearsalMark #'self-alignment-X = #LEFT - \override Score.RehearsalMark #'font-size = #-2 - \mark #(ly:export (string-append - "(For LilyPond version " (lilypond-version) ")")) - s2 - } - \layout { - indent = 0.0\pt - } -} -@end lilypond - +For LilyPond version @version{} @end titlepage @copying @@ -148,10 +136,7 @@ Free Documentation License''. @top GNU LilyPond --- The music typesetter @c HJJ: Info needs `@top', which is a synonym for `@unnumbered' in TeX. -This is the user manual for GNU LilyPond 2.11.x series. -@ifhtml -(See the bottom of this page for the exact version number). -@end ifhtml +This is the user manual for GNU LilyPond version @version{}. @cindex web site @cindex URL @@ -187,8 +172,6 @@ Appendices @contents -@include macros.itexi - @include notation.itely @include specialist.itely diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 765bd4aff1..dd777b9367 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -1585,7 +1585,7 @@ The @code{\version} statement records the version of LilyPond that was used to write the file: @example -\version "2.11.38" +\version @w{"@version{}"} @end example @noindent @@ -1607,7 +1607,7 @@ main music expression; the @code{\header} block is usually placed underneath the @ref{Version number}. @example -\version "2.11.38" +\version @w{"@version{}"} \header @{ title = "Symphony" composer = "Me" diff --git a/Documentation/user/working.itely b/Documentation/user/working.itely index 4f8820da01..216f577e89 100644 --- a/Documentation/user/working.itely +++ b/Documentation/user/working.itely @@ -73,7 +73,7 @@ templates contain @code{\version} information. We highly recommend that you always include the @code{\version}, no matter how small your file is. Speaking from personal experience, it's quite frustrating to try to remember which version of LilyPond you were -using a few years ago. @code{convert-ly} requires you to declare +using a few years ago. @command{convert-ly} requires you to declare which version of LilyPond you used. @item @strong{Include checks}: @ruser{Bar and barnumber checks}, @@ -536,7 +536,7 @@ file with @code{\include "../global.ly"}, which contains @example %%% global.ly -\version "2.11.38" +\version @w{"@version{}"} #(ly:set-option 'point-and-click #f) \include "../init/init-defs.ly" \include "../init/init-layout.ly" diff --git a/Documentation/user/writing-texinfo.txt b/Documentation/user/writing-texinfo.txt index 4c988f754e..7913ed0ad7 100644 --- a/Documentation/user/writing-texinfo.txt +++ b/Documentation/user/writing-texinfo.txt @@ -161,6 +161,19 @@ commands. Do not use @itemize @bullet. +* To get LilyPond version, use @version{} (this does not work inside + LilyPond snippets). If you write "@version{}" (enclosed with + quotes), or generally if @version{} is not followed by a space, + enclose it with + + @w{ ... } + + e.g. + + @w{"@version{}"} + + to prevent an ugly line break in PDF output. + %%%%% SYNTAX SURVEY diff --git a/stepmake/stepmake/texinfo-vars.make b/stepmake/stepmake/texinfo-vars.make index d36ff83b81..4ee7cefa47 100644 --- a/stepmake/stepmake/texinfo-vars.make +++ b/stepmake/stepmake/texinfo-vars.make @@ -9,9 +9,10 @@ OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt)) GENERATE_OMF = $(PYTHON) $(buildscript-dir)/texi2omf.py --format $(1) --location $(webdir)/$(tree-dir)/out-www/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@ +TEXI2PDF_FLAGS += --command '@set version $(TOPLEVEL_VERSION)' TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper) -MAKEINFO_FLAGS = --enable-encoding +MAKEINFO_FLAGS = --enable-encoding -D 'version $(TOPLEVEL_VERSION)' MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS) -- 2.39.2