[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Lilypond-book: Auto-detect linewidth and exampleindent in texinf
From: |
Reinhold Kainhofer |
Subject: |
[PATCH] Lilypond-book: Auto-detect linewidth and exampleindent in texinfo mode |
Date: |
Mon, 22 Aug 2011 13:26:30 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.38-10-generic; KDE/4.7.0; i686; ; ) |
Please review:
http://codereview.appspot.com/4938044
This patch adds autodetection of linewidth and exampleindent to the texinfo
mode. This works by simply running a test file (with the layout settings
extracted from the original tely file) through texi2pdf, which prints out the
value of the @hsize and @lispindent variables.
e.g. in our docs we so far use @afourpaper and a hardcoded linewidth of 160\mm
and an exampleindent of 0.4\in (=10.16\mm).
The auto-detected values, however are
{'exampleindent': '10.197941\\mm', 'line-width': '160.599995\\mm'
So, as you see the line-width was half a mm too small (no problem), but the
indent was underestimated a bit.
This patch also makes lilypond-book work with other documents that explicitly
set @exampleindent to something other than the default, and that e.g. use
@pagesize to set different text areas (which, however, is utterly broken in
texi2pdf anyway).
Note that this does NOT fix our issues 1638 and 1816. This patch simply gives
use the exact values for texi2pdf. However, there are two problems to fix for
these bugs:
-) lilypond creates images that are larger than the line-width
-) texi2pdf needs some space around images (~0.5-1mm on each side), so the
images have to be ~1-2mm smaller than latex' @hsize! I have sent a mail to the
texinfo bug list about this.
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org
- [PATCH] Lilypond-book: Auto-detect linewidth and exampleindent in texinfo mode,
Reinhold Kainhofer <=