Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This tradeoff between the relative virtues of PDF and HTML is a good argument for looking at Pollen (pollenpub.com) a framework for designing your own markup language that is capable of targeting HTML and PDF (or any output you need: audio, Kindle, whatever).

A proof of concept is here: https://thelocalyarn.com/excursus/secretary/ On every page at that micro-site, you can view the Pollen markup source, or the PDF version. The PDF and the HTML are generated at the same time, from the same source.

Another example is my blog The Notepad (https://thenotepad.org/). Both sites have links to their source on Github.



I'm a big fan of asciidoc and quite sad that it didn't take of as a default format for documents.


I think what's sad about formats per se is that you rely on toolmakers to implement them, and to decide how to translate them into the target format; and for all toolmakers to support them in ways that are coherent with each other.

You also end up with this awkward two-step between the format and the tools. If some capability is missing, you wait for the format to define a way to do it, then the toolmakers to support it; or less ideally, the toolmakers define their own incompatible ways of doing it without waiting for consensus.

This covers the problems I have with Markdown. It as wide support, but because vanilla Markdown only covers a 1995-era subset of HTML, there are all kinds of things (footnotes, figures, formatted code blocks etc) that people want it to do. Any given editor or CMS or site generator will support 95% of your preferred flavor's way of doing things and disagree with your other tools about the last 5%.

The difference with Pollen is that it isn't a format or a markup specification; it's a programming environment. So you design the markup, and you tell it how to get from the source markup to your target format. The format is yours and the implementation is yours; they are one and the same.

It is a bit more work, true, but it's less work in Pollen than it would be in any other environment because it does parsing for you and applies your transformations in a logical, ordered way.


That sounds interesting. I will check it out.




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

Search: