欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客

本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:

  • Markdown和扩展Markdown简洁的语法
  • 代码块高亮
  • 图片链接和图片上传
  • LaTex数学公式
  • UML序列图和流程图
  • 离线写博客
  • 导入导出Markdown文件
  • 丰富的快捷键

快捷键

  • 加粗 Ctrl + B
  • 斜体 Ctrl + I
  • 引用 Ctrl + Q
  • 插入链接 Ctrl + L
  • 插入代码 Ctrl + K
  • 插入图片 Ctrl + G
  • 提升标题 Ctrl + H
  • 有序列表 Ctrl + O
  • 无序列表 Ctrl + U
  • 横线 Ctrl + R
  • 撤销 Ctrl + Z
  • 重做 Ctrl + Y

Markdown及扩展

Markdown 是一种轻量级标记语言,它允许人们使用易读易写的纯文本格式编写文档,然后转换成格式丰富的HTML页面。 —— [ 维基百科 ]

使用简单的符号标识不同的标题,将某些文字标记为粗体或者斜体,创建一个链接等,详细语法参考帮助?。

本编辑器支持 Markdown Extra ,  扩展了很多好用的功能。具体请参考Github.

表格

Markdown Extra 表格语法:

项目 价格
Computer $1600
Phone $12
Pipe $1

可以使用冒号来定义对齐方式:

项目 价格 数量
Computer 1600 元 5
Phone 12 元 12
Pipe 1 元 234

定义列表

Markdown Extra 定义列表语法:
项目1
项目2
定义 A
定义 B
项目3
定义 C

定义 D

定义D内容

代码块

代码块语法遵循标准markdown代码,例如:

@requires_authorization
def somefunc(param1='', param2=0):
    '''A docstring'''
    if param1 > param2: # interesting
        print 'Greater'
    return (param2 - param1 + 1) or None
class SomeClass:
    pass
>>> message = '''interpreter ... prompt'''

脚注

生成一个脚注1.

目录

[TOC]来生成目录:

  • 欢迎使用Markdown编辑器写博客
    • 快捷键
    • Markdown及扩展
      • 表格
      • 定义列表
      • 代码块
      • 脚注
      • 目录
      • 数学公式
      • UML 图
    • 离线写博客
    • 浏览器兼容

数学公式

使用MathJax渲染LaTex 数学公式,详见math.stackexchange.com.

  • 行内公式,数学公式为: Γ(n)=(n1)!nN
  • 块级公式:

x=b±b24ac2a

更多LaTex语法请参考 这儿.

UML 图:

可以渲染序列图:

Created with Raphaël 2.1.0 张三 张三 李四 李四 嘿,小四儿, 写博客了没? 李四愣了一下,说: 忙得吐血,哪有时间写。

或者流程图:

Created with Raphaël 2.1.0 开始 我的操作 确认? 结束 yes no
  • 关于 序列图 语法,参考 这儿,
  • 关于 流程图 语法,参考 这儿.

离线写博客

即使用户在没有网络的情况下,也可以通过本编辑器离线写博客(直接在曾经使用过的浏览器中输入write.blog.csdn.net/mdeditor即可。Markdown编辑器使用浏览器离线存储将内容保存在本地。

用户写博客的过程中,内容实时保存在浏览器缓存中,在用户关闭浏览器或者其它异常情况下,内容不会丢失。用户再次打开浏览器时,会显示上次用户正在编辑的没有发表的内容。

博客发表后,本地缓存将被删除。 

用户可以选择 把正在写的博客保存到服务器草稿箱,即使换浏览器或者清除缓存,内容也不会丢失。

注意:虽然浏览器存储大部分时候都比较可靠,但为了您的数据安全,在联网后,请务必及时发表或者保存到服务器草稿箱

浏览器兼容

  1. 目前,本编辑器对Chrome浏览器支持最为完整。建议大家使用较新版本的Chrome。
  2. IE9以下不支持
  3. IE9,10,11存在以下问题
    1. 不支持离线功能
    2. IE9不支持文件导入导出
    3. IE10不支持拖拽文件导入

To see how any formula was written in any question or answer, including this one, right-click on the expression it and choose “Show Math As > TeX Commands”.

For inline formulas, enclose the formula in ... . For displayed formulas, use

...
. These render differently: ∑ni=0i2=(n2+n)(2n+1)6 (inline) or
∑i=0ni2=(n2+n)(2n+1)6(displayed)
For Greek letters, use \alpha, \beta, …, \omega: α,β,…ω. For uppercase, use \Gamma, \Delta, …, \Omega: Γ,Δ,…,Ω.

For superscripts and subscripts, use ^ and _. For example, x_i^2: x2i.

Groups. Superscripts, subscripts, and other operations apply only to the next “group”. A “group” is either a single symbol, or any formula surrounded by curly braces {…}. If you do 10^10, you will get a surprise: 1010. But 10^{10} gives what you probably wanted: 1010. Use curly braces to delimit a formula to which a superscript or subscript applies: x^5^6 is an error; {x^y}^z is xyz, and x^{y^z} is xyz. Observe the difference between x_i^2 x2i and x_{i^2} xi2.

Parentheses Ordinary symbols ()[] make parentheses and brackets (2+3)[4+4]. Use { and } for curly braces {}.

These do not scale with the formula in between, so if you write (\frac12) the parentheses will be too small: (12). Using \left(…\right) will make the sizes adjust automatically to the formula they enclose: \left(\frac12\right) is (12).

\left and\right apply to all the following sorts of parentheses: ( and ) (x), [ and ] [x], { and } {x}, | |x|, \langle and \rangle ⟨x⟩, \lceil and \rceil ⌈x⌉, and \lfloor and \rfloor ⌊x⌋. There are also invisible parentheses, denoted by .: \left.\frac12\right\rbrace is 12}.

Sums and integrals \sum and \int; the subscript is the lower limit and the superscript is the upper limit, so for example \sum_1^n ∑n1. Don’t forget {…} if the limits are more than a single symbol. For example, \sum_{i=0}^\infty i^2 is ∑∞i=0i2. Similarly, \prod ∏, \int ∫, \bigcup ⋃, \bigcap ⋂, \iint ∬.

Fractions There are two ways to make these. \frac ab applies to the next two groups, and produces ab; for more complicated numerators and denominators use {…}: \frac{a+1}{b+1} is a+1b+1. If the numerator and denominator are complicated, you may prefer \over, which splits up the group that it is in: {a+1\over b+1} is a+1b+1.

Fonts

Use \mathbb or \Bbb for “blackboard bold”: CHNQRZ.
Use \mathbf for boldface: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz.
Use \mathtt for “typewriter” font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz.
Use \mathrm for roman font: ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz.
Use \mathcal for “calligraphic” letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Use \mathscr for script letters: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Use \mathfrak for “Fraktur” (old German style) letters: ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.
Radical signs Use sqrt, which adjusts to the size of its argument: \sqrt{x^3} x3−−√; \sqrt3{\frac xy} xy√3. For complicated expressions, consider using {…}^{1/2} instead.

Some special functions such as “lim”, “sin”, “max”, “ln”, and so on are normally set in roman font instead of italic font. Use \lim, \sin, etc. to make these: \sin x sinx, not sin x sinx. Use subscripts to attach a notation to \lim: \lim_{x\to 0}
limx→0
There are a very large number of special symbols and notations, too many to list here; see this shorter listing, or this exhaustive listing. Some of the most common include:

\lt \gt \le \ge \neq <>≤≥≠. You can use \not to put a slash through almost anything: \not\lt ≮ but it often looks bad.
\times \div \pm \mp ×÷±∓. \cdot is a centered dot: x⋅y
\cup \cap \setminus \subset \subseteq \subsetneq \supset \in \notin \emptyset \varnothing ∪∩∖⊂⊆⊊⊃∈∉∅∅
{n+1 \choose 2k} or \binom{n+1}{2k} (n+12k)
\to \rightarrow \leftarrow \Rightarrow \Leftarrow \mapsto →→←⇒⇐↦
\land \lor \lnot \forall \exists \top \bot \vdash \vDash ∧∨¬∀∃⊤⊥⊢⊨
\star \ast \oplus \circ \bullet ⋆∗⊕∘∙
\approx \sim \simeq \cong \equiv \prec ≈∼≃≅≡≺.
\infty \aleph_0 ∞ℵ0 \nabla \partial ∇∂ \Im \Re IR
For modular equivalence, use \pmod like this: a\equiv b\pmod n a≡b(modn).
\ldots is the dots in a1,a2,…,an \cdots is the dots in a1+a2+⋯+an
Some Greek letters have variant forms: \epsilon \varepsilon ϵε, \phi \varphi ϕφ, and others. Script lowercase l is \ell ℓ.
Detexify lets you draw a symbol on a web page and then lists the TEX symbols that seem to resemble it. These are not guaranteed to work in MathJax but are a good place to start. To check that a command is supported, note that MathJax.org maintains a list of currently supported LATEX commands, and one can also check Dr. Carol JVF Burns’s page of TEX Commands Available in MathJax.

Spaces MathJax usually decides for itself how to space formulas, using a complex set of rules. Putting extra literal spaces into formulas will not change the amount of space MathJax puts in: a␣b and a␣␣␣␣b are both ab. To add more space, use , for a thin space ab; \; for a wider space ab. \quad and \qquad are large spaces: ab, ab.

To set plain text, use \text{…}: {x∈s∣x is extra large}. You can nest inside of \text{…}.

Accents and diacritical marks Use \hat for a single symbol x^, \widehat for a larger formula xyˆ. If you make it too wide, it will look silly. Similarly, there are \bar x¯ and \overline xyz¯¯¯¯¯¯¯¯, and \vec x⃗ and \overrightarrow xy−→− and \overleftrightarrow xy←→. For dots, as in ddxxx˙=x˙2+xx¨, use \dot and \ddot.

Special characters used for MathJax interpreting can be escaped using the \ character: $ $, { {, _ _, etc.

  1. 这里是 脚注内容. ↩

你可能感兴趣的:(欢迎使用CSDN-markdown编辑器)