Hacker News new | past | comments | ask | show | jobs | submit login

> Markdown is designed to be simple and minimalist.

Fair enough.

> It works well for the specific set of things it is designed to do, but once you need anything else - images,

It's never been particularly hard for me to add images in markdown when rendering with Pandoc. It's fairly easy to add images and adjust their size and whatnot, not 100% what you're referring to.

> headers/footers,

Yeah, I'll give you that one, you gotta muck with the preamble YAML in pandoc to get headers, and that's some irritating LaTeX.

> Color

Also fair, not sure it's possible to have color in Markdown->PDF with Pandoc.

> page numbers,

Page numbers are output by default in Pandoc with Markdown. You can also add an optional Table of Contents if needed. Not sure where that rumor started.




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”


Page 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: