[PATCH] docs: use sphinx 0.5, enable math equations

1 view
Skip to first unread message

Ondrej Certik

unread,
Nov 26, 2008, 2:14:01 PM11/26/08
to sympy-...@googlegroups.com, Ondrej Certik
---
doc/Makefile | 2 +-
doc/src/conf.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/Makefile b/doc/Makefile
index d1978b0..ec8d803 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -4,7 +4,7 @@ RST2HTML = rst2html

# You can set these variables from the command line.
SPHINXOPTS =
-SPHINXVER = 0.4.3
+SPHINXVER = 0.5
SPHINXBUILDpy = sphinx/Sphinx-$(SPHINXVER)/sphinx-build.py
SPHINXBUILD = PYTHONPATH=.. python $(SPHINXBUILDpy)
PAPER =
diff --git a/doc/src/conf.py b/doc/src/conf.py
index 4781680..89f4ba9 100644
--- a/doc/src/conf.py
+++ b/doc/src/conf.py
@@ -21,7 +21,7 @@

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.addons.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.pngmath']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['.templates']
--
1.6.0.4.1060.g9433b

Alan Bromborsky

unread,
Nov 26, 2008, 3:26:04 PM11/26/08
to sympy-...@googlegroups.com
OK I downloaded sphinx 0.5. Modified extensions in conf.py and when I run
make html I get:

mkdir -p .build/html .build/doctrees
sphinx-build -b html -d .build/doctrees . .build/html
Exception occurred:
File "/usr/lib/python2.5/site-packages/sphinx/application.py", line
122, in setup_extension
raise ExtensionError('Could not import extension %s' % extension, err)
ExtensionError: Could not import extension sphinx.ext.pngmath
(exception: No module named pngmath)
The full traceback has been saved in /tmp/sphinx-err-a5G4vG.log, if you
want to report the issue to the author.
Please also report this if it was a user error, so that a better error
message can be provided next time.
Send reports to sphin...@googlegroups.com. Thanks!
make: *** [html] Error 1

How do I install pngmath?

Alan Bromborsky

unread,
Nov 26, 2008, 3:38:15 PM11/26/08
to sympy-...@googlegroups.com
It now works. I missed a step in install sphinx 0.5.

Alan Bromborsky

unread,
Nov 26, 2008, 4:48:50 PM11/26/08
to sympy-...@googlegroups.com
sphinx with math now works for me. Attached is conf.py with example of
pngmath_latex_preamble option. To my surprise a string with the actual
LaTeX
commands was required rather than the filename of a file containing the
commands. Of course since conf.py is a python executable one could
modify it
to work the other way!
conf.py
Reply all
Reply to author
Forward
0 new messages