image: description of a coordinate transformation
I wonder how to write the leading superscript and subscript shown in the picture in Markdown syntax?
image: description of a coordinate transformation
I wonder how to write the leading superscript and subscript shown in the picture in Markdown syntax?
Pandoc's flavor of markdown supports a math extension:
Anything between two $ characters will be treated as TeX math.
The following string returns your desired output: $_B^AR$
Pandoc's markdown also has a superscript and subscript extension:
Superscripts may be written by surrounding the superscripted text by ^ characters; subscripts may be written by surrounding the subscripted text by ~ characters. Thus, for example,
H~2~O is a liquid. 2^10^ is 1024.
But, as far as I know, there is no support for your request, a character that combines both a subscript and a superscript.
There are several ways of adding superscript and subscript to a Markdown doc:
<sup></sup>
and <sub></sub>
tags, or even something like <span style="vertical-align: super; font-size: medium;">
if you want more control.¹
, ²
) and some symbols (™
, ℠
). See this list of characters.
syntax (like this).$
or $$
blocks. Eg. Water, also known as H$_2$O
. See the raw version of this Gist.The first three options should work most places that use Markdown. LaTeX support isn't as widespread. For example Pandoc and GitHub now support it but StackOverflow and many other renderers don't.
I've described these options in more detail in my answer to this related question.
Try using <sup></sup>
(<sub></sub>
), as suggested in this other SO post
(but indeed, the solution depends on the way it's rendered)
What are you doing? Are you using Github or compiling a markdown file to pdf? Or using Jekyll? In any case you can display that (and any other math symbol) using latex inside markdown.
In latex you can write leading superscripts with this code:
\documentclass{article}
\begin{document}
\[
^gp = {}^gR^l_l+{}^go_l
\]
\end{document}
as explained here.