Skip to content

Instantly share code, notes, and snippets.

@benmarwick
Last active December 20, 2022 18:39
Show Gist options
  • Save benmarwick/4fb6f222443493e3c864 to your computer and use it in GitHub Desktop.
Save benmarwick/4fb6f222443493e3c864 to your computer and use it in GitHub Desktop.
Commonly used scientific symbols in pandoc markdown

Commonly used scientific symbols in pandoc markdown

encoding is UTF-8, needs xelatex, like this:

---
output:
  pdf_document:
    latex_engine: xelatex
---

per mille sign

plain text: ‰ (does render properly in PDF, does in Word)
HTML: ‰ (does renders properly in PDF, does in Word)
LaTeX: $\text{\textperthousand}$ (does render properly in PDF, doesn't in Word)

delta sign

plain text: δ (doesn't render properly in PDF, does in Word)
HTML: δ (doesn't render properly in PDF, does in Word)
LaTeX: $\delta$ (doesn't render properly in PDF, does in Word)

plus-minus sign

plain text: ± (renders properly in PDF, does in Word)
HTML: ± (renders properly in PDF, does in Word)
LaTeX: $\pm$ (doesn't render properly in PDF, does in Word)

degree sign

plain text: ° (renders properly in PDF, does in Word)
HTML: ° (renders properly in PDF, does in Word)
LaTeX: $\text{\textdegree}$ (renders properly in PDF, doesn't in Word)

subscript

surround with one tilda one each side (): CO2~ for subscript

superscript

surround with one hat on each side (^): E=mc^2^ for superscript

For double line spacing in PDF output:

---
title: "A Title"
author: "Some authors"
header-includes:
    - \usepackage{setspace}\doublespacing
output: pdf_document
bibliography: main.bib
---

For a word doc, follow these instructions: http://rmarkdown.rstudio.com/articles_docx.html

@abuhelwa
Copy link

abuhelwa commented Sep 9, 2016

Very useful; thank you!

@eepishin
Copy link

How to render "+"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment