ansible-userguide-pdf icon indicating copy to clipboard operation
ansible-userguide-pdf copied to clipboard

Fix modules and TOC in generated PDF

Open bgazzera opened this issue 10 years ago • 4 comments

I kept digging and it seems that to generate the full documentation, including all the modules, and a working TOC you have to execute a couple of Makefiles.

In ansible/docsite, I edited the build-site.py just as you did, replacing the buildername from html to "latex" Then I run make docs that in turn runs ansible/hacking/module_formatter.py that as far as I see adds a footer to every module section and not much. Then cd htmlout and make

And I got a nice formatted TOC.

Inside the Makefile I see that LaTex is run several times, as you suggested.

    %.pdf: %.tex
        $(PDFLATEX) $(LATEXOPTS) '$<'
        $(PDFLATEX) $(LATEXOPTS) '$<'
        $(PDFLATEX) $(LATEXOPTS) '$<'
        -$(MAKEINDEX) -s python.ist '$(basename $<).idx'
        $(PDFLATEX) $(LATEXOPTS) '$<'
        $(PDFLATEX) $(LATEXOPTS) '$<'

So instead of running pdflatex --interaction=nonstopmode ansible.tex maybe a better option is to direct people to just run make. But of course, it's your call. And again if you feel that the suggestion helps, I'll PR it to you.

bgazzera avatar Feb 13 '15 22:02 bgazzera

Anything that improves the project is appreciated. Feel free to create a PR, thanks.

bonndan avatar Feb 13 '15 22:02 bonndan

I can't seem to get the TOC anymore, though I did manage to get it working back in March time-frame. I prefer to build it without the modules, but I sure did like that TOC

Any ideas?

xenithorb avatar Sep 09 '16 00:09 xenithorb

It's quite some time now since I've been using LaTeX. I remember that sometimes the toc appeared after a second run. I'm afraid I'm not of much help here.

bonndan avatar Sep 09 '16 07:09 bonndan

@bgazzera Can you create a PR for the TOC? We would love it with TOC.

fossilet avatar Jun 30 '17 02:06 fossilet