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

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 Reference相关推荐

  1. 【Tools】MarkDown教程(六)-Markdown Reference

    Markdown For Typora Overview Markdown is created by Daring Fireball; the original guideline is here. ...

  2. MarkDown-Typora MarkDown Reference

    Markdown For Typora Overview Markdown is created by Daring Fireball; the original guideline is here. ...

  3. Python 之 【markdown 模块的学习】

    摘要: markdown工具,可以将txt转化成html格式.这一类工具的作用是将按一定格式写成的可读性强的文本文件转化为结构化的标准xhtml或html.Linux 下面也有markdown: zh ...

  4. 简单操作用R Markdown生成HTML和PDF文件

    文章目录 Output formats PDF HTML Output formats RMarkdown通过knitr来将代码块运行并与.Rmd文件中文本内容合并生成.md文件后通过Pandoc这个 ...

  5. Typora使用总结

    1.官网 https://www.typora.io/ 2.主题 https://theme.typora.io/theme/Github-Night/ 将.CSS文件放进去,关闭软件再重新打开就可以 ...

  6. VS code snippets

    VS code Snippets 文章目录 设置VS Code Snippets的方法 python cpp markdown Reference 设置VS Code Snippets的方法 File ...

  7. Vue应用框架整合与实战--前端开发生态圈

    向着阳光,我们意念坚定不移,相信未来属于我们! Javascript Article Article Javascript深浅拷贝 Javascript中的apply和call继承 Javascrip ...

  8. 手把手教你摆脱愚蠢的有道云笔记过上Typora的好日子

    前言 本文撰写于Typora 一开始学习MarkDown就有的有道云笔记,后来一段时间曾经尝试过印象笔记,但UI太不友好,很难上手就换了.应该说有道云还是不错的,毕竟猪厂产品,界面友好,可以清楚看到渲 ...

  9. 史上R语言最强--资源(免费课程、书籍、教程和各种高级图表)

    史上R语言最强–资源(免费课程.书籍.教程和各种高级图表) 下面是一些免费R的书籍.教程.软件包.图表2单和其他材料,可以在网上学习编程和改进工作流程.有单独的概述 Python resources, ...

最新文章

  1. svn无法读取日志问题解决
  2. Touch Bar 废物利用系列 | 在触控栏上显示 Dock 应用图标
  3. js node 打包mac应用_混搭 TypeScript + GraphQL + DI + Decorator 风格写 Node.js 应用
  4. 七十九、TodoList示例 深入Redux的工作流
  5. 【机器视觉】 dev_unmap_prog算子
  6. 获取指定某一天的00:00—23:59
  7. Scala教程之:静态类型
  8. pytorch WHAT IS TORCH.NN REALLY?
  9. 单片机两个正玄波信号的相位差计算_51单片机的定时器/计数器的原理与使用
  10. java 笔记(3) —— 动态代理,静态代理,cglib代理
  11. CCNA学习指南 第七章 下载
  12. Windows勒索病毒防范、解决方法全攻略
  13. CRACK小试牛刀:关于GALGAME银色遥远爆破记录
  14. 服务器稳定时间,NTP时钟服务器网络时间服务器哪个更好呀?
  15. HDU4609 3-idiots fft
  16. 游戏开发学习路线(需要学什么)
  17. Iterator的使用
  18. 国内外大数据可视化分析产品点评
  19. nvcc(CUDA编译器)
  20. lt18i android 2.3.4典藏版,索爱lt18i的2.3.7和2.3.4 rom刷机包

热门文章

  1. STM32入门开发--LED模块实现跑马灯
  2. IoC与DI浅显易懂的讲解
  3. Spark SQL函数总结
  4. 开源安卓Android流媒体音视频播放器实现声音自动停止、恢复、一键静音功能源码
  5. TensorFlow错误:fatal error: tensorflow/core/framework/op.h: 没有那个文件或目录(PointCNN遇到的错误)
  6. 明天是程序员节,程序员的过节姿势大全抢先看
  7. Modeling-Relational-Data-with-Graph-Convolutional-Networks-阅读笔记
  8. 腾讯音乐MOO音乐应用的Flutter内存治理实战分享
  9. Ubuntu16.04下NVIDIA显卡驱动安装(华硕飞行堡垒7代,1660ti)
  10. 最好的天线基础知识!超实用 随时查询