use interpreted text role to export subscript and superscript (fix #1)
This commit is contained in:
14
README.org
14
README.org
@@ -340,6 +340,20 @@
|
|||||||
,**bold** *italic* underlined ``code`` ``verbatim`` strike-through
|
,**bold** *italic* underlined ``code`` ``verbatim`` strike-through
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Subscript and superscript
|
||||||
|
|
||||||
|
Org:
|
||||||
|
#+BEGIN_EXAMPLE
|
||||||
|
H_{2}O
|
||||||
|
E = mc^2
|
||||||
|
#+END_EXAMPLE
|
||||||
|
|
||||||
|
reStructuredText:
|
||||||
|
#+BEGIN_SRC rst
|
||||||
|
H\ :sub:`2`\ O
|
||||||
|
E = mc\ :sup:`2`\
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
** Horizontal rules
|
** Horizontal rules
|
||||||
|
|
||||||
Org:
|
Org:
|
||||||
|
|||||||
@@ -1317,9 +1317,7 @@ holding contextual information."
|
|||||||
"Transcode a SUBSCRIPT object from Org to reStructuredText.
|
"Transcode a SUBSCRIPT object from Org to reStructuredText.
|
||||||
CONTENTS is the contents of the object. INFO is a plist holding
|
CONTENTS is the contents of the object. INFO is a plist holding
|
||||||
contextual information."
|
contextual information."
|
||||||
(if (org-element-property :use-brackets-p subscript)
|
(format "\\ :sub:`%s`\\ " contents))
|
||||||
(format "_{%s}" contents)
|
|
||||||
(format "_%s" contents)))
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Superscript
|
;;;; Superscript
|
||||||
@@ -1328,9 +1326,7 @@ contextual information."
|
|||||||
"Transcode a SUPERSCRIPT object from Org to reStructuredText.
|
"Transcode a SUPERSCRIPT object from Org to reStructuredText.
|
||||||
CONTENTS is the contents of the object. INFO is a plist holding
|
CONTENTS is the contents of the object. INFO is a plist holding
|
||||||
contextual information."
|
contextual information."
|
||||||
(if (org-element-property :use-brackets-p superscript)
|
(format "\\ :sup:`%s`\\ " contents))
|
||||||
(format "_{%s}" contents)
|
|
||||||
(format "_%s" contents)))
|
|
||||||
|
|
||||||
|
|
||||||
;;;; Table
|
;;;; Table
|
||||||
|
|||||||
Reference in New Issue
Block a user