HACKER Q&A
📣 s1k3s

Best format for publishing your works in 2022?


Hi, I'm currently getting ready to create a set of practical tutorials, guides etc for different topics that I'll eventually try to sell. I've gathered all my info and I'm now ready to actually start creating the piece itself. I'm wondering what would be the best format for me to publish these works and these are my options:

- video

- HTML

- PDF

(feel free to suggest anything else please, if you think there are better ones)

The problem is I can't make my mind on which one to use. Things that I consider are:

- potential reach (i.e. some people absolutely hate reading)

- cross-device usability (video would be great for mobile, but people might want to read more on the PC or their e-reader)

- anti piracy: I don't want people to simply download a PDF and then upload it to a torrenting website because I lose all my work

I've never done this before so I'm really stuck at this step. Can someone share some advice on how to go forward with this?


  👤 Archelaos Accepted Answer ✓
When it comes to text, I would recommend using a simple XML format as the single source of truth and generating other formats from that. My own publishing pipline is:

a) XML directly to HTML via Saxon XSLT.

b) XML to LaTeX via Saxon XSLT. Then LaTeX to PDF via pdflatex/lualatex.

I have an input folder and two output folders (for HTML and PDF). I use a batch file that runs all files placed in the input folder through the pipeline. If I want to change the Layout a bit, I modify the the XSLT and re-run the batch file with all the old XML sources.

That has been working like magic for more than a decade, with very little changes after the initial effort of defining the XML format and writing the XSLT scripts.


👤 schwartzworld
Can't get much better for cross device than html. Pdfs are useless on most devices, especially kindles and phones, since text doesn't reflow when you zoom.

As to anti-piracy, I don't know what to tell you. The hardest format to pirate would be a physical book. Ebooks, pdfs and videos are all easy enough to redistribute without really good drm.


👤 joshxyz
have you seen beej networking guide and his other books, i like that format but it may differ from ur preferences because his work is accessible online for free