前言
使用overleaf在线编辑
第一部分
中英文编辑
本体—所有显示的都在document之间
\document[UTF8]{ctexart} %中文显示
\begin{document}
Hello!中国!
\end{document}
文章结构
\section \subsection \subsubsection 不同标题
\paragraph \subparagraph
\documentclass[UTF8]{ctexart}%中文文档类型
%导言区
\title{你好,world!}
\author{musi}
\date{\today}
\begin{document}
\maketitle % 导言区title显示
\section{你好中国} %带标号
中国在East Asia.
\subsection{你好北京}()
北京是capital of China.
\subsubsection{你好天安门}
Hello,world!
为人民服务!
\paragraph{天安门} %
北京的中心
\subparagraph{毛主席}
天安门广场
\subsection{Hello,北京}
\paragraph{北京} is an international city.
\end{document}
效果图:
文献引用
关键:
-
\bibliographystyle{*} 参考文献的显示方式
-
\bibliography{*} *命名的.bib文件
自己创建 *.bib文件,然后在百度学术或者谷歌学术等 中 引用,选择Bibtex格式,然后复制粘贴到创建的文件中。
-
\cite{*} 引用,* 为artcle第一行的内容
\documentclass[UTF8]{ctexart}%中文文档类型
\begin{document}
\section{引用范例}
这是参考文献引用:\cite{ZITOVA2003977} %引用
第二篇引用\cite{SKEA1993269}
中文引用\cite{罗述谦1999医学图像配准技术}
%unsrt引用先后顺序plain按照字母顺序排列
\bibliographystyle{unsrt}
\bibliography{text} %显示text.bib中的内容,bibtex格式
\end{document}
效果图:
数学公式
调用:amsmath包
\usepackage{amsmath}
编写:
-
行内公式
$...$
-
行间公式
\[...\]
-
equation环境,自动编号
\section{公式} %https://www.latexlive.com/ 可以在线公式编辑 \begin{equation} %公式编号环境,但不能换行 \sum_i^n i^2 \label{eq:平方和} %加标签引用 \end{equation} \begin{equation*} %公式编号环境,带*号可以不编号 \int x dx \end{equation*} \begin{equation} %公式编号环境,但不能换行 x^\frac{1}{3} \end{equation} 式\eqref{eq:平方和}interesting %公式引用
效果图:
-
多行公式1
\begin{align} %align &指定位置对齐 x &= t + \cos t + 1 \\ y &= 2\sin t \\ z &= t \notag % 去除编号 \end{align}
效果图:

-
多行公式2
\begin{equation} \begin{split} %split需要嵌套在equation中,允许多行书写,但不能多列 \cos 2x &= \cos^2 x - \sin^2 x \\ &= 2\cos^2 x - 1 \end{split} \end{equation}
效果图:

- 多行公式3
\[
f(x)= \begin{cases} %dfrac可以变成行间公式
\dfrac{x+1}{4},&\text{if } 0 < y < 1 \text{ and } 0 < x < 2;\\
0,&\text{otherwise}.
\end{cases}
\]
效果图: