Skip to content

Instantly share code, notes, and snippets.

@jmooring
Last active January 22, 2024 19:11
Show Gist options
  • Save jmooring/f649aae89a2047e44541de2e3001fb0b to your computer and use it in GitHub Desktop.
Save jmooring/f649aae89a2047e44541de2e3001fb0b to your computer and use it in GitHub Desktop.
Typesetting example

Inline

// Uses $...$ delimiters
Inline $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ equation

Inline $x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ equation

Inline over two lines (only the first one works)

// Uses $...$ delimiters
Inline $x = {-b \pm \sqrt{b^2-4ac} \over 2a}
$ equation

Inline $x = {-b \pm \sqrt{b^2-4ac} \over 2a} $ equation

// Uses $...$ delimiters
Inline $
x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ equation

Inline $ x = {-b \pm \sqrt{b^2-4ac} \over 2a}$ equation

Display (block)

// Uses $$...$$ delimiters
$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$

$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$

// Uses $$...$$ delimiters on their own lines
$$
x = {-b \pm \sqrt{b^2-4ac} \over 2a}
$$

$$ x = {-b \pm \sqrt{b^2-4ac} \over 2a} $$

Inline mixed with currency symbol

The price is $10.00, but members get a discount. The final price is $p' = p(1-d)$.

The price is $10.00, but members get a discount. The final price is $p' = p(1-d)$.

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