[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Footnote in footnote
From: |
Eli Zaretskii |
Subject: |
Re: Footnote in footnote |
Date: |
Thu, 23 Aug 2001 13:11:39 +0300 |
> From: Akim Demaille <address@hidden>
> Date: 23 Aug 2001 08:41:11 +0200
>
> Putting a footnote inside a footnote causes makeinfo to SEGV. TeX
> processes it, but forgets to include the content of the second
> footnote.
Indeed; thanks for reporting this. I think the changes below should
take care of that; please try.
2001-08-23 Eli Zaretskii <address@hidden>
* makeinfo/footnote.c (cm_footnote): Don't allow footnotes inside
footnotes.
(output_pending_notes): Increment already_outputting_pending_notes
in the HTML case as well, to protect execute_string from
recursively entering output_pending_notes.
--- makeinfo/footnote.c~0 Mon Sep 20 14:20:52 1999
+++ makeinfo/footnote.c Thu Aug 23 13:07:44 2001
@@ -200,6 +200,18 @@ cm_footnote ()
return;
}
+ /* output_pending_notes is non-reentrant (it uses a global data
+ structure pending_notes, which it frees before it returns), and
+ TeX doesn't grok footnotes inside footnotes anyway. Disallow
+ that. */
+ if (already_outputting_pending_notes)
+ {
+ line_error (_("Footnotes inside footnotes are not allowed"));
+ free (marker);
+ free (note);
+ return;
+ }
+
if (!*marker)
{
free (marker);
@@ -328,7 +340,9 @@ output_pending_notes ()
/* Make the text of every footnote begin a separate paragraph. */
add_word_args ("<li><a name=\"fn-%d\"></a>\n<p>",
footnote->number);
+ already_outputting_pending_notes++;
execute_string ("%s", footnote->note);
+ already_outputting_pending_notes--;
add_word ("</p>\n");
}
else