[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
In HTML mode, @quotation uses <blockquote> AND sets indentation to 5 spa
From: |
Reinhold Kainhofer |
Subject: |
In HTML mode, @quotation uses <blockquote> AND sets indentation to 5 spaces! |
Date: |
Sun, 30 Mar 2008 00:56:56 +0100 |
User-agent: |
KMail/1.9.6 |
We're running into one more problem in our texinfo use in LilyPond, this time
it also affects the output that our users produce:
Inside a @quotation environment, makeinfo --html adds 5 additional spaces of
indentation, although the indentation is already done in HTML by the
<blockquote>. In particular, look at the following two self-explaining
examples:
@quotation
@example
Test for indentation: This text is indented with spaces twice (10 spaces: 5
from @@quotation and 5 from @@example), but should only be once (5 from
@@example), because the indentation of @@quotation is already done by
<blockquote>...
@end example
@end quotation
@quotation
@verbatim
Similarly, text in @verbatim environments inside @quotation IS indented by 5
spaces...
@end verbatim
@end quotation
An example file with the .html output is attached (generated by makeinfo
4.11).
Looking at makeinfo/insertion.c, in begin_insertion the current_indent is
unconditionally incremented by the default indent, although the HTML output
should not get an additional indent:
case quotation:
/* @quotation does filling (@display doesn't). */
if (html)
add_html_block_elt ("<blockquote>\n");
else
{...}
current_indent += default_indentation_increment;
The apparent fix is of course to move that increment into the else block (and
also prevent the resetting in end_insertion. This makes the examples work as
intended (but, of course, I don't know the internals of texinfo / makeinfo
well enough to judge possible side-effects).
A patch to fix this is attached. It is against 4.11, but I suppose it should
also work with the CVS version, which hasn't changed in this regard.
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/
quotation-sets-indentation-for-html-plus-blockquote.patch
Description: Text Data
Example inside quotation is doubly indented in HTML (not counting the blockquote)
Test for indentation: This text is indented with spaces twice (10 spaces: 5 from @quotation
and 5 from @example), but should only be once (5 from @example), because the
indentation of @quotation is already done by <blockquote>...
Similarly, text in @verbatim environments inside @quotation IS indented by 5 spaces...
quotation-sets-indentation-for-html-plus-blockquote.texi
Description: Text document
- In HTML mode, @quotation uses <blockquote> AND sets indentation to 5 spaces!,
Reinhold Kainhofer <=