3 ms·
Often you want page numbers so that you can refer to them later in the text (“See Figure 1 on page n.”) I think at one point I knew how to do that in markdown b
by grayclhn 5y ago
Often you want page numbers so that you can refer to them later in the text (“See Figure 1 on page n.”) I think at one point I knew how to do that in markdown but IIRC it was only an option in pandoc, and 2) it only worked by printing to pdf via LaTeX, and 3) I may have needed to implement it in LaTeX anyway.
“Pandoc lets you achieve X by embedding latex in your markdown file” is a lot different than “markdown supports X”
- dhosek 5y agoPage references are an interesting case because they’re very print-dependent. A I've been working on finl, I've thought about the fact that page references don't work well for documents which might be presented electronically.¹ A reference like “on page 32” doesn’t translate to say HTML or ePub. At one point, while I was reading the Rust book, I was excited to see how a page reference was translated into the online version. I quickly went there and they rewrote that sentence to eliminate the page ref. The other challenge with page references is that they’re at least in theory, a potential source for a loop condition in rendering. We can have a reference to “on page xcix” which will cause the referred to element to move to page c, but then when the output is changed to “on page c” the element moves back to page xcix.² ⸻⸻⸻ 1. PDF in a way doesn't count as electronic presentation in that it’s inherently an electronic representation of a print product, things like PDF reflowing notwithstanding. 2. I suspect, but can’t prove, that in LaTeX, this could even happen if a page reference becomes longer, thanks to how LaTeX’s line breaking algorithm works on a paragraph at a whole. When I get to that part of finl, I guess I’ll know for sure whether this is possible, and if so, will work out how to avoid it.