ExDoc -- how to print more than 1 page? or alternatively how to combine into master file

82 views
Skip to first unread message

Bibek Pandey

unread,
Mar 10, 2016, 9:11:06 PM3/10/16
to elixir-lang-talk, Voicemail
Admittedly this isn't a pure Elixir question.  But I figure I'd post it to the list in case someone can point me in the right direction.

I have an elixir project with about 35 ExDoc produced html files.

I would like to print these into a single PDF file so I can do proofreading easier.  I've noticed I'm only able to print a page at a time in whatever browser - Chrome, FIrefox. 

Any suggestions on easily being able to collate these html files into a single master file that I can print -- e.g. PDF

Don't know if ExDoc has an option to create PDFs..

Doing a cat *.html > master.html works fine, but the browser will show only the first file...

Cheers, Bibek

Martin Svalin

unread,
Mar 11, 2016, 10:33:20 AM3/11/16
to elixir-lang-talk, Voicemail
Maybe the epub branch works well enough to be usable?
https://github.com/elixir-lang/ex_doc/tree/epub

- Martin


--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-talk/CAF5zmfyHz3JGkMJgYK130Dr7qLN22imFVjv2epswX1cMjJEgLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Onorio Catenacci

unread,
Mar 11, 2016, 10:53:17 AM3/11/16
to Elixir Lang Talk
If the epub branch isn't ready you could also check out the tools that this article links:


--
Onorio



For more options, visit https://groups.google.com/d/optout.

Milton Mazzarri

unread,
Mar 11, 2016, 11:19:13 AM3/11/16
to elixir-l...@googlegroups.com
On Fri, Mar 11, 2016 at 9:33 AM Martin Svalin <martin...@gmail.com> wrote:
Maybe the epub branch works well enough to be usable?
https://github.com/elixir-lang/ex_doc/tree/epub


Hello, right now with the `epub` branch you can generate the EPUB document, the last time I tested this feature the document displayed correctly in iBooks, Calibre and Aldiko. Certainly, I need to work a lot to _improve the styles_ and other issues mentioned in the pull request.

If you find an error, please, leave a comment here: https://github.com/elixir-lang/ex_doc/pull/319

I'll try to spend some spare cycles on this feature this weekend!

HTH

--
Milton Mazzarri

Bernd Meyer

unread,
Mar 11, 2016, 11:38:41 AM3/11/16
to elixir-l...@googlegroups.com

Have you tried pandoc? Generating PDF might be a little involved, but you easily convert any Html to docx, markdown etc and take it from there.

Bernd

--
You received this message because you are subscribed to the Google Groups "elixir-lang-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-ta...@googlegroups.com.

Bibek Pandey

unread,
Mar 11, 2016, 5:22:51 PM3/11/16
to elixir-lang-talk, Voicemail, be...@berndmeyer.com
Thanks Bernd and everyone else for all the tips, I greatly appreciated it.

I ended up going with pandoc.  Simply because pandoc is supported out of the box.

+1 for the haskell folks for writing it.  +1 for the elixir-core folks for embracing it.

I got the pdf option to work with pandoc after installing all the required texlive libraries on my xubuntu setup

I found the lualatex engine produced about the same pdf files as the others but had the smallest size

pandoc test.html -o test.latex
pandoc test.latex --latex-engine=lualatex -o test.pdf

While the pdf file doesn't look perfect, it will do :) It managed to preserve text that I've backticked and also shows module functions w/ arity in blue.

The epub3 option worked pretty okay too -- as it maintainained some links.

I've attached a small pdf file so you can see the output.

Oh and since I'm +1'ing..   +1 for Donald Knuth for being Donald Knuth.

Cheers


test.pdf
Reply all
Reply to author
Forward
0 new messages