这是第一次用latex写论文时用到的一些语法结构,仅是部分,会不断更新至写完论文
ubuntu环境下使用了texmaker,一开始保存编译latex时显示没有写权限,可能是双系统的问题,需要去win下改权限,linux下无法改。
latex使用语法:
取消首航缩进:
\noindent
有时候语法两边需要加$ $(宏包问题)
箭头上面加文字:
\xleftarrow[下方公式]{上方公式} % 注意加上宏包\usepackage{amsmath}
插入伪代码:
\usepackage{algorithm}
\usepackage{algpseudocode}
\usepackage{amsmath}
\renewcommand{\algorithmicrequire}{\textbf{Input:}} % Use Input in the format of Algorithm
\renewcommand{\algorithmicensure}{\textbf{Output:}} % Use Output in the format of Algorithm
需要先加入以上宏包
\begin{algorithm}
\caption{Temporal Conflict Detection}
\begin{algorithmic}[1] %每行显示行号
\Require input
\Ensure output
\State $a \gets 0$
\State $b \gets 0 $ %初始化ab为0
\end{algorithmic}
\end{algorithm}