Replace reST roles of subscript and superscript with the MathJax style at math directive block. request #1
This commit is contained in:
10
ox-rst.el
10
ox-rst.el
@@ -1202,7 +1202,15 @@ holding contextual information."
|
|||||||
(org-export-solidify-link-text label)))
|
(org-export-solidify-link-text label)))
|
||||||
"\n"
|
"\n"
|
||||||
(when contents
|
(when contents
|
||||||
(org-rst--indent-string contents org-rst-quote-margin))))
|
(if (string= "math" directive)
|
||||||
|
(let* ((rcontents
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\\\ :sub:`\\(.+\\)`\\\\ " "_{\\1}" contents))
|
||||||
|
(rcontents
|
||||||
|
(replace-regexp-in-string
|
||||||
|
"\\\\ :sup:`\\(.+\\)`\\\\ " "^{\\1}" rcontents)))
|
||||||
|
(org-rst--indent-string rcontents org-rst-quote-margin))
|
||||||
|
(org-rst--indent-string contents org-rst-quote-margin)))))
|
||||||
(t
|
(t
|
||||||
(concat
|
(concat
|
||||||
(format "::\n")
|
(format "::\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user