[kramdown-users] LaTeX Footnote inside of emphasized text

Michael Franzl michaelfranzl at gmx.at
Fri Aug 6 04:41:12 EDT 2010


On 08/04/2010 09:08 AM, Michael Franzl wrote:
> But, regarding footnotes, there is another thing I stumbled across:
>
> This is text[^note] with a footnote.
>
> [^note]: A footnote.
>
> Translates into
>
> This is text\footnote{A footnote.
>
> } with a footnote.
>
> This is an empty paragraph for LaTeX, and sometimes, if it is wrapped to
> the next page, LaTeX will render a footnote line with no text below it,
> which is very ugly. So, the correct translation would be:
>
> This is text\footnote{A footnote.} with a footnote.

This is a temporary fix with help of multi-line regular expressions:

perl -i -pe 'BEGIN{undef $/;} s/footnote{(.*?)..}/footnote{\1}/smg' file.tex

Michael


More information about the kramdown-users mailing list