LaTex操作指南
软件采用TeXstudio
\documentclass[11pt,a4paper]{article}%文章类型 例如article、book,pt和paper是文章规格
%documentclass与begin之间是preamble区域 该区域是影响整个文章的指令。
\usepackage[space]{ctex}%ctex添加中文,space添加中文空格
\usepackage{graphicx}%插入图片的包
\usepackage{listings}%插入代码片段包
\usepackage{color}%插入字体颜色包
\title{latex 快速入门}%标题
\author{li shaozhuo}%作者
\date{\today}%日期
\begin{document}
\maketitle%maketitle显示begin{document}之前的\title{},\author{},\date{}等
%你 好 %是注释
你 好%如果不添加\usepackage{ctex} 则无法使用中文,无\usepackage[space]{ctex},则中文之间无法使用空格,但可以使用{}或者\ (\后面有个空格)来显示空格。
Hello LaTeX#文字\footnote{LaTeX是一个与Word比肩,甚至更好的工具}%\footnote{}脚注
\part{part标题}
\section{section1标题}
\subsection{section1.1标题}
\subsubsection{section1.1.1标题}
%插入图片
\begin{figure}[htbp]%h为当前位置,t是顶部,b是底部,p是浮动页,以htbp的顺序尽量满足排版
\begin{center}%图片居中
\includegraphics[scale=0.6]{D:/Desktop_D/2a5d3fd74ca1fb1c982a.jpg}
\end{center}
\caption{该图片的说明}
\label{figure:test_demo}%用于文中引用图片的标签
\end{figure}
%插入代码段
\begin{lstlisting}[language={Python}]
printf("Hello world")
\end{lstlisting}
{\color{red}LaTeX}由美国计算机学家{\kaishu{莱斯利·兰伯特}在\underline{20世纪80年代}初期开发。%\kaishu 楷书
%公式
\begin{equation}%equation带有编号 如果不需要编号,就后面加入星号equation*
1+2+3+\dots+(n-1)+n = \frac{n(n+1)}{2}%公式
\end{equation}
$a^2+b^2=c^2$%行内公式
\subsection{section1.2标题}
\subsubsection{section1.2.1标题}
\section{section2标题}
\subsection{section2.1标题}
\paragraph{parapgrah标题}
\subparagraph{subparaprah标题}
\begin{thebibliography}{99}%99为参考文献个数
\bibitem{1} 参考文献1
\bibitem{2} 参考文献2
\end{thebibliography}
\begin{appendix}
\section{附录1}
\section{附录2}
\end{appendix}
\end{document}