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

You've had some good replies already, but just want to add my thoughts. Markdown to me is more about (a) the content (the actual words) and (b) the semantics (text emphasis, headings, etc, which communicate information about the importance or meaning of particular things).

Typesetting systems like Typst or LaTeX go beyond this. They're also about presentation, how precisely it is laid out, on mediums such as print or PDF. Is that something you need? If you care more about the content and its meaning, and are happy to have it rendered differently in different situations (a preview in Visual Studio Code, or passed through a markdown-to-html renderer, or viewed in Obsidian, etc), then Markdown might not just be fine, it may be preferable. But if you need to do things like print this on paper for mailing, email in a PDF, that sort of thing, then you'll want something more.




A few Markdown documents I've converted to PDFs:

* https://impacts.to/downloads/lowres/impacts.pdf

* https://whitemagicsoftware.com/softcover/technical.pdf

* https://whitemagicsoftware.com/softcover/jekyll-hyde.pdf

Respectfully, keeping presentation logic and content completely separated while having precise control over layout can happen with Markdown, as the example documents demonstrate. The ConTeXt typesetting system makes keeping such separation possible.

The deeper issue relates to the software's architecture, which, IMO, systems like Typst, Obsidian, and others fail to generalize broadly enough. Here's KeenWrite's architecture (the "Proposed" row):

https://gitlab.com/DaveJarvis/KeenWrite/-/raw/main/docs/imag...

Although only Markdown is currently implemented, it's possible to plug other text-based input formats to produce an XHTML document. The instructions for how to typeset XHTML documents are defined by a theme. You can think of a theme as an XML to TeX translation layer. From there, going from XML to TeX is straightforward (when using ConTeXt, at least), allowing full control over the final output format (be it PDF, ePub, and so forth).

I am the author of KeenWrite. The following tutorial shows how its themes work:

https://www.youtube.com/watch?v=3QpX70O5S30&list=PLB-WIt1cZY...


>A few Markdown documents I've converted to PDFs:

These aren't Markdowns converted to PDFs. These are HTML websites rendered as PDF, where at some early point some text with basic formatting was fed in.

>keeping presentation logic and content completely separated while having precise control over layout

Does anyone really want that? I certainly wouldn't want that separation. I want to create some document and not a sophisticated template, so I am always willing to sacrifice generality over momentary needs, if I can't force the layout, then I need to waste time to implement some generality, which I don't need. Completely the wrong approach to document creation.

This looks like you really want to have a web framework, not a document creation system.


> These aren't Markdowns converted to PDFs

Would you like to see the source Markdown documents? My workflow is:

    Markdown -> XML (XHTML) -> TeX -> PDF
If that isn't converting Markdown into PDF, what would you call it?

> Does anyone really want that?

At time of writing KeenWrite has had over 4,000 downloads. So, maybe? However, my point wasn't whether people want it (besides me). My point was that it is technically possible to keep a Markdown document's content separated from its final presentation form (e.g., PDF).

> This looks like you really want to have a web framework, not a document creation system.

Not really: I want to write in Markdown (or R Markdown) using interpolated variables and generate PDF documents. I have spent about 9 years working on a cross-platform desktop text editor that allows me to do so.


>Would you like to see the source Markdown documents?

I am pretty sure I know what they look like from the end result.

My point was that almost all of the design effort wasn't contained in the markdown. So clearly there were at least two major inputs to the documents. But of course you agree with that.

>Not particularly; I want to write in Markdown (or R Markdown) using interpolated variables and generate PDF documents.

To me the total separation only makes sense if you are designing for unknown content. If you control the input of content and formatting, then a closer linkage between both seems superior. Markdown is (intentionally) extremely limited, so everything that markdown can't do needs to be implemented in a general way on the formatting layer. Obviously that is more tedious if you have total separation.

What I meant by "web framework" is that they can't assume content, so need to deal with generality. Essentially what you are writing is a website generator, except with PDF being the end output. But generating general and reusable components doesn't seem to be how I would want to create a document.




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

Search: