Hacker News new | past | comments | ask | show | jobs | submit login
Convert a markdown manuscript to pdf/epub/mobi e-books (chrisanthropic.github.io)
118 points by accordionclown on June 4, 2017 | hide | past | favorite | 27 comments



Have you looked at Softcover?

https://github.com/softcover/softcover/

I've used this for runbooks and it's awesome -- you always have an up-to-date copy of the runbook on your phone, and if you're using google/apple device management, you can remove them once your employee has left.


Also, there's asciidoc[1] which is implements the Open Docbook[3] schema. Along with it is the Ruby ecosystem for asciidoctor[2] which is:

  * A mature[1], plain-text writing format for authoring notes, articles, documentation, books, ebooks, web pages, slide decks, blog posts, man pages and more.

  * A text processor and toolchain for translating AsciiDoc documents into various formats (called backends), including HTML, DocBook, PDF and ePub.
Along with a healthy ecosystem of scripts to convert between basically all the formats, from troff/tex for the academics, org-mode for the emacs nerds, to Markdown for the bloggers. All basically interoperate with

I have a fairly extensive list of typesetting frameworks and document publishing management systems (along the lines of Adobe FrameMaker), but I'm running out the door

[1] http://asciidoc.org [2] http://asciidoctor.org/docs/what-is-asciidoc/ [3] http://docbook.org/whatis


+1 for asciidoc... currently writing my master's thesis in asciidoc and it has all the nice things you need in for a highly-structured document, but in a plain-text format.

Asciidoc has a lot of nice things like footnotes, bibliographies, including remote asciidoc files and highly-customisable table of contents features that Markdown simply doesn't have.

Check-out the Pro Git book on GitHub written in AsciiDoc, it's a great example [0].

Also, slightly off-topic, but writing long-form documents in plain-text is awesome. Ditch MS Word/LO Writer for your favourite text editor, use Git branches to try out different ideas or drafts... it's bliss.

[0] https://github.com/progit/progit2


Q: what do you do for helpers like spell check?


I mostly bounce between VS Code and Atom, both have spell check packages (e.g [0]).

For the "Review" functions, Git can be used in an imho more powerful way.

Other than that, I'm not sure what other helpers you might be missing :)

[0] https://marketplace.visualstudio.com/items?itemName=ban.spel...


If you use Asciidoc you may want to look at Dockbooker -https://github.com/l3nz/dockbooker - it is a single Docker image that contains all the toolchain including image processing (you need images with different sizes/densities for e.g. PDF vs chunked HTML) and preprocesses Graphviz images.


I wrote a book using asciidoc and really didn't like it


Interesting. Why did you choose it and why didn't you like it?


Publisher's platform relied on asciidoc so I didn't really have much of a choice :-)

The simple things were easy enough to get to grips with but some of the more 'complex' stuff was a pain, and the markup got in the way of the writing for me.

(I'm slightly dyslexic so I don't know if the markup was actually making the text harder for me to read)


Where it really shines is for writing documentation, too bad there is no tool like Sphinx that could enable the search functionality.


Thanks for sharing, I'd somehow never heard of softcover before - it looks really nice! (Not the OP, but Open-Publisher is my project).


Can you use the resulting Ebook for whatever you want or is it only for publishing to their platform?


Thanks for sharing. My humble feedback would be that the website and README would be much more helpful however if they showed pictures of sample output. That's the main thing we want to see :-)


The repo _does_ include a sample book, but you're right, some screenshots would be nice. I actually created the tool to handle all of my wife's books but I avoided linking to them from the project because I don't want it to look like a promotional tool/grab. But if anyone is interested in seeing books "in the wild" that have been created with this tool I'm happy to send you links.


Your example repo appears to contain some weird characters for me:

https://puu.sh/waX9G/3d54abf030.png

https://puu.sh/waXy2/7106b4768d.png

This is on Chrome Stable, Windows. Looking in the Github rendered.


That's to do with Github not displaying PDFs very well, but if you download it you can view it fine. Also, that PDF is the Adobe Pre-Flight verification of the 5x8 template.

The sample book can be created by cloning the repo and running the container. (http://chrisanthropic.github.io/Open-Publisher-Documentation...)

If you want to see examples, I formatted everything here: https://www.amazon.com/Tristan-J.-Tarwater/e/B004WS3P3A/


Ah, excellent! Indeed it did work.

I wonder what causes Github to mess up on just the verification messages, probably something to do with the character set.


I was literally looking for something like this the other day now that LeanPub is no longer free to get started. Thanks for releasing it.


I had no idea Leanpub changed their pricing. I haven't earned $100 from any of my books on there (and roughly half have all proceeds going to the EFF) so I'm going to be checking this out as well.


For the sake of it, I have created something slightly similar in the past which is currently rewritten in my spare time. It is not finished yet, but I can show you an example. Of course, I have the code for it online.

Example: https://gist.github.com/W4RH4WK/d6e9861a7793bfce6d1a0c26a1ba...

Project: https://github.com/W4RH4WK/Dogx

I am using Pandoc, KaTeX, Prims.js, and Reveal.js (for presentations). Additional logic is realized using Pandoc's filter mechanic and a Python scripts which converts TeX to SVG. The main intention is to output a standalone HTML, which can then be converted to a PDF using the awesome wkhtmltopdf.

This has 2 underlying reasons: First, I want to push the behavior of consuming content on your screen, with modern, interactive technologies instead of killing trees by printing them out. Secondly, I hate TeX / LaTeX, but I cannot deny the need for its Math environment and TikZ.


I use just pandoc for previewing a large markdown manuscript and getting formatting right is hard.

Thanks for releasing this.


Usability suggestion for the web site: please add prev/next links to the end of the pages. I have to scroll back to the top on my phone, open the menu and select the next section. At every page.


Pandoc alone gives good results for a large use-case.

I frequently want portable versions of a document, or better formatting than, say, fixed-length ASCII. Often of historical works.

Examples: https://ello.co/dredmorbius/post/lhw2eq4qmnnwxijlcrfyba


typo, fyi:

> if you want to isntall everything locally

http://chrisanthropic.github.io/Open-Publisher-Documentation...


Does this support LaTeX style equations? I'd like to use Markdown+Mathjax for web, and still be able to export to PDF/ePub/mobi.


Does it support syntax highlighting for code snippets?


Unlike most LaTeX templates I've seen this project was written with a focus on fiction so I didn't touch anything around code blocks.

I'd love to add some more templates and a structure to make them easy to switch between eventually though.




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

Search: