您的位置:首页 > 其它

LaTeX格式模板二

2015-12-27 14:38 567 查看
前面提到的文章的语句是论文的主题框架,但是还没有涉及到插入图片,论文居中显示,表格大小的调整,表格单元格长度过长和参考文献的问题。
1.插入图片
插入图片的模板一般是下面的样子,但要用到自己的论文中时要修改的地方有如下几个地方
\includegraphics用来设置图片的大小参数和图片的存放路径,scale=0.8的意思就是设置图片为原来的0.8倍的大小
\caption是图片名
插入图片的命令
\begin{figure}[!hbp]
 \centering  %居中
 \includegraphics[scale=0.8]{picture/test.png}  %设置图片的大小参数和存放路径
 \caption{test figure} %图片名,在轮论文中显示,可选
 \end{figure}

2.论文居中显示
把论文居中显示
模板

\begin{center}
%要居中显示的内容
\end{center}

样例
\begin{center}
IF(CW>25)  Feature envy ;\\
\end{center}


3.表格大小的调整
当表格太大超过一栏时,可以调节
首先文章导言区加入\usepackage{graphicx}
然后在要缩小的位置加入语句
\resizebox{0.5\textwidth}{!}{ %
...要缩小的表格
}%
要注意的是要把待缩小的表格放到{% %}中
例子
\begin{table*}[!htp]
\resizebox{0.5\textwidth}{!}{ %
\begin{tabular}{|c|c|c|c|}
     \hline
       Detection Tool &  Ejbbjar.java  &   GenericDeploymentToolne.java & TarEntry.java\\
        \hline
         Checkstyle  &   2(18lines,51lines) &   10    &   5\\
         \hline
          DT    &         1       &      9  &      3 \\
         \hline
\end{tabular}} %
\end{table*}


4.表格内单元格过长时强制换行
\begin{table}
  \newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}}
  \centering
  \begin{tabular}{|c|c|}\hline
    \hline
    Tool &  metric\\
    \hline    
    checkstyle & \tabincell{c}{ Detect the code line \\ of every method is smaller than 15}\\
    \hline
    DT & \tabincell{c}{Detect the character\\ of every method  is smaller than 1000 }\\
    \hline
   \end{tabular}
 \end{table}


5.参考文献的引用

在论文的引用处 citation \cite{索引名}
\begin{thebibliography}{99}
\bibitem{索引名1} Fowler M. Refactoring: improving the design of existing code[M]. Pearson Education India, 1999.\\
\bibitem{索引名2} Guo Y, Seaman C, Zazworka N, et al. Domain-specific tailoring of code smells: an empirical study[C]//Proceedings of the 32nd ACM/IEEE International Conference on Software Engineering-Volume 2. ACM, 2010: 167-170.
\end{thebibliography}

6前引号
打引号的时候,前引号会变得跟后引号一样吗,这时候要用 ``(Tab键上面的那个键),敲两遍那个键就可以了。
附注:论文中标点符号
要符合默认规定,要空格,大家可以看一下别人的论文,每个标点符号后都要空一格。

***************************************************************************************************
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: