mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-03 14:15:40 +00:00
These commands allow separating the footnote mark from its content, useful in tables, minipages, and other contexts where \footnote cannot be used directly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Closes #11450.
63 lines
1.1 KiB
Markdown
63 lines
1.1 KiB
Markdown
Test for \footnotemark and \footnotetext (issue #11450)
|
|
|
|
```
|
|
% pandoc -f latex -t native
|
|
Text\footnotemark{}.
|
|
\footnotetext{The footnote content.}
|
|
^D
|
|
[ Para
|
|
[ Str "Text"
|
|
, Note
|
|
[ Para
|
|
[ Str "The"
|
|
, Space
|
|
, Str "footnote"
|
|
, Space
|
|
, Str "content."
|
|
]
|
|
]
|
|
, Str "."
|
|
]
|
|
]
|
|
```
|
|
|
|
With explicit footnote numbers:
|
|
|
|
```
|
|
% pandoc -f latex -t native
|
|
First\footnotemark[1] and second\footnotemark[2].
|
|
\footnotetext[1]{First note.}
|
|
\footnotetext[2]{Second note.}
|
|
^D
|
|
[ Para
|
|
[ Str "First"
|
|
, Note [ Para [ Str "First" , Space , Str "note." ] ]
|
|
, Space
|
|
, Str "and"
|
|
, Space
|
|
, Str "second"
|
|
, Note [ Para [ Str "Second" , Space , Str "note." ] ]
|
|
, Str "."
|
|
]
|
|
]
|
|
```
|
|
|
|
Mixed with regular footnotes:
|
|
|
|
```
|
|
% pandoc -f latex -t native
|
|
Text\footnotemark[1] and more\footnote{Regular footnote.}
|
|
\footnotetext[1]{Marked footnote.}
|
|
^D
|
|
[ Para
|
|
[ Str "Text"
|
|
, Note [ Para [ Str "Marked" , Space , Str "footnote." ] ]
|
|
, Space
|
|
, Str "and"
|
|
, Space
|
|
, Str "more"
|
|
, Note [ Para [ Str "Regular" , Space , Str "footnote." ] ]
|
|
]
|
|
]
|
|
```
|