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.

文章目录

  • Markdown For Typora
    • Overview
    • Block Elements
      • Paragraph and line breaks
      • Headers
      • Blockquotes
      • Lists
      • Task List
      • (Fenced) Code Blocks
      • Math Blocks
      • Tables
      • Footnotes
      • Horizontal Rules
      • YAML Front Matter
      • Table of Contents (TOC)
    • Span Elements
      • Links
        • Internal Links
        • Reference Links
      • URLs
      • Images
      • Emphasis
      • Strong
      • Code
      • Strikethrough
      • Underlines
      • Emoji :smile:
      • Inline Math
      • Subscript
      • Superscript
      • Highlight
    • HTML
      • Embed Contents
      • Video
      • Other HTML Support

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:​```
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:

V1×V2=∣ijk∂X∂u∂Y∂u0∂X∂v∂Y∂v0∣\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} V1×V2=

iuXvXjuYvYk00

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 this1.

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:

![Alt text](/path/to/img.jpg)![Alt text](/path/to/img.jpg "Optional title")

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 ![alt](/blog/img/test.png) will be treated as ![alt](file:///User/Abner/Website/typora.io/blog/img/test.png) 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

Markdown For Typora相关推荐

  1. unbutu18.04安装Markdown工具typora

    文章目录 unbutu18.04安装Markdown工具typora 1 获取typora网站的密钥 2 将PPA添加到您的源列表中,以便Ubuntu知道从该PPA以及官方Ubuntu源中查找更新. ...

  2. markdown神器 -Typora使用教程笔记

    基本语法 生成目录 列表 有序列表 无序列表 表格 图片 URL链接 数学符号 几个有用的特性 代码块样式(code block) 数学表达式块(math block) 绘制图表 其他特性 文件转换 ...

  3. 【详细】MarkDown语法 + Typora快捷键

    [详细]MarkDown语法 + Typora快捷键 1.标题 MD的标题一共有六级标题,语法基本一致. 语法: # 一级标题## 二级标题 示例: 示例标题(二级标题) 示例标题(四级标题) 快捷键 ...

  4. markdown与Typora

    什么是MarkDown? 知乎上有人问,markdown为什么会流行? 我用markdown写技术笔记快2年了,真的很香. markdown是一种文本标记语言,不是软件,所以和word.notepad ...

  5. Markdown(Typora)学习记录

    Markdown(Typora)学习 1.标题 Markdown支持6种级别的标题,对应html标签 h1 ~ h6.语法如下: # h1 ## h2 ### h3 #### h4 ##### h5 ...

  6. 公式编辑器Axmath+公式识别器SimpleTex+Markdown编辑器Typora

    Ⅰ.公式编辑器Axmath 下载方式: ①百度网盘:https://pan.baidu.com/share/init?surl=UWHIHWJHm-mC5q5LUCyEuA 提取码:1r2a ②城通网 ...

  7. Markdown 学习——Typora入门之常见操作语法及其快捷键

    Markdown 学习–Typora入门 Markdown是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档,然后转换成有效的XHTML(或者HTML)文档. 由于Markdown的轻量 ...

  8. 最强markdown编辑器typora图床教程-七牛版

    typora图床教程_七牛版 markdown编辑器中的王者typora,终于支持自动将图片上传到服务器,返回url了. 终于不用先把图片拖到图床里面再上传了.泪奔. 先来看看效果吧. 注意上面图片的 ...

  9. 好用的 Markdown 编辑器 Typora【Window 、Linux 下的安装教程】

    Typora 介绍: Markdown 是一种快速书写文章的语法,语法丰富简洁,可以胜任常见的各种文本情况.编辑好的文本经过特定的 Markdown 解释器渲染之后就会呈现出简洁优雅的排版格式,相比于 ...

最新文章

  1. ASP.NET中WebForms简介与搭建HelloWorld项目
  2. java文件解压文件_java 文件解压缩
  3. Linux 环境 zookeeper集群安装、配置、测试
  4. Byobu:打造多任务的Terminal
  5. JavaScript正则匹配
  6. 查询mysql数据库中所有表名
  7. Kafka的通讯协议
  8. 浅谈非法NAT接入对网络的安全风险
  9. GitHub 企业服务器被曝高危 RCE 漏洞
  10. LeetCode 堆栈队列 —— 括号匹配(20、232、155)
  11. c语言中的单词的意思及作用,c语言入门必背单词 具体含义是什么
  12. ILSpy反编译exe文件,ResourceNet4修改properties,生成新的exe文件
  13. 联想计算机电源风扇怎样清理,风扇除尘功能说明:联想电源管理V1.0、V7.0、V8.0及早期机型除尘说明...
  14. webui之简单知识梳理
  15. python中的pika模块
  16. cv2.resize()
  17. 开发一个套crm系统软件需要多少钱
  18. E2. Divisible Numbers (hard version)
  19. Linux驱动开发(二)内核符号表
  20. Parametric model

热门文章

  1. HTML做一个简单漂亮的旅游网页(纯html代码)重庆旅游 7页
  2. Web入门(1)——制作简单的网页
  3. 欢迎来到北工大换书网
  4. htt的缺点有哪些?这里列举的几点,欢迎留言
  5. django项目环境搭建
  6. 小甲鱼python第二十讲(内嵌函数和闭包)
  7. django+xadmin学习笔记
  8. 记忆中永不消逝的香椿芽儿的香味·《晚唱·贾平凹》
  9. maven配置项目根路径_Maven 基本概念——根目录、项目创建、坐标
  10. STM32芯片VDD、VDDA和VREF的关系