部分语法

列表

Lists can be unnumbered like:

  • Item Foo
  • Item Bar

Or automatically numbered:

  1. Item 1
  2. Item 2

代码区域

redis> RPUSH numbers 3 1 2
(integer) 3

redis> SORT numbers
1) "1"
2) "2"
3) "3

尾注

Lorem ipsum [1] dolor sit amet ... [2]

表格

A B A and B
False False False
True False False
False True False
True True True

指令

Note

note注意

Warning

warning警告

Danger

danger危险

需引用自身, 查看 列表.

语法产品

try_stmt  ::=  try1_stmt | try2_stmt
try1_stmt ::=  "try" ":" suite
               ("except" [expression ["," target]] ":" suite)+
               ["else" ":" suite]
               ["finally" ":" suite]
try2_stmt ::=  "try" ":" suite
               "finally" ":" suite

函数

format_exception(etype, value, tb[, limit=None])

Format the exception with a traceback.

Parameters:
  • etype – exception type
  • value – exception value
  • tb – traceback object
  • limit (integer or None) – maximum number of stack frames to show
Return type:

list of strings

数学

MathJax开发文档:

LaTeX在线编辑器

利用 CSS 计数器为非内联公式加入编号。以下为修改 CSS 样式:

body {
  counter-reset:section 0;
}

div.body h2:before {
  content:"";
  counter-increment:section;
}

div.body h2 {
  background-color: #ffffff;
  margin-top: 60px;
  /* background-color: #8A7DB3; */
  color: #0c3762;
  border-bottom:
  dotted thin #CFC8C8;
  counter-reset:section;
}

div.math:before {
  counter-increment:equation;
  content:"(" counter(section) "." counter(equation) ")";
  float:right;
}
Some Ruby code.
\[(a + b)^2 = a^2 + 2ab + b^2\]\[(a - b)^2 = a^2 - 2ab + b^2\]
\[\begin{split}(a + b)^2 &= (a + b)(a + b) \\ &= a^2 + 2ab + b^2\end{split}\]
\[(a + b)^2 = a^2 + 2ab + b^2\]
\[\begin{eqnarray} y & = & ax^2 + bx + c \\ f(x) & = & x^2 + 2xy + y^2 \end{eqnarray}\]
(1)\[e^{i\pi} + 1 = 0\]

Euler’s identity, equation (1), was elected one of the most beautiful mathematical formulas.

\[\iint\limits_{{D_1}} {(\frac{{\partial Q}}{{\partial x}} - \frac{{\partial P}}{{\partial y}})}dxdy = \oint_{AB} {Pdx + Qdy}\]

Footnotes

[1]第一条尾注的文本.
[2]第二条尾注的文本.

讨论

comments powered by Disqus