From: Graham Percival <graham@percival-music.ca>
Date: Thu, 28 Feb 2008 21:18:09 +0000 (-0800)
Subject: Re-enable @version macro.
X-Git-Tag: release/2.11.42-1~7^2~15^2~8^2
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dcb2c123433b93c48e9305700d15f3649a9a8004;p=lilypond.git

Re-enable @version macro.
---

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..ca8f2b0cc4 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
@@ -112,12 +100,8 @@ Free Documentation License''.
 @ifnottex
 @node Top
 @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 +131,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/working.itely b/Documentation/user/working.itely
index 4f8820da01..36e8e0140c 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},
diff --git a/Documentation/user/writing-texinfo.txt b/Documentation/user/writing-texinfo.txt
index 4c988f754e..75b6c60657 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..b9642e8aca 100644
--- a/stepmake/stepmake/texinfo-vars.make
+++ b/stepmake/stepmake/texinfo-vars.make
@@ -7,11 +7,12 @@ TEXINFO_SOURCES = $(TEXI_FILES)
 
 OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt))
 
+TEXI2PDF_FLAGS += --command '@set version $(TOPLEVEL_VERSION)'
 GENERATE_OMF = $(PYTHON) $(buildscript-dir)/texi2omf.py --format $(1) --location $(webdir)/$(tree-dir)/out-www/$(notdir $(basename $@))  --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)