Markdown Reference
Markdown For Typora
Overview
Markdown is created by Daring Fireball; the original guideline is here. Its syntax, however, varies between different parsers or editors. Typora is using GitHub Flavored Markdown.
Block Elements
Paragraph and line breaks
A paragraph is simply one or more consecutive lines of text. In markdown source code, paragraphs are separated by two or more blank lines. In Typora, you only need one blank line (press Return
once) to create a new paragraph.
Press Shift
+ Return
to create a single line break. Most other markdown parsers will ignore single line breaks, so in order to make other markdown parsers recognize your line break, you can leave two spaces at the end of the line, or insert <br/>
.
Headers
Headers use 1-6 hash (#
) characters at the start of the line, corresponding to header levels 1-6. For example:
# This is an H1
## This is an H2
###### This is an H6
In Typora, input ‘#’s followed by title content, and press Return
key will create a header.
Blockquotes
Markdown uses email-style > characters for block quoting. They are presented as:
> This is a blockquote with two paragraphs. This is first paragraph.
>
> This is second pragraph. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
> This is another blockquote with one paragraph. There is three empty line to seperate two blockquote.
In Typora, inputting ‘>’ followed by your quote contents will generate a quote block. Typora will insert a proper ‘>’ or line break for you. Nested block quotes (a block quote inside another block quote) by adding additional levels of ‘>’.
Lists
Input * list item 1
will create an unordered list - the *
symbol can be replace with +
or -
.
Input 1. list item 1
will create an ordered list - their markdown source code is as follows:
## un-ordered list
* Red
* Green
* Blue
## ordered list
1. Red
2. Green
3. Blue
Task List
Task lists are lists with items marked as either [ ] or [x] (incomplete or complete). For example:
- [ ] a task list item
- [ ] list syntax required
- [ ] normal **formatting**, @mentions, #1234 refs
- [ ] incomplete
- [x] completed
You can change the complete/incomplete state by clicking on the checkbox before the item.
(Fenced) Code Blocks
Typora only supports fences in GitHub Flavored Markdown. Original code blocks in markdown are not supported.
Using fences is easy: Input ``` and press return
. Add an optional language identifier after ``` and we'll run it through syntax highlighting:
Here's an example:
```js
function test() {
console.log("notice the blank line before this function?");
}
```
syntax highlighting:
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```
Math Blocks
You can render LaTeX mathematical expressions using MathJax.
To add a mathematical expression, input $$
and press the 'Return' key. This will trigger an input field which accepts Tex/LaTex source. For example:
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \\
\end{vmatrix}
\]
In the markdown source file, the math block is a LaTeX expression wrapped by a pair of ‘$$’ marks:
$$
\mathbf{V}_1 \times \mathbf{V}_2 = \begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial X}{\partial u} & \frac{\partial Y}{\partial u} & 0 \\
\frac{\partial X}{\partial v} & \frac{\partial Y}{\partial v} & 0 \\
\end{vmatrix}
$$
You can find more details here.
Tables
Input | First Header | Second Header |
and press the return
key. This will create a table with two columns.
After a table is created, putting focus on that table will open up a toolbar for the table where you can resize, align, or delete the table. You can also use the context menu to copy and add/delete individual columns/rows.
The full syntax for tables is described below, but it is not necessary to know the full syntax in detail as the markdown source code for tables is generated automatically by Typora.
In markdown source code, they look like:
| First Header | Second Header |
| ------------- | ------------- |
| Content Cell | Content Cell |
| Content Cell | Content Cell |
You can also include inline Markdown such as links, bold, italics, or strikethrough in the table.
Finally, by including colons (:
) within the header row, you can define text in that column to be left-aligned, right-aligned, or center-aligned:
| Left-Aligned | Center Aligned | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is | some wordy text | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
A colon on the left-most side indicates a left-aligned column; a colon on the right-most side indicates a right-aligned column; a colon on both sides indicates a center-aligned column.
Footnotes
You can create footnotes like this[^footnote].[^footnote]: Here is the *text* of the **footnote**.
will produce:
You can create footnotes like this[1].
Hover over the ‘footnote’ superscript to see content of the footnote.
Horizontal Rules
Inputting ***
or ---
on a blank line and pressing return
will draw a horizontal line.
YAML Front Matter
Typora now supports YAML Front Matter. Input ---
at the top of the article and then press Return
to introduce a metadata block. Alternatively, you can insert a metadata block from the top menu of Typora.
Table of Contents (TOC)
Input [toc]
and press the Return
key. This will create a “Table of Contents” section. The TOC extracts all headers from the document, and its contents are updated automatically as you add to the document.
Span Elements
Span elements will be parsed and rendered right after typing. Moving the cursor in middle of those span elements will expand those elements into markdown source. Below is an explanation of the syntax for each span element.
Links
Markdown supports two styles of links: inline and reference.
In both styles, the link text is delimited by [square brackets].
To create an inline link, use a set of regular parentheses immediately after the link text’s closing square bracket. Inside the parentheses, put the URL where you want the link to point, along with an optional title for the link, surrounded in quotes. For example:
This is [an example](http://example.com/ "Title") inline link.[This link](http://example.net/) has no title attribute.
will produce:
This is an example inline link. (<p>This is <a href="http://example.com/" title="Title">
)
This link has no title attribute. (<p><a href="http://example.net/">This link</a> has no
)
Internal Links
You can set the href to headers, which will create a bookmark that allow you to jump to that section after clicking. For example:
Command(on Windows: Ctrl) + Click This link will jump to header Block Elements
. To see how to write that, please move cursor or click that link with ⌘
key pressed to expand the element into markdown source.
Reference Links
Reference-style links use a second set of square brackets, inside which you place a label of your choosing to identify the link:
This is [an example][id] reference-style link.Then, anywhere in the document, you define your link label on a line by itself like this:[id]: http://example.com/ "Optional Title Here"
In Typora, they will be rendered like so:
This is an example reference-style link.
The implicit link name shortcut allows you to omit the name of the link, in which case the link text itself is used as the name. Just use an empty set of square brackets — for example, to link the word “Google” to the google.com web site, you could simply write:
[Google][]And then define the link:[Google]: http://google.com/
In Typora, clicking the link will expand it for editing, and command+click will open the hyperlink in your web browser.
URLs
Typora allows you to insert URLs as links, wrapped by <
brackets>
.
<i@typora.io>
becomes i@typora.io.
Typora will also automatically link standard URLs. e.g: www.google.com.
Images
Images have similar syntax as links, but they require an additional !
char before the start of the link. The syntax for inserting an image looks like this:

You are able to use drag & drop to insert an image from an image file or your web browser. You can modify the markdown source code by clicking on the image. A relative path will be used if the image that is added using drag & drop is in same directory or sub-directory as the document you're currently editing.
If you’re using markdown for building websites, you may specify a URL prefix for the image preview on your local computer with property typora-root-url
in YAML Front Matters. For example, input typora-root-url:/User/Abner/Website/typora.io/
in YAML Front Matters, and then 
will be treated as 
in Typora.
You can find more details here.
Emphasis
Markdown treats asterisks (*
) and underscores (_
) as indicators of emphasis. Text wrapped with one *
or _
will be wrapped with an HTML <em>
tag. E.g:
*single asterisks*_single underscores_
output:
single asterisks
single underscores
GFM will ignore underscores in words, which is commonly used in code and names, like this:
wow_great_stuff
do_this_and_do_that_and_another_thing.
To produce a literal asterisk or underscore at a position where it would otherwise be used as an emphasis delimiter, you can backslash escape it:
\*this text is surrounded by literal asterisks\*
Typora recommends using the *
symbol.
Strong
A double *
or _
will cause its enclosed contents to be wrapped with an HTML <strong>
tag, e.g:
**double asterisks**__double underscores__
output:
double asterisks
double underscores
Typora recommends using the **
symbol.
Code
To indicate an inline span of code, wrap it with backtick quotes (`). Unlike a pre-formatted code block, a code span indicates code within a normal paragraph. For example:
Use the `printf()` function.
will produce:
Use the printf()
function.
Strikethrough
GFM adds syntax to create strikethrough text, which is missing from standard Markdown.
~~Mistaken text.~~
becomes Mistaken text.
Underlines
Underline is powered by raw HTML.
<u>Underline</u>
becomes Underline.
Emoji
Input emoji with syntax :smile:
.
User can trigger auto-complete suggestions for emoji by pressing ESC
key, or trigger it automatically after enabling it on preference panel. Also, inputting UTF-8 emoji characters directly is also supported by going to Edit
-> Emoji & Symbols
in the menu bar (macOS).
Inline Math
To use this feature, please enable it first in the Preference
Panel -> Markdown
Tab. Then, use $
to wrap a TeX command. For example: $\lim_{x \to \infty} \exp(-x) = 0$
will be rendered as LaTeX command.
To trigger inline preview for inline math: input “$”, then press the ESC
key, then input a TeX command.
You can find more details here.
Subscript
To use this feature, please enable it first in the Preference
Panel -> Markdown
Tab. Then, use ~
to wrap subscript content. For example: H~2~O
, X~long\ text~
/
Superscript
To use this feature, please enable it first in the Preference
Panel -> Markdown
Tab. Then, use ^
to wrap superscript content. For example: X^2^
.
Highlight
To use this feature, please enable it first in the Preference
Panel -> Markdown
Tab. Then, use ==
to wrap highlight content. For example: ==highlight==
.
HTML
You can use HTML to style content what pure Markdown does not support. For example, use <span style="color:red">this text is red</span>
to add text with red color.
Embed Contents
Some websites provide iframe-based embed code which you can also paste into Typora. For example:
<iframe height='265' scrolling='no' title='Fancy Animated SVG Menu' src='http://codepen.io/jeangontijo/embed/OxVywj/?height=265&theme-id=0&default-tab=css,result&embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'></iframe>
Video
You can use the <video>
HTML tag to embed videos. For example:
<video src="xxx.mp4" />
Other HTML Support
You can find more details here.
Here is the text of the footnote. ︎
Markdown Reference的更多相关文章
- Typora: Markdown Reference (Typora下Markdown语法使用说明)
引言 由于一直在使用Typora,这个是我使用过的最棒的Markdown编辑器,但是总是忽略某一个功能,于是决定认真看一下其帮助文档 这里做一个简单主要功能的中文翻译(按键对应Windows下). 标 ...
- Python 之 【markdown 模块的学习】
摘要: markdown工具,可以将txt转化成html格式.这一类工具的作用是将按一定格式写成的可读性强的文本文件转化为结构化的标准xhtml或html.Linux 下面也有markdown: zh ...
- Typora使用技巧系列:(1)
Typora使用技巧(1) 刚刚开了博客怎么说也要学一下markdown语法什么的吧,使用的是编译器是Typora,之后有空会陆续更新的 切换到源代码模:(ctrl + /)临时切换到源代码模式,再按 ...
- NLNet-Theme for cnblogs
这篇文档仅作为markdown在cnblogs中的渲染效果展示.第一部分NLNet' Samples为自定义内容的效果展示.NOTE 第二.三部分的Markdown Reference(From Ty ...
- Markdown语法 中文版
文章翻译自Markdown创始人JOHN GRUBER的 个人博客, 英文原文请参见 Markdown Syntax; 本文地址: http://www.cnblogs.com/ayning/p/43 ...
- MarkDown笔记
MarkDown是一种轻量级的标记语言,可以比较简洁地格式化文本,所以比较方便地产生可读性良好的文档. 可以使用Markdown: 整理知识,学习笔记 发布日记,杂文,所见所想 撰写发布技术文稿(代码 ...
- Markdown: 用写代码的思维写文档
作者:吴香伟 发表于 2014/08/07 版权声明:可以任意转载,转载时务必以超链接形式标明文章原始出处和作者信息以及版权声明 本文不讲解Markdown的语法规则,只关注它带来的好处以及我使用的方 ...
- Markdown语法手册
Markdown 语法手册 Markdown 是一种轻量级标记语言,能将文本换成有效的XHTML(或者HTML)文档,它的目标是实现易读易写,成为一种适用于网络的书写语言. Markdown 语法简洁 ...
- 像编程一样写文章—Markdown
Markdown是什么 是一种极其简单的标记语言,写的时候只需要普通编辑器即可: 它可以使文本内存具有某种格式: Markdown设计理念使文本易读.易写 文件后缀名:.md . .markdown. ...
随机推荐
- C++模板简介
模板是C++支持参数化多态的工具,使用模板可以使用户为类或者函数声明一种一般模式,使得类中的某些数据成员或者成员函数的参数.返回值取得任意类型. 模板是一种对类型进行参数化的工具: 通常有两种形式:函 ...
- Docker 学习目录
docker 概述 docker是什么 使用最广泛的肉开源容器引擎 其他如rocket,containerd,pouch等容器引擎 一种系统级虚拟化技术 传统的kvm xen,exsi,vmware ...
- 我的第一个npm包:wechat-menu-editor 基于Vue的微信自定义菜单编辑器
wechat-menu-editor 微信自定义菜单编辑器 前言 在做微信公众号相关开发时,基本上会去开发的功能就是微信自定义菜单设置的功能,本着不重复造轮子的原则,于是基于Vue封装的一个微信自定义 ...
- MySQL——备份与恢复
MySQL数据库备份和恢复 --备份类型: 1.热备份(只有InnoDB支持)(不影响业务,最好的方式) 2.冷备份( 阻止用户访问) 3.温备份 --备份方式: 1.逻辑备份(文本表示:SQL语句) ...
- jvm学习笔记:类加载过程
类加载器子系统 类加载器的作用是加载class文件到内存 加载阶段->链接阶段->初始化阶段 ClassLoader只负责class文件的加载,至于是否能够运行由执行引擎判断 加载的类信息 ...
- dotnet 读 WPF 源代码笔记 渲染收集是如何触发
在 WPF 里面,渲染可以从架构上划分为两层.上层是 WPF 框架的 OnRender 之类的函数,作用是收集应用程序渲染的命令.上层将收集到的应用程序绘制渲染的命令传给下层,下层是 WPF 的 GF ...
- element-ui 弹出组件的遮罩层在弹出层dialog模态框的上面
造成的原因: 因为dialog的组件外层div设置了 position:absolute: 属性所以导致遮罩层会在最上面. 解决方法: 在属性内加上这段代码 :append-to-body=&quo ...
- 硕盟 TYPE C转HDMI+VGA+USB3.0+PD3.0四口扩展坞
硕盟SM-T54是一款USB-C 四合一多功能扩展坞,支持四口同时使用,您可以将含有USB 3.1协议的电脑主机,通过此产品连接到具有HDMI或VGA的显示器.电视机或其他显示设备.产品可以接入硬盘. ...
- ysoserial exploit/JRMPClient
ysoserial exploit/JRMPClient 上一篇文章讲到,当服务器反序列化payloads/JRMPListener,即会开启端口监听.再使用exploit/JRMPClient模块发 ...
- 运行FreeSWITCH的命令行参数
一般来说,FreeSWITCH 不需要任何命令行参数就可以启动,但在某些情况下,你需要以一些特殊的参数启动.在此,仅作简单介绍.如果你知道是什么意思,那么你就可以使用,如果不知道,多半你用不到. 使用 ...