CSDN markdown 测试
代码
#include<iostream>
using namespace std;
void main()
{
cout<<"hello world!"<<endl;
}
公式
markdown代码如下
行内公式$s=\pi \times r^2$
陈列公示
$$
s=\pi\times r^2\tag{1}\label{1}
$$
\begin{equation}x^n+y^n=z^n\tag{2}\label{2}\end{equation}
$$
C_3^2C^2_2A_3^3\tag{3}\label{3}
$$
然后可以在这里引用,参见公式$\eqref{1}$,或者参见公式$^\ref{2}$,或者参见公式$\ref{3}$
在网页中显示如下
行内公式
s=π×r2
陈列公示
s=\pi\times r^2\tag{1}\label{1}
\begin{equation}x^n+y^n=z^n\tag{2}\label{2}\end{equation}
C_3^2C^2_2A_3^3\tag{3}\label{3}
然后可以在这里引用,参见公式 (1) ,或者参见公式 2 ,或者参见公式 3
直接这样使用\label
在预览时会有问题,原因和解决方法参见下方引用和链接
Due to a bug blocks containing a
\label
will break in preview, as a workaround you can put$\def\label#1{}$
in your post while editing and remove that on submission - unfortunately this means you won’t spot misspelled references before submitting… Just don’t forget to remove that\def
againshare answered Oct 31 ‘13 at 10:21 community wiki
Tobias Kienzler