From dd555e6bd412ca7b7dc422aca6f0d35c40300b86 Mon Sep 17 00:00:00 2001 From: Tom Cato Amundsen Date: Thu, 30 Nov 2000 01:16:08 +0100 Subject: [PATCH] patch::: 1.3.112.tca1 --- .../user/latex-lilypond-example.latex | 3 +- Documentation/user/lilypond-book.tely | 40 +++++-------------- VERSION | 2 +- scripts/lilypond-book.py | 31 ++++++++------ 4 files changed, 31 insertions(+), 45 deletions(-) diff --git a/Documentation/user/latex-lilypond-example.latex b/Documentation/user/latex-lilypond-example.latex index 6906eab7e9..d155917b56 100644 --- a/Documentation/user/latex-lilypond-example.latex +++ b/Documentation/user/latex-lilypond-example.latex @@ -158,6 +158,7 @@ text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text - +%% need to use an -I ../../../input/test to find the file +%% \lilypondfile{tie.ly} \end{document} diff --git a/Documentation/user/lilypond-book.tely b/Documentation/user/lilypond-book.tely index 49fc1f8256..125303f3ef 100644 --- a/Documentation/user/lilypond-book.tely +++ b/Documentation/user/lilypond-book.tely @@ -93,10 +93,11 @@ or @command{texi2dvi}. The result is a text document with formatted music integrated. @command{lilypond-book} will do its best to try to align the music to -the left and right margins. Currently the most used papersizes and -one- and twocolumn mode is supported. But if you use some more -advances features, like the geometry-package or change the margins in -La@TeX{} or use @code{@@pagesize} in texinfo, will break. +the left and right margins. Currently all papersizes, one- and +twocolumn mode and the @code{geometry} package is supported. +The TeXinfo command @code{pagesize} is on the TODO list for Lilypond 1.4. +But changing the linewidth in other ways will not give you a straight +right margin. This document assumes you have basic knowledge of GNU LilyPond and La@TeX{} or texinfo. @@ -120,10 +121,11 @@ or These commands should be in the beginning of the document: @itemize @bullet @item @code{@@afourpaper} +@item @code{@@afourlatex} @item @code{@@afourwide} @item @code{@@smallbook} @end itemize -@code{@@pagesizes} are not supported. +@code{@@pagesizes} are not yet supported. @subsection Examples @@ -208,11 +210,9 @@ or \lilypond@{ YOUR LILYPOND CODE @} @end example -The 'geometry' package is is not supported. The most popular -papersizes should work. - Lilypond-book know about the @code{\onecolumn} and -@code{\twocolumn} commands. +@code{\twocolumn} commands, the @code{geometry} package and +all the standard paper sizes. The music will be surrounded by @code{\preLilypondExample} and @code{\postLilypondExample}. The variables are @@ -221,26 +221,6 @@ to whatever he wants. @strong{[UGH: THIS DOES NOT HAPPEN WHEN YOU USE THE SHORT FORM, \LILYPOND@{ ... @}, CHECK OUT WHY]} -@subsection @code{landscape} package -There is some simple support for landscape paper format, and this -can be combined with the @code{\twocolumn} command. Only a4 and -letter paper is supported, more to come... - -A more complete -support, maybe also supporting the geometry package is planned, but -there are more work that has to be done on @command{lilypond-book} -first. - -This should work: -@example -\documentclass@{article@} -\usepackage@{landscape@} -\begin@{document@} -\twocolumn -BLA BLA BLA -\end@{document@} -@end example - @subsection Examples @example @@ -321,7 +301,7 @@ overwritten. If you use @code{--outdir}, you should also @code{cd} to that directory before running LaTeX or makeinfo. -@strong{[UGH: IS THIS THE BEST WAY TO DO IT. MAYBE ADD A COMMENT LINE TO THE +@strong{[UGH: IS THIS THE BEST WAY TO DO IT? MAYBE ADD A COMMENT LINE TO THE GENERATED FILE, SO LILYPOND-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE IS GENERATED.]} diff --git a/VERSION b/VERSION index 6aff731d9e..92ad983687 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=112 -MY_PATCH_LEVEL=jcn4 +MY_PATCH_LEVEL=tca1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index a871fb4298..9adb9c3e61 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -4,8 +4,12 @@ # * Figure out clean set of options. Hmm, isn't it pretty ok now? # * add support for .lilyrc # * EndLilyPondOutput is def'd as vfil. Causes large white gaps. +# * texinfo: add support for @pagesize -# todo: dimension handling (all the x2y) is clumsy. +# todo: dimension handling (all the x2y) is clumsy. (tca: Thats +# because the values are taken directly from texinfo.tex, +# geometry.sty and article.cls. Give me a hint, and I'll +# fix it.) # This is was the idea for handling of comments: # Multiline comments, @ignore .. @end ignore is scanned for @@ -38,7 +42,7 @@ import operator program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.3.106' + program_version = '1.3.113' include_path = [os.getcwd()] @@ -250,7 +254,7 @@ class LatexPaper: class TexiPaper: def __init__(self): - self.m_papersize = 'a4' + self.m_papersize = 'letterpaper' self.m_fontsize = 12 def get_linewidth(self): return texi_linewidths[self.m_papersize][self.m_fontsize] @@ -278,10 +282,11 @@ latex_linewidths = { 'executivepaper':{10: 345, 11: 360, 12: 379}} texi_linewidths = { - 'a4': {12: 455}, - 'a4wide': {12: 470}, - 'smallbook': {12: 361}, - 'texidefault': {12: 433}} + 'afourpaper': {12: mm2pt(160)}, + 'afourwide': {12: in2pt(6.5)}, + 'afourlatex': {12: mm2pt(150)}, + 'smallbook': {12: in2pt(5)}, + 'letterpaper': {12: in2pt(6)}} option_definitions = [ ('EXT', 'f', 'format', 'set format. EXT is one of texi and latex.'), @@ -429,6 +434,8 @@ def get_re (name): return re_dict[format][name] def bounding_box_dimensions(fname): + if g_outdir: + fname = os.path.join(g_outdir, fname) try: fd = open(fname) except IOError: @@ -562,12 +569,10 @@ def scan_texi_preamble (chunks): idx = 0 while 1: if chunks[idx][0] == 'input': - if string.find(chunks[idx][1], "@afourpaper") != -1: - paperguru.m_papersize = 'a4' - elif string.find(chunks[idx][1], "@afourwide") != -1: - paperguru.m_papersize = 'a4wide' - elif string.find(chunks[idx][1], "@smallbook") != -1: - paperguru.m_papersize = 'smallbook' + for s in ('afourpaper', 'afourwide', 'letterpaper', + 'afourlatex', 'smallbook'): + if string.find(chunks[idx][1], "@%s" % s) != -1: + paperguru.m_papersize = s idx = idx + 1 if idx == 10 or idx == len(chunks): break -- 2.39.5