MacDown
Hello there! I’m MacDown, the open source Markdown editor for OS X.
Markdown and I
Markdown 加粗 here.
- This two-line bullet won't break
代码:
* This two-line bullet
won't break
* This two-line bullet
will break
Strong: 带影印
or __Strong__
(Command-B)
Emphasize: *Emphasize*
or _Emphasize_
[1] (Command-I)
Lists
- Lists must be preceded by a blank line (or block element)
- Unordered lists start each item with a
*
-
-
works too- Indent a level to make a nested list
- Ordered lists are supported.
- Start each item (number-period-space) like
1.
- It doesn't matter what number you use, I will render them sequentially
- So you might want to start each line with
1.
and let me sort it out
- Indent a level to make a nested list
Here is the code:
* Lists must be preceded by a blank line (or block element)
* Unordered lists start each item with a `*`
- `-` works too
* Indent a level to make a nested list
1. Ordered lists are supported.
2. Start each item (number-period-space) like `1. `
42. It doesn't matter what number you use, I will render them sequentially
1. So you might want to start each line with `1.` and let me sort it out
Block Quote
Angle brackets
>
are used for block quotes.
Technically not every line needs to start with a>
as long as
there are no empty lines between paragraphs.
Looks kinda ugly though.Block quotes can be nested.
Multiple Levels
Most markdown syntaxes work inside block quotes.
- Lists
- [Links][arbitrary_id]
- Etc.
Inline Code
Inline code
is indicated by surrounding it with backticks:
`Inline code`
Block Code
If you indent at least four spaces or one tab, I'll display a code block.
print('This is a code block')
print('The block must be preceded by a blank line')
print('Then indent at least 4 spaces or 1 tab')
print('Nesting does nothing. Your code is displayed Literally')
I also know how to do something called Fenced Code Blocks which I will tell you about later.
Horizontal Rules
分隔线
Table
This is a table:
First Header | Second Header |
---|---|
Content Cell | Content Cell |
Content Cell | Content Cell |
You can align cell contents with syntax like this:
Left Aligned | Center Aligned | Right Aligned |
---|---|---|
col 3 is | some wordy text | $1600 |
col 2 is | centered | $12 |
zebra stripes | are neat | $1 |
The left- and right-most pipes (|
) are only aesthetic, and can be omitted. The spaces don’t matter, either. Alignment depends solely on :
marks.
<a name="fenced-code-block">Fenced Code Block</a>
This is a fenced code block:
print('Hello world!')
You can also use waves (~
) instead of back ticks (`
):
print('Hello world!')
Inline Formatting
The following is a list of optional inline markups supported:
Option name | Markup | Result if enabled |
---|---|---|
Intra-word emphasis | So A*maz*ing | So A<em>maz</em>ing |
Strikethrough | ~~Much wow~~ | <del>Much wow</del> |
Underline [2] | _So doge_ | <u>So doge</u> |
Quote [3] | "Such editor" | <q>Such editor</q> |
Highlight | ==So good== | <mark>So good</mark> |
Superscript | hoge^(fuga) | hogefuga |
Autolink | http://t.co | http://t.co |
Footnotes | [^4] and [^4]: | [4] and footnote 4 |
TeX-like Math Syntax
I can also render TeX-like math syntaxes, if you allow me to.[5] I can do inline math like this: \( 1 + 1 \) or this (in MathML): <math><mn>1</mn><mo>+</mo><mn>1</mn></math>, and block math:
\[
A^T_S = B
\]
or (in MathML)
<math display="block">
<msubsup><mi>A</mi> <mi>S</mi> <mi>T</mi></msubsup>
<mo>=</mo>
<mi>B</mi>
</math>
Task List Syntax
- [x] I can render checkbox list syntax
- [x] I support nesting
- [x] I support ordered and unordered lists
- [ ] I don't support clicking checkboxes directly in the html window
Hack On
-
If Underlines is turned on,
_this notation_
will render as underlined instead of emphasized ↩ -
If Underline is disabled
_this_
will be rendered as emphasized instead of being underlined. ↩ -
Quote replaces literal
"
characters with html<q>
tags. Quote and Smartypants are syntactically incompatible. If both are enabled, Quote takes precedence. Note that Quote is different from blockquote, which is part of standard Markdown. ↩ -
You don't have to use a number. Arbitrary things like
[^footy note4]
and[^footy note4]:
will also work. But they will render as numbered footnotes. Also, no need to keep your footnotes in order, I will sort out the order for you so they appear in the same order they were referenced in the text body. You can even keep some footnotes near where you referenced them, and collect others at the bottom of the file in the traditional place for footnotes. ↩ -
Internet connection required. ↩