From b92516ad797e3fc3a6ab3e8a8251b0141de784e7 Mon Sep 17 00:00:00 2001 From: milde Date: Fri, 25 Nov 2011 07:07:10 +0000 Subject: [PATCH] Change HTML math-output default to MathJax Makes `standalone_rst_html4css1.html` a valid document again. git-svn-id: https://docutils.svn.sourceforge.net/svnroot/docutils/trunk/docutils@7227 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docs/user/config.txt | 8 +++++--- docutils/writers/html4css1/__init__.py | 4 ++-- test/functional/expected/standalone_rst_html4css1.html | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/user/config.txt b/docs/user/config.txt index e8167d21d..b65c61eb6 100644 --- a/docs/user/config.txt +++ b/docs/user/config.txt @@ -89,8 +89,8 @@ underscores. For on/off switch settings (booleans), the following values are recognized: -* On: "true", "yes", "on", "1" -* Off: "false", "no", "off", "0", "" (no value) +:On: "true", "yes", "on", "1" +:Off: "false", "no", "off", "0", "" (no value) List values are comma-delimited. Whitespace around list values is stripped. :: @@ -777,7 +777,7 @@ _`initial_header_level` _`math_output` The format of mathematical content (`math directive`_ and role) in - the output document. Supported values are: + the output document. Supported values are (case insensitive): :MathJax: Format math for display with MathJax_, a JavaScript-based math @@ -824,6 +824,8 @@ _`math_output` The failsave fallback. + Default: MathJax Option: ``--math-output``. + New in Docutils 0.8. .. _math directive: ../ref/rst/directives.html#math diff --git a/docutils/writers/html4css1/__init__.py b/docutils/writers/html4css1/__init__.py index 94a849df4..4daa74fbb 100644 --- a/docutils/writers/html4css1/__init__.py +++ b/docutils/writers/html4css1/__init__.py @@ -125,9 +125,9 @@ class Writer(writers.Writer): ['--table-style'], {'default': ''}), ('Math output format, one of "MathML", "HTML", "MathJax" ' - 'or "LaTeX". Default: "MathML"', + 'or "LaTeX". Default: "MathJax"', ['--math-output'], - {'default': 'MathML'}), + {'default': 'MathJax'}), ('Omit the XML declaration. Use with caution.', ['--no-xml-declaration'], {'dest': 'xml_declaration', 'default': 1, 'action': 'store_false', diff --git a/test/functional/expected/standalone_rst_html4css1.html b/test/functional/expected/standalone_rst_html4css1.html index 46dc78ca0..1ea2f43e9 100644 --- a/test/functional/expected/standalone_rst_html4css1.html +++ b/test/functional/expected/standalone_rst_html4css1.html @@ -2,7 +2,7 @@ - + reStructuredText Test Document @@ -12,6 +12,7 @@ + @@ -862,8 +863,9 @@ known) or as base for special code roles, e.g.,

Docutils uses LaTeX syntax for math directives and roles: -\alpha = f(x) prints -α=f(x).
+\alpha = f(x) prints +\(\alpha = f(x)\) +.

The :code: option of the include directive sets the included content as a code block, here the rst file header_footer.txt with line numbers:

-- 
2.11.4.GIT