Add support for Sphinx+PDF+MathJax
This commit is contained in:
1
doc/.gitignore
vendored
1
doc/.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
/latex
|
||||||
/html
|
/html
|
||||||
/spelling
|
/spelling
|
||||||
/LAMMPS.epub
|
/LAMMPS.epub
|
||||||
|
|||||||
38
doc/Makefile
38
doc/Makefile
@ -56,7 +56,7 @@ clean-all: clean
|
|||||||
rm -rf $(BUILDDIR)/* utils/txt2html/txt2html.exe
|
rm -rf $(BUILDDIR)/* utils/txt2html/txt2html.exe
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(RSTDIR) html old epub
|
rm -rf $(RSTDIR) html old epub latex
|
||||||
rm -rf spelling
|
rm -rf spelling
|
||||||
|
|
||||||
clean-spelling:
|
clean-spelling:
|
||||||
@ -115,21 +115,39 @@ mobi: epub
|
|||||||
@ebook-convert LAMMPS.epub LAMMPS.mobi
|
@ebook-convert LAMMPS.epub LAMMPS.mobi
|
||||||
@echo "Conversion finished. The MOBI manual file is created."
|
@echo "Conversion finished. The MOBI manual file is created."
|
||||||
|
|
||||||
pdf: utils/txt2html/txt2html.exe
|
pdf: $(OBJECTS) $(ANCHORCHECK)
|
||||||
|
@(\
|
||||||
|
. $(VENV)/bin/activate ;\
|
||||||
|
cp -r src/* $(RSTDIR)/ ;\
|
||||||
|
sphinx-build $(SPHINXEXTRA) -b latex -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) latex ;\
|
||||||
|
echo "############################################" ;\
|
||||||
|
doc_anchor_check src/*.txt ;\
|
||||||
|
echo "############################################" ;\
|
||||||
|
deactivate ;\
|
||||||
|
)
|
||||||
|
@cd latex && \
|
||||||
|
sed -i '' 's/\\begin{equation}//g' LAMMPS.tex && \
|
||||||
|
sed -i '' 's/\\end{equation}//g' LAMMPS.tex && \
|
||||||
|
make && \
|
||||||
|
mv LAMMPS.pdf ../Manual.pdf && \
|
||||||
|
cd ../;
|
||||||
@(\
|
@(\
|
||||||
set -e; \
|
|
||||||
cd src/Developer; \
|
cd src/Developer; \
|
||||||
pdflatex developer; \
|
pdflatex developer; \
|
||||||
pdflatex developer; \
|
pdflatex developer; \
|
||||||
mv developer.pdf ../../Developer.pdf; \
|
mv developer.pdf ../../Developer.pdf; \
|
||||||
cd ..; \
|
cd ../../; \
|
||||||
../utils/txt2html/txt2html.exe -b *.txt; \
|
|
||||||
htmldoc --batch lammps.book; \
|
|
||||||
for s in `echo *.txt | sed -e 's/ \(pairs\|bonds\|angles\|dihedrals\|impropers\|commands_list\|fixes\|computes\).txt/ /g' | sed -e 's,\.txt,\.html,g'` ; \
|
|
||||||
do grep -q ^$$s lammps.book || \
|
|
||||||
echo WARNING: doc file $$s missing in src/lammps.book; done; \
|
|
||||||
rm *.html; \
|
|
||||||
)
|
)
|
||||||
|
@rm -rf latex/_sources
|
||||||
|
@rm -rf latex/PDF
|
||||||
|
@rm -rf latex/USER
|
||||||
|
@cp -r src/PDF latex/PDF
|
||||||
|
@cp -r src/USER latex/USER
|
||||||
|
@rm -rf latex/PDF/.[sg]*
|
||||||
|
@rm -rf latex/USER/.[sg]*
|
||||||
|
@rm -rf latex/USER/*/.[sg]*
|
||||||
|
@rm -rf latex/USER/*/*.[sg]*
|
||||||
|
@echo "Build finished. Manual.pdf and Developer.pdf are in this directory."
|
||||||
|
|
||||||
old: utils/txt2html/txt2html.exe
|
old: utils/txt2html/txt2html.exe
|
||||||
@rm -rf old
|
@rm -rf old
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 38 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 37 KiB |
@ -211,7 +211,9 @@ latex_elements = {
|
|||||||
#'pointsize': '10pt',
|
#'pointsize': '10pt',
|
||||||
|
|
||||||
# Additional stuff for the LaTeX preamble.
|
# Additional stuff for the LaTeX preamble.
|
||||||
#'preamble': '',
|
'preamble': r'''
|
||||||
|
\setcounter{tocdepth}{2}
|
||||||
|
'''
|
||||||
}
|
}
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
@ -229,7 +231,7 @@ latex_documents = [
|
|||||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||||
# not chapters.
|
# not chapters.
|
||||||
#latex_use_parts = False
|
#latex_use_parts = False
|
||||||
|
latex_toplevel_sectioning = 'part'
|
||||||
# If true, show page references after internal links.
|
# If true, show page references after internal links.
|
||||||
#latex_show_pagerefs = False
|
#latex_show_pagerefs = False
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user