|
From: <mi...@us...> - 2021-05-02 21:23:39
|
Revision: 8717
http://sourceforge.net/p/docutils/code/8717
Author: milde
Date: 2021-05-02 21:23:37 +0000 (Sun, 02 May 2021)
Log Message:
-----------
HTML math output fixes.
Fix bug #244 Wrong subscript/superscript order
with ``math-output=HTML``.
Don't use <tt> element (deprecated in HTML5).
Support commands ``\Bbbk`` and ``operatorname``.
Modified Paths:
--------------
trunk/docutils/HISTORY.txt
trunk/docutils/docutils/utils/math/math2html.py
trunk/docutils/docutils/writers/html5_polyglot/math.css
Modified: trunk/docutils/HISTORY.txt
===================================================================
--- trunk/docutils/HISTORY.txt 2021-04-29 09:55:58 UTC (rev 8716)
+++ trunk/docutils/HISTORY.txt 2021-05-02 21:23:37 UTC (rev 8717)
@@ -19,7 +19,14 @@
* docutils/writers/pseudoxml.py:
- Fix option "detailled" under Python 2.7.
+
+* docutils/tools/math/math2html, docutils/writers/html5_polyglot/math.css
+ - Fix bug #244 Wrong subscript/superscript order with
+ ``--math-output=HTML``.
+ - Don't use <tt> element (deprecated in HTML5).
+ - Support commands ``\Bbbk`` and ``operatorname``.
+
Release 0.17.1 (2021-04-16)
===========================
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2021-04-29 09:55:58 UTC (rev 8716)
+++ trunk/docutils/docutils/utils/math/math2html.py 2021-05-02 21:23:37 UTC (rev 8717)
@@ -385,8 +385,8 @@
u'\\&': u'&', u'\\,': u' ', u'\\:': u' ', u'\\;': u' ', u'\\AC': u'∿',
u'\\APLcomment': u'⍝', u'\\APLdownarrowbox': u'⍗', u'\\APLinput': u'⍞',
u'\\APLinv': u'⌹', u'\\APLleftarrowbox': u'⍇', u'\\APLlog': u'⍟',
- u'\\APLrightarrowbox': u'⍈', u'\\APLuparrowbox': u'⍐', u'\\Box': u'□',
- u'\\Bumpeq': u'≎', u'\\CIRCLE': u'●', u'\\Cap': u'⋒',
+ u'\\APLrightarrowbox': u'⍈', u'\\APLuparrowbox': u'⍐', u'\\Bbbk': u'𝕜',
+ u'\\Box': u'□', u'\\Bumpeq': u'≎', u'\\CIRCLE': u'●', u'\\Cap': u'⋒',
u'\\CapitalDifferentialD': u'ⅅ', u'\\CheckedBox': u'☑', u'\\Circle': u'○',
u'\\Coloneqq': u'⩴', u'\\ComplexI': u'ⅈ', u'\\ComplexJ': u'ⅉ',
u'\\Corresponds': u'≙', u'\\Cup': u'⋓', u'\\Delta': u'Δ', u'\\Diamond': u'◇',
@@ -587,6 +587,7 @@
u'align': [u'r', u'l',], u'eqnarray': [u'r', u'c', u'l',],
u'gathered': [u'l', u'l',],
}
+
fontfunctions = {
u'\\boldsymbol': u'b', u'\\mathbb': u'span class="blackboard"',
@@ -606,11 +607,13 @@
u'\\mathit': u'i', u'\\mathring{A}': u'Å', u'\\mathring{U}': u'Ů',
u'\\mathring{a}': u'å', u'\\mathring{u}': u'ů', u'\\mathring{w}': u'ẘ',
u'\\mathring{y}': u'ẙ', u'\\mathrm': u'span class="mathrm"',
- u'\\mathscr': u'span class="scriptfont"', u'\\mathscr{B}': u'ℬ',
- u'\\mathscr{E}': u'ℰ', u'\\mathscr{F}': u'ℱ', u'\\mathscr{H}': u'ℋ',
- u'\\mathscr{I}': u'ℐ', u'\\mathscr{L}': u'ℒ', u'\\mathscr{M}': u'ℳ',
- u'\\mathscr{R}': u'ℛ', u'\\mathsf': u'span class="mathsf"',
- u'\\mathtt': u'tt',
+ u'\\mathscr': u'span class="scriptfont"',
+ u'\\mathscr{B}': u'ℬ', u'\\mathscr{E}': u'ℰ', u'\\mathscr{F}':
+ u'ℱ', u'\\mathscr{H}': u'ℋ', u'\\mathscr{I}': u'ℐ',
+ u'\\mathscr{L}': u'ℒ', u'\\mathscr{M}': u'ℳ', u'\\mathscr{R}': u'ℛ',
+ u'\\mathsf': u'span class="mathsf"',
+ u'\\mathtt': u'span class="mathtt"',
+ u'\\operatorname': u'span class="mathrm"',
}
hybridfunctions = {
Modified: trunk/docutils/docutils/writers/html5_polyglot/math.css
===================================================================
--- trunk/docutils/docutils/writers/html5_polyglot/math.css 2021-04-29 09:55:58 UTC (rev 8716)
+++ trunk/docutils/docutils/writers/html5_polyglot/math.css 2021-05-02 21:23:37 UTC (rev 8717)
@@ -82,12 +82,13 @@
padding: 0ex;
border-top: thin solid;
}
+sub, sup {
+ font-size: 70%;
+}
sup.numerator, sup.unit {
- font-size: 70%;
vertical-align: 80%;
}
sub.denominator, sub.unit {
- font-size: 70%;
vertical-align: -20%;
}
span.sqrt {
@@ -96,7 +97,6 @@
padding: 0.1ex;
}
sup.root {
- font-size: 70%;
position: relative;
left: 1.4ex;
}
@@ -126,15 +126,18 @@
span.hugesymbol {
font-size: 200%;
}
+/* vertically stacked sub and superscript */
span.scripts {
- display: inline-table;
+ display: inline-flex;
vertical-align: middle;
+ flex-direction: column;
}
-.script {
- display: table-row;
- text-align: left;
- line-height: 150%;
+sup.script {
+ order: 1;
}
+sub.script {
+ order: 2;
+}
span.limits {
display: inline-table;
vertical-align: middle;
@@ -241,6 +244,10 @@
font-style: normal;
font-family: serif;
}
+span.mathtt, span.texttt {
+ font-style: normal;
+ font-family: monospace;
+}
span.text, span.textnormal {
font-style: normal;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|