Merge branch 'fix-latex-output' into develop

This commit is contained in:
ZyX 2014-10-12 19:38:26 +04:00
commit f293d6fff6
2 changed files with 24 additions and 15 deletions

View File

@ -1,6 +1,6 @@
# Makefile for Sphinx documentation
SPHINXOPTS =
SPHINXBUILD = sphinx-build2
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
@ -12,25 +12,23 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou
GH_PAGES_SOURCES = source Makefile
GH_SOURCE_BRANCH = develop
.PHONY: clean html gh-pages
.PHONY: html clean html latexpdf
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
clean:
-rm -rf $(BUILDDIR)/*
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
gh-pages:
git checkout gh-pages
find .. -maxdepth 1 ! -name '.git*' -and ! -name 'docs' -exec rm -rf {} \;
git checkout ${GH_SOURCE_BRANCH} ${GH_PAGES_SOURCES}
git reset HEAD
make html
mv -fv _build/html/* ..
rm -rf _build ${GH_PAGES_SOURCES}
git add ..
git commit -m "Create gh-pages for '`git log develop -1 --pretty=oneline --abbrev-commit`'"
git push origin gh-pages
git checkout ${GH_SOURCE_BRANCH}

View File

@ -16,10 +16,21 @@ version = 'beta'
release = 'beta'
exclude_patterns = ['_build']
pygments_style = 'sphinx'
html_theme = 'default'
html_static_path = ['_static']
html_show_copyright = False
latex_show_urls = 'footnote'
latex_elements = {
'preamble': '''
\\DeclareUnicodeCharacter{22EF}{$\\cdots$} % Dots
\\DeclareUnicodeCharacter{2665}{\\ding{170}} % Heart
\\DeclareUnicodeCharacter{2746}{\\ding{105}} % Snow
\\usepackage{pifont}
''',
}
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd: # only import and set the theme if were building docs locally