Skip to content
FileMyLove

Subscripts and superscripts from Markdown to Word: check the markers

Prepare short superscript and subscript text in Pandoc Markdown, distinguish it from equations and inspect the converted Word document.

By FileMyLove Team2 min read

A chemical label or a small raised number should not end up as unexplained punctuation in Word. Use the syntax understood by the converter, then inspect the DOCX. Markdown previews in different applications are not proof that they use the same extensions.

Use paired markers for short text

Pandoc documents ^ around superscript text and ~ around subscript text. FileMyLove uses its Markdown reader and DOCX writer. For a short sample, x^2^ requests a raised 2 and H~2~O requests a lowered 2. These are formatting instructions, not calculations.

Keep this first test free of spaces inside the markers. Pandoc requires spaces inside these spans to be escaped; a sentence with arbitrary spaces between markers is not a reliable substitute for a short label.

Choose the right kind of content

Intended result Preparation
Small raised text Paired superscript markers
Small lowered text Paired subscript markers
A structured equation Use the separate equation workflow
Literal marker characters Put the example in a code span

Two tildes have another meaning: they request strikeout. Check the number of markers before assuming a font problem.

Verify before converting the full document

  1. Keep the original Markdown file.
  2. Make a short sample containing one superscript, one subscript and ordinary text nearby.
  3. Convert with Markdown to Word.
  4. Open the downloaded DOCX and check the vertical position of the small characters.
  5. Check that surrounding punctuation and the rest of the label are unchanged.

Our recommendation is to inspect the document at a readable zoom and then at its intended viewing size. A label can be technically formatted yet too small for the reader. If necessary, adjust the final document in the word processor and review it again.

Formatting does not validate the meaning

The converter does not check a scientific statement or evaluate an expression because its characters are raised or lowered. Review the wording against your original source. For fractions and more complex notation, read equations in Word; for visible syntax examples, read literal Markdown symbols.