|
From: <mi...@us...> - 2022-01-27 14:22:34
|
Revision: 8986
http://sourceforge.net/p/docutils/code/8986
Author: milde
Date: 2022-01-27 14:22:31 +0000 (Thu, 27 Jan 2022)
Log Message:
-----------
Do not use combining Unicode characters without base in literal strings.
Add an example for LaTeX accent functions in mathematical text
to the mathematics documentation.
Modified Paths:
--------------
trunk/docutils/docs/ref/rst/mathematics.txt
trunk/docutils/docutils/utils/math/math2html.py
Modified: trunk/docutils/docs/ref/rst/mathematics.txt
===================================================================
--- trunk/docutils/docs/ref/rst/mathematics.txt 2022-01-27 14:22:21 UTC (rev 8985)
+++ trunk/docutils/docs/ref/rst/mathematics.txt 2022-01-27 14:22:31 UTC (rev 8986)
@@ -975,7 +975,7 @@
\left( \frac{3 }{2} \right)
\left( \frac{3^2}{2^4} \right)
\binom{3 }{2}
- \begin{pmatrix} a & b \\ c & d \end{pmatrix}
+ \begin{pmatrix} a & b \\ c & d \end{pmatrix}
\left( \frac{1}{\sqrt 2} \right)
\left( \int \right)
\left( \int_0 \right)
@@ -1001,7 +1001,7 @@
\left( \sum_0 \right)
\left( \prod \right)`
-
+
:`\bigl(\text{big}\bigr)`: `\left(\underline x \right)
\left( 3^2 \right)
\binom{3}{2}
@@ -1087,8 +1087,12 @@
\bigotimes_1^N
-
Text
~~~~
The text may contain non-ASCII characters: `n_\text{Stoß}`.
+
+Some text-mode LaTeX commands are supported with math_output_ "html".
+In other output formats, use literal Unicode: `\text{ç é è ë ê ñ ů ž ©}`
+to get the result of the accent macros
+`\text{\c{c} \'e \`e \"e \^e \~n \r{u} \v{z} \textcircled{c}}`.
Modified: trunk/docutils/docutils/utils/math/math2html.py
===================================================================
--- trunk/docutils/docutils/utils/math/math2html.py 2022-01-27 14:22:21 UTC (rev 8985)
+++ trunk/docutils/docutils/utils/math/math2html.py 2022-01-27 14:22:31 UTC (rev 8986)
@@ -176,17 +176,17 @@
}
combiningfunctions = {
- "\\'": '́',
- '\\"': '̈',
- '\\^': '̂',
- '\\`': '̀',
- '\\~': '̃',
- '\\c': '̧',
- '\\r': '̊',
- '\\s': '̩',
- '\\textcircled': '⃝',
- '\\textsubring': '̥',
- '\\v': '̌',
+ "\\'": '\u0301', # x́
+ '\\"': '\u0308', # ẍ
+ '\\^': '\u0302', # x̂
+ '\\`': '\u0300', # x̀
+ '\\~': '\u0303', # x̃
+ '\\c': '\u0327', # x̧
+ '\\r': '\u030a', # x̊
+ '\\s': '\u0329', # x̩
+ '\\textcircled': '\u20dd', # x⃝
+ '\\textsubring': '\u0325', # x̥
+ '\\v': '\u030c', # x̌
}
for key, value in tex2unichar.mathaccent.items():
combiningfunctions['\\'+key] = value
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|