From 36d0935c9a7521a87929d676a6b657fb033c44eb Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 30 Sep 2026 14:32:03 -0400 Subject: 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) --- src/sisudoc/outputs/io_out/latex.d | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/sisudoc/outputs/io_out/latex.d') 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; } -- cgit v1.2.3