forked from pymc-devs/pymc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
builddocs
executable file
·56 lines (45 loc) · 2.6 KB
/
builddocs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash
# To run the following correctly, you will need a patched version of docutils to enable support for
# math directives.
# There is a dummy module in docs named distributions.py that imports all the PyMC likelihoods.
# By introspection, epydoc finds the related docstrings and creates a tex output. This way,
# we avoid documenting all the stuff that lives in the real pymc.distributions.py
# epydoc --verbose --debug --config epydoc.conf
# Make manual
cd docs
#cat distributions-module.tex | ./extract.py -s '\\subsection\{Functions\}' -o distributions-module.text
#sed -i -e 's/0\.5\\fboxrule/1pt/g' distributions-module.tex
python rst2latex.py ../README.rst --use-latex-toc --no-section-numbering | ./extract.py -s '%___________________________________________________________________________' -e '\\end\{document\}' -o README.tex
python rst2latex.py ../INSTALL.rst --use-latex-toc --no-section-numbering | ./extract.py -s '%___________________________________________________________________________' -e '\\end\{document\}' -o INSTALL.tex
python rst2latex.py ../pymc/database/README.txt --use-latex-toc --no-section-numbering | ./extract.py -s '%___________________________________________________________________________' -e '\\end\{document\}' -o database.tex
mkdir pdf
# User Guide
pdflatex -output-directory=pdf -interaction batchmode UserGuide
bibtex pdf/UserGuide
pdflatex -output-directory=pdf -interaction batchmode UserGuide
pdflatex -output-directory=pdf -interaction batchmode UserGuide
cp pdf/UserGuide.pdf .
# JSS
# Some special formatting in the JSS manual.
# cp pymc.bib jss/
python manual2article.py README.tex > jss/README.tex
python manual2article.py INSTALL.tex > jss/INSTALL.tex
python manual2article.py tutorial.tex > jss/tutorial.tex
python manual2article.py modelbuilding.tex > jss/modelbuilding.tex
python manual2article.py modelchecking.tex > jss/modelchecking.tex
python manual2article.py modelfitting.tex > jss/modelfitting.tex
python manual2article.py extending.tex > jss/extending.tex
python manual2article.py database.tex > jss/database.tex
python manual2article.py conclusion.tex > jss/conclusion.tex
python manual2article.py theory.tex > jss/theory.tex
python manual2article.py distributions-module.tex > jss/distributions-module.tex
# Merge all tex files
cd jss
python mergetex.py jss_article.tex
mkdir pdf
pdflatex -output-directory=pdf -interaction batchmode jss_article_merged
bibtex pdf/jss_article_merged
pdflatex -output-directory=pdf -interaction batchmode jss_article_merged
pdflatex -output-directory=pdf -interaction batchmode jss_article_merged
cp pdf/jss_article_merged.pdf .
cd ../../