From 80b50733a01c70058353815f6db7c621e7868a73 Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 12 Oct 2014 19:37:15 +0400 Subject: [PATCH 1/3] Fix latex build: make some unicode characters found in help work --- docs/source/conf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/source/conf.py b/docs/source/conf.py index ea3b7f54..0b2339f2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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 we’re building docs locally From 2e1df4461eb8650d8f9b5e6af0b3be72f35fccba Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 12 Oct 2014 19:37:58 +0400 Subject: [PATCH 2/3] Update Makefile: remove unused gh-pages target and add latexpdf & help --- docs/Makefile | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 3a9d3de8..cef2e832 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 ' where 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} From b307ad789144f3a2bdd546d5c08a666bf6037eff Mon Sep 17 00:00:00 2001 From: ZyX Date: Sun, 12 Oct 2014 19:33:09 +0400 Subject: [PATCH 3/3] Fix default value of SPHINXBUILD variable --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index cef2e832..54f10a49 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,6 +1,6 @@ # Makefile for Sphinx documentation SPHINXOPTS = -SPHINXBUILD = sphinx-build2 +SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build