diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-30 14:32:03 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-09-30 22:31:56 -0400 |
| commit | 36d0935c9a7521a87929d676a6b657fb033c44eb (patch) | |
| tree | acb1e27aa0a95691419e2b05f5623fbd4f1aac61 /src/sisudoc/outputs/io_out/latex.d | |
| parent | unused function removed (diff) | |
notes: editor's notes, ~[* ]~ & ~[+ ]~, as series
The markup documents ~[* note ]~ and ~[+ note ]~ as editor's notes, each
a separately numbered series, and a bare ~[ note ]~ which sisu put in
the asterisk series. They are included as notes. Each series is numbered
through the document, *1, *2 ... and +1, +2 ..., apart from the author's
notes.
(assisted by Claude-Code)
Diffstat (limited to 'src/sisudoc/outputs/io_out/latex.d')
| -rw-r--r-- | src/sisudoc/outputs/io_out/latex.d | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sisudoc/outputs/io_out/latex.d b/src/sisudoc/outputs/io_out/latex.d index 8e7b37c..1562fae 100644 --- a/src/sisudoc/outputs/io_out/latex.d +++ b/src/sisudoc/outputs/io_out/latex.d @@ -494,6 +494,20 @@ template outputLaTeX() { "$2".strip ).strip ); + /+ ↓ a note of a special series (*, *1, +1 ...). \footnote[n] takes a + number, so the mark is set as \thefootnote for this one note, + and the counter put back, so that the numbered series does not + move. + +/ + _txt = replaceAll!((m) { + import std.array : replace; + string _mark = m["char"]; + string _name = _mark.replace("*", "a").replace("+", "p"); + return "\\hypertarget{noteref_" ~ _name ~ "}{}" + ~ "{\\renewcommand{\\thefootnote}{" ~ _mark ~ "}" + ~ "\\footnote{\\label{note_" ~ _name ~ "}" ~ m["note"].strip ~ "}" + ~ "\\addtocounter{footnote}{-1}}"; + })(_txt, rgx.inline_notes_al_special_char_note); } return _txt; } |
