bonndan / ansible-userguide-pdf Goto Github PK
View Code? Open in Web Editor NEWThe Ansible.com documentation as PDF via Sphinx and LaTeX
The Ansible.com documentation as PDF via Sphinx and LaTeX
Hi there!
First of all very many thanks for putting this generator together. I find it essential for anyone learning Ansible, as browsing through the docs site is a pain.
I couple of minor corrections / additions to the README.
First there is a typo, where:
python build_site.py ../ansible/docsite/rst/
should be:
python build-site.py ../ansible/docsite/rst/
Also when I first tried to build, pdflatex complained
! LaTeX Error: File 'cmap.sty' not found.
after some research I found that I was missing the texlive-latex-recommended package.
If you don't mind, I can make this corrections and send a PR your way.
Thanks again
strange.
When I was trying to run python build-site.py ../ansible/docsite/rst/
, I got the following error:
Traceback (most recent call last):
File "build-site.py", line 25, in <module>
from sphinx.application import Sphinx
File "/usr/local/lib/python2.7/site-packages/sphinx/application.py", line 26, in <module>
from docutils.parsers.rst import convert_directive_function, \
File "/usr/local/lib/python2.7/site-packages/docutils/parsers/rst/__init__.py", line 74, in <module>
import docutils.statemachine
File "/usr/local/lib/python2.7/site-packages/docutils/statemachine.py", line 113, in <module>
from docutils import utils
File "/usr/local/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
import docutils.io
File "/usr/local/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>
from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
File "/usr/local/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 543, in getdefaultlocale
return _parse_localename(localename)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 475, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
@bgazzera Can you see in which environment the overfull lines appear? Is it "verbatim"?
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.
ansible_userguide.pdf is outdated back to 1.5.1
, current version is 2.4.1
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.