Documenter.jl: Export to other formats

Created on 14 Dec 2018  路  2Comments  路  Source: JuliaDocs/Documenter.jl

It would be useful for Documenter to export to forgets other than HTML. Is this currently possible? If not, is there any quick workaround, for example to an intermediate form and then pandoc?

The particular year case I see is to make it easy to build an epub of the Julia documentation. I prefer this for anything that doesn't jump around too much, and I suspect it could be if interest to other users as well.

Question

Most helpful comment

Thanks @mortenpi. I was able to hack this together like so:

  1. Export Markdown, as you suggest. This required setting strict=false in the makedocs function
  2. Build a separate text file containing the filenames from PAGES (no no other structural information from that value)
  3. cat pages | xargs pandoc -o julia.epub

The result was viewable in Calibre, but I had to tweak things a bit (convert to .kepub) before it would load on my Kobo. I have no idea why that would be, and suspect I just messed up part of the sequence the first time through.

All 2 comments

Documenter can also export Markdown and LaTeX (which gets compiled to PDF right away). See also _Other Output Formats_ in the manual. The Markdown output can perhaps be used with pandoc.

To properly support e.g. EPUB (see also #371), a separate Writer plugin could be created as a package. Although, Documenter's internal representation of the document is not that plugin-friendly at the moment.

Thanks @mortenpi. I was able to hack this together like so:

  1. Export Markdown, as you suggest. This required setting strict=false in the makedocs function
  2. Build a separate text file containing the filenames from PAGES (no no other structural information from that value)
  3. cat pages | xargs pandoc -o julia.epub

The result was viewable in Calibre, but I had to tweak things a bit (convert to .kepub) before it would load on my Kobo. I have no idea why that would be, and suspect I just messed up part of the sequence the first time through.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Datseris picture Datseris  路  4Comments

denizyuret picture denizyuret  路  6Comments

carlobaldassi picture carlobaldassi  路  5Comments

SimonEnsemble picture SimonEnsemble  路  3Comments

dkarrasch picture dkarrasch  路  5Comments