[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem lilypond-book and fragments with quote and line-width
From: |
Reinhold Kainhofer |
Subject: |
Problem lilypond-book and fragments with quote and line-width |
Date: |
Fri, 28 Mar 2008 13:22:33 +0100 |
User-agent: |
KMail/1.9.9 |
While trying to convert some lilypond documentation to html, I've run into a
problem with lilypond snippets in texinfo, that use both the quote and the
line-width option: If both are present, the quote option is simply ignored!
What is the reason for the following code in lilypond-book.py (lines 986ff):
# The QUOTE pattern from ly_options only emits the `line-width'
# keyword.
if has_line_width and QUOTE in self.option_dict:
if no_line_width_value:
del self.option_dict[LINE_WIDTH]
else:
del self.option_dict[QUOTE]
This specific code was apparently added by wl in revision
92fb2ea03e76e763259d39a46807045222589e3d, before the quote option always
caused the line-width to be removed (which was implemented by janneke in his
original commit cf4e08c191004ed490cdb53f17565d4db047b10f that implemented the
quote option -- with a "# Hmm" comment in the code):
#Hmm
if QUOTE in options and LINEWIDTH in options:
options.remove (LINEWIDTH)
The problem with the current code is that using the quote option together with
line-width does not work... In particular in texinfo:
@lilypond[quote,verbatim,staffsize=14]
produces
@quotation
@exampleindent 0
@verbatim
....
@end verbatim
@end quotation
But if you add an explicit line-width for the snippet, i.e.
@lilypond[quote,verbatim,staffsize=14,line-width=8.0\cm]
then the resulting texinfo code will be:
@exampleindent 0
@verbatim
....
@end verbatim
In particular, note that now the quotation is simply missing (and thus also
the indentation!). If I comment out the "else" clause in lilypond-book.py,
thinks work as expected.
I think it makes perfect sense to use both quote and line-width together on a
snippet, or am I missing something?
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
* Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
* K Desktop Environment, http://www.kde.org, KOrganizer maintainer
* Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
- Problem lilypond-book and fragments with quote and line-width,
Reinhold Kainhofer <=