LaTeX——命令注释

来源:互联网 发布:苹果软件下载大全 编辑:程序博客网 时间:2024/06/12 19:32
\documentclass[review]{elsarticle}  % 学术文章

\usepackage{lineno,hyperref}  % 引入宏包
%\usepackage{cite}  % 插入参考文献异常时,注释此句
%\usepackage[square, comma, sort&compress, numbers]{natbib}    % 连续引用参考文献,如7-14

%% Numbered
\bibliographystyle{model1-num-names}    %参考文献的格式
\biboptions{numbers,sort&compress}  %在elsevier模板中,natbib包默认已被引用,无需重新引用,修改natbib选项即可,见http://www.cnblogs.com/haoyul/p/4928399.html

\begin{document}    %正文开始

\title{title}    %文档标题,自动居中


%% Group authors per affiliation:
\author{author\fnref{myfootnote}}  % 作者
\address{address}  % 地址

\begin{abstract}  % 摘要
abstract

\end{abstract}


\begin{keyword}  % 关键词
keyword1 \sep keyword2 \sep keyword3 \sep keyword4    % \sep,以逗号分隔
\end{keyword}


\section{Introduction}  %章节

Introduction

% 中间空一行,下一段自动缩进

Introduction


\begin{itemize}    % 在文中插入小段落,段落标号是黑点
\item1
\item2
\item2
\end{itemize}

\begin{figure}  % 插入图片
\begin{center}
\includegraphics[width=1.0\textwidth]{figure}    % width=1.0\textwidth,图片的宽度占文字宽度的比例; figure图片名字,不带后缀
\caption{caption}    % 标题
\end{center}
\end{figure}

Gering et al. \cite{gering2003automatic}    % 正文中引入.bib文件中的参考文献


\begin{equation}  % 插入公式,字体自动转换
\{v_i=(x_i,y_i)|_{i=1,...,N}\}    % \表示转义字符,_表示下标,^表示上标,上下标有多个时,用花括号包起来

\end{equation}


$v_i$  % 正文中插入公式,$equation$


~\\  % 插入空行


E(\textbf{v},\textbf{h}) = -\sum_{i,j} v_i h_j w_{ij} - \sum_i a_i v_i - \sum_j b_j h_j \end{equation}    % \textbf{ }表示粗体,sum_{ }表示连加


p(\textbf{v},\textbf{h}) = \frac{1}{z} e^{-E(\textbf{v},\textbf{h})}    % \frac{分子}{分母}表示分数


HD(P,M) = max\big(max_{p\in\mathbf{P}} d(p,M), max_{p^{'}\in\mathbf{M}} d(p^{'},P)\big)    % \in\mathb表示希腊字母,\big表示括号加大


\begin{table}  % 插入表格
\centering
\caption{caption}
\begin{tabular}{llll}    % llll 表示表格的四列都居左(left,center,right)
\hline
Structures &one&two(mm)\\ \hline    % \\表示换行,\hline表示插入横线
one&$0.916\pm0.040$ &$2.902\pm1.142$\\    % &表示下一列,\pm表示±
two&$0.941\pm0.026$ &$3.000\pm1.128$\\ 
three &$0.844\pm0.074$ &$5.468\pm2.552$\\ \hline
\end{tabular}

\end{table}


\[\|B_i \| - W_\tau \phi(I) - b \leq \varepsilon + \xi_i, \qquad \xi_i \geq 0 \quad i\in\mathbf [1:n]\]    % \|表示||,\tau表示希腊字母,\leq表示≤,\varepsilon表示希腊字母,\geq表示≥,\quad表示插入空格,\in\mathbf表示∈


\begin{table}[h]
\centering
\caption{caption}
\scalebox{0.7}{    % 表格宽度占文字宽度的比例
\begin{tabular}{lllllll}
\toprule    % 三线表格第一条线
\multirow{2}{*}{Models}    % 合并2行,填入Models
&\multicolumn{3}{l}{one} &\multicolumn{3}{l}{two(mm)}\\ \cmidrule(l){2-4}\cmidrule(l){5-7}    % \multicolumn{3}{l}{one}表示合并3列,填入one,l表示居左;\cmidrule(l){2-4}表示2-4列插入一条横线
&one &two &three &one &two &three\\ 
\midrule    % 三线表格第二条线
one &$0.847\pm0.085$&$0.900\pm0.049$ &$0.749\pm0.124$ &$4.791\pm2.301$&$4.761\pm2.224$&$7.431\pm2.797$\\
\textbf{two} &$0.916\pm0.040$ &$0.941\pm0.026$&$0.844\pm0.074$ &$2.902\pm1.142$&$3.000\pm1.128$&$5.468\pm2.552$\\
\bottomrule    % 三线表格第三条线
\end{tabular}}
\end{table}


\section*{References}  % 加*表示章节不排序

\bibliography{References}  % 引入.bib文件


\end{document}  %正文结束
原创粉丝点击