CSDN markdown 测试

来源:互联网 发布:数据库元组 编辑:程序博客网 时间:2024/05/19 21:00

CSDN markdown 测试

  • 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 again

share answered Oct 31 ‘13 at 10:21 community wiki
Tobias Kienzler

0 0