[Python-modules-commits] r24349 - in packages/python-docutils/trunk/debian (3 files)
jwilk at users.alioth.debian.org
jwilk at users.alioth.debian.org
Mon May 13 15:34:48 UTC 2013
Date: Monday, May 13, 2013 @ 15:34:45
Author: jwilk
Revision: 24349
Change default math output format to HTML.
Added:
packages/python-docutils/trunk/debian/patches/math-output-html.diff
Modified:
packages/python-docutils/trunk/debian/changelog
packages/python-docutils/trunk/debian/patches/series
Modified: packages/python-docutils/trunk/debian/changelog
===================================================================
--- packages/python-docutils/trunk/debian/changelog 2013-05-13 07:13:09 UTC (rev 24348)
+++ packages/python-docutils/trunk/debian/changelog 2013-05-13 15:34:45 UTC (rev 24349)
@@ -6,8 +6,11 @@
[ Jakub Wilk ]
* Update bug URLs in patch headers.
* Use canonical URIs for Vcs-* fields.
+ * Add patch (math-output-html.diff) to change default math output format to
+ HTML (closes: #677929). This is divergence from upstream behavior, but
+ it is planned that upstream Docutils 0.11 will switch to HTML, too.
- -- Jakub Wilk <jwilk at debian.org> Sun, 05 May 2013 16:02:29 +0200
+ -- Jakub Wilk <jwilk at debian.org> Mon, 13 May 2013 17:31:42 +0200
python-docutils (0.10-1) experimental; urgency=low
Added: packages/python-docutils/trunk/debian/patches/math-output-html.diff
===================================================================
--- packages/python-docutils/trunk/debian/patches/math-output-html.diff (rev 0)
+++ packages/python-docutils/trunk/debian/patches/math-output-html.diff 2013-05-13 15:34:45 UTC (rev 24349)
@@ -0,0 +1,95 @@
+Description: change default math output format to HTML
+Author: Jakub Wilk <jwilk at debian.org>
+Bug-Debian: http://bugs.debian.org/677929
+
+--- a/docs/user/config.txt
++++ b/docs/user/config.txt
+@@ -814,6 +814,14 @@
+ The format of mathematical content (`math directive`_ and role) in
+ the output document. Supported values are (case insensitive):
+
++ :HTML:
++ Format math in standard HTML enhanced by CSS rules
++
++ Requires the ``math.css`` stylesheet (stored in the same
++ installation-dependent directory as the `default stylesheet`__).
++
++ .. __: `stylesheet_path [html4css1 writer]`_
++
+ :MathJax:
+ Format math for display with MathJax_, a JavaScript-based math
+ rendering engine that uses HTML/CSS, JavaScript, and unicode
+@@ -840,14 +848,6 @@
+
+ Downloads JavaScript code from a third-party site.
+
+- :HTML:
+- Format math in standard HTML enhanced by CSS rules
+-
+- Requires the ``math.css`` stylesheet (stored in the same
+- installation-dependent directory as the `default stylesheet`__).
+-
+- .. __: `stylesheet_path [html4css1 writer]`_
+-
+ :MathML:
+ Embed math content as presentational MathML_.
+
+@@ -870,7 +870,7 @@
+
+ The failsave fallback.
+
+- Default: MathJax Option: ``--math-output``.
++ Default: HTML Option: ``--math-output``.
+
+ New in Docutils 0.8.
+
+--- a/docutils/writers/html4css1/__init__.py
++++ b/docutils/writers/html4css1/__init__.py
+@@ -135,9 +135,9 @@
+ ['--table-style'],
+ {'default': ''}),
+ ('Math output format, one of "MathML", "HTML", "MathJax" '
+- 'or "LaTeX". Default: "MathJax"',
++ 'or "LaTeX". Default: "HTML"',
+ ['--math-output'],
+- {'default': 'MathJax'}),
++ {'default': 'HTML'}),
+ ('Omit the XML declaration. Use with caution.',
+ ['--no-xml-declaration'],
+ {'dest': 'xml_declaration', 'default': 1, 'action': 'store_false',
+--- a/test/functional/expected/standalone_rst_html4css1.html
++++ b/test/functional/expected/standalone_rst_html4css1.html
+@@ -12,7 +12,6 @@
+ <meta name="copyright" content="This document has been placed in the public domain. You may do with it as you wish. You may copy, modify, redistribute, reattribute, sell, buy, rent, lease, destroy, or improve it, quote it at length, excerpt, incorporate, collate, fold, staple, or mutilate it, or do anything else to it that your or anyone else's heart desires." />
+ <meta content="reStructuredText, test, parser" name="keywords" />
+ <meta content="A test document, containing at least one example of each reStructuredText construct." lang="en" name="description" />
+-<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+ <link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
+ </head>
+ <body>
+@@ -862,7 +861,7 @@
+ or as base for special code roles, e.g. the LaTeX code in the next
+ paragraph.</p>
+ <p>Docutils uses LaTeX syntax for math directives and roles:
+-<code class="tex">\alpha = f(x)</code> prints <span class="math">\(\alpha = f(x)\)</span>
++<code class="tex">\alpha = f(x)</code> prints <span class="formula"><i>α</i>â
=â
<i>f</i>(<i>x</i>)</span>
+ .</p>
+ <p>The <tt class="docutils literal">:code:</tt> option of the <cite>include</cite> directive sets the included content
+ as a code block, here the rst file <tt class="docutils literal">header_footer.txt</tt> with line numbers:</p>
+--- a/test/test_writers/test_html4css1_misc.py
++++ b/test/test_writers/test_html4css1_misc.py
+@@ -44,11 +44,11 @@
+ data = ':math:`42`'
+
+ def test_math_output_default(self):
+- # Currently MathJax with default URL. Likely to change to HTML!
++ # HTML
+ mysettings = self.settings_overrides
+ head = core.publish_parts(self.data, writer_name='html4css1',
+- settings_overrides=mysettings)['head']
+- self.assertIn(self.mathjax_script % self.default_mathjax_url, head)
++ settings_overrides=mysettings)['head']
++ self.assertNotIn('MathJax.js', head)
+
+ def test_math_output_mathjax(self):
+ # Explicitly specifying math_output=MathJax, case insensitively
Modified: packages/python-docutils/trunk/debian/patches/series
===================================================================
--- packages/python-docutils/trunk/debian/patches/series 2013-05-13 07:13:09 UTC (rev 24348)
+++ packages/python-docutils/trunk/debian/patches/series 2013-05-13 15:34:45 UTC (rev 24349)
@@ -1,3 +1,4 @@
+math-output-html.diff
fix-buildhtml-progress.diff
iepngfix-license.diff
doc-debian-paths.diff
More information about the Python-modules-commits
mailing list