texi2html-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texi2html-bug] Footnote formatting


From: Reinhold Kainhofer
Subject: Re: [Texi2html-bug] Footnote formatting
Date: Sun, 24 Aug 2008 17:35:28 +0200
User-agent: KMail/1.9.9

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Sonntag, 24. August 2008 schrieb Reinhold Kainhofer:
> 1) I don't like the default way of formatting footnotes, i.e. using
>      <h3><a href=..>(nr)</a></hr><p>footnote text</p>
> which is completely different from the format that is normally used for
> footnotes in books etc:
>     <p><a href=...><sup>nr</sup></a> footnote text</p>
> or
>     <p><a href=...>[nr]</a> footnote text</p>

Please also compare to the output of makeinfo --html:
http://kainhofer.com/~lilypond/Documentation/user/lilypond/Changing-defaults.html#FOOT3

The texinfo manual 
(http://www.gnu.org/software/texinfo/manual/texinfo/texinfo.html#Footnote-Commands)
 
also says that in html the footnote will be formatted as a superscripted 
number...


> 2) I tried to override this behavior in foot_line_and_ref, but
> unfortunately, the $lines already contain the <p> ..</p> tags around the
> text, so it's not so easy to get the normal footnote format in a general
> way. Only by assuming that the first line starts with <p>, one can modify
> it to contain the [nr] or <sup>nr</sup>:
>     my $tmptxt =  &$anchor($footnote_id, $document_file . "#$place_id",
>     $lines->[0] =~ s/^<p>/<p>$tmptxt /;
> It works, but I consider this a nasty hack, relying on some internal
> behavior that might change any time...

Oh, I just found out that it breaks if the footnote contains an index entry, 
because then $lines->[0] will be <a name=IDX..></a> and the replacement will 
no longer work. Of course, a possible workaround is 
    my $tmptxt =  &$anchor($footnote_id, $document_file . "#$place_id",
                   "<sup>$number_in_doc</sup>");
    $lines->[1] =~ s/<p>/<p>$tmptxt /;
but that's no optimal solution, either, as it might break with multi-paragraph 
footnotes...

Attached is a small example file (together with the init file) to play around 
with that problem.

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/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIsX/FTqjEwhXvPN0RAuQOAJ95BNEjjYqK/IEcTZ5nDCgU7lN4DQCfQJC3
xOdSSf+9eRnc7muKqfzERW4=
=iTrg
-----END PGP SIGNATURE-----

Attachment: texi2html_footnote_formatting.texi
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]