Question

Is there a tool that generates both PDF and CHM documentation from Markdown (or similar, such as RST) on Windows.

We are currently using Sphinx, but have been unable to get the PDF generation working on Windows (this guy has the same issue). It's a pain to have to generate the CHM on Windows and the PDF version on Linux (and I do need to generate both versions).

Is there an alternative tool (free or inexpensive commercial) that could do this task?

The source format must be in a plain-text-like format for version control, of which Markdown and RST are examples.

Was it helpful?

Solution 2

I was able to fulfil this need using Sphinx after all. I used MiKTeX to generate the PDF on Windows.

Install MiKTeX (< 200mb)

wget -nv -N http://mirrors.ctan.org/systems/win32/miktex/setup/miktex-portable-2.9.4757.exe
7z.exe x -y miktex-portable-2.9.4757.exe -o"miktex"

Add the bin directory to your path

SET Path=%Path%;%CD%\miktex\miktex\bin

Run Sphinx's "make.bat" to generate the .tex file.

SET SPHINXOPTS=-W -E
make.bat latex

Invoke MiKTeX's pdflatex:

cd build/latex
pdflatex.exe YOUR_PROJECT_NAME.tex

The resultant PDF will be in your build/latex directory

OTHER TIPS

The Free Pascal distribution holds a CHM compiler called chmcmd. Some people with documentation tools report success with it (like the Preshrunk-cotton python package)

Some Linux distros also pack the chm compiler independently from the main FPC distribution. (since it only is a 700k binary without dependencies).

On Windows you can use the same (the windows version of chmcmd), or Microsoft Help Workshop, the default CHM generator from MS.

That's the CHM compiler part, now the input:

A CHM project before compilation is basically just html with a couple of XML indexes (TOC and master keyword based index) and a project file that is an INI file.

Usually the HTML generator backend of a documentation tool is tweaked to generate it as a special case. From what I read in your "this guy" link, sphinx can do that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top