Skip to content

Instantly share code, notes, and snippets.

@hannahintech
Forked from rafszul/mdExtra.md
Created July 28, 2014 19:37
Show Gist options
  • Save hannahintech/39b55502abd237f34519 to your computer and use it in GitHub Desktop.
Save hannahintech/39b55502abd237f34519 to your computer and use it in GitHub Desktop.

Markdown Extra for StackEdit

Markdown Extra extends Markdown syntax with some nice features.

Tip: You can disable any Markdown Extra feature in the Extensions tab of the Settings dialog.

Tables

Markdown Extra has a special syntax for tables:

Item Value
Computer 1600 USD
Phone 12 USD
Pipe 1 USD

You can specify column alignment with one or two colons:

Item Value Qty
Computer 1600 USD 5
Phone 12 USD 12
Pipe 1 USD 234

Definition Lists

Markdown Extra has a special syntax for definition lists too:

Term 1 Term 2 : Definition A : Definition B

Term 3

: Definition C

: Definition D

> part of definition D

Fenced code blocks

GitHub's fenced code blocks[^gfm] are also supported with Prettify syntax highlighting:

// Foo
var bar = 0;

Tip: To use Highlight.js instead of Prettify, just configure the Markdown Extra extension in the Settings dialog.

Footnotes

You can create footnotes like this1.

SmartyPants

SmartyPants converts ASCII punctuation characters into "smart" typographic punctuation HTML entities. For example:

ASCII HTML
Single backticks 'Isn't this fun?' ‘Isn’t this fun?’
Quotes "Isn't this fun?" “Isn’t this fun?”
Dashes -- is an en-dash and --- is an em-dash – is an en-dash and — is an em-dash

Table of contents

You can insert a table of contents using the marker [TOC]:

[TOC]

Comments

Usually, comments in Markdown are just standard HTML comments. StackEdit extends HTML comments in order to produce useful, highlighted comments in the preview but not in your exported documents.

MathJax

You can render LaTeX mathematical expressions using MathJax, as on [math.stackexchange.com][1]:

The Gamma function satisfying $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ is via the Euler integral

$$ \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt,. $$

Tip: Make sure you include MathJax into your publications to render mathematical expression correctly. Your page/template should include something like:

<script type="text/javascript" src="https://stackedit.io/libs/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>

NOTE: You can find more information:

  • about Markdown syntax [here][2],
  • about Markdown Extra extension [here][3],
  • about LaTeX mathematical expressions [here][4],
  • about Prettify syntax highlighting [here][5],
  • about Highlight.js syntax highlighting [here][6].

Written by rafal szulczewski for weAreThePlayMakers with StackEdit.

Footnotes

  1. Here is the text of the footnote.

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