latex排版记录

  • 论文格式需要修改,尝试使用latex进行排版,并且顺便学习一下latex排版语法

模板下载

首先从官网上下载latex模板

修改模板中的内容

1、报错如下

Runaway argument?
{beamer@subsectioni
! File ended while scanning use of \@writefile

              \par
1.25 \begin{document}
?

解决方法:删除Aux文件

2、包冲突
Argument of \emph has an extra }
原意是多了一个 } ?查阅资料有可能是什么什么包冲突了
先把这两句删掉 (它应该是文献引用[20])

\textbf{\emph{NOTE: }ISO recommends that capitalization follow the accepted practice for the language or script in which the information is given.}\\
See \cite{b20}.

删掉之后可以正确排版了。下面进行内容的修改

3、title 格式
\title{ XXX }

\markboth
{Author \headeretal: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS}
{Author \headeretal: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS}

这两句不知道是干嘛用的

4、灰色斜体字

待会儿后面分段要用到

\subsection{Abbreviations and Acronyms}
Define abbreviations and acronyms the first time they are used in the text, 
even after they have already been defined in the abstract. Abbreviations 
such as IEEE, SI, ac, and dc do not have to be defined. Abbreviations that 
incorporate periods should not have spaces: write ``C.N.R.S.,'' not ``C. N. 
R. S.'' Do not use abbreviations in the title unless they are unavoidable 
(for example, ``IEEE'' in the title of this article).

每新开一节需要用到:\section
section下面的A、B、C分段是:\subsection
插入公式的代码:\begin{equation}E=mc^2.\label{eq}\end{equation}
\begin{equation} XXX \label{eq}\end{equation}

关于文本中使用希腊字母:不能用公式的,要使用 $\ XXX $

看到了一点内容错误:between应连接两个内容,少了一个

插入table

这个算是比较繁琐的内容了,有在线自动生成代码的

\begin{tabular}{对齐方式}文本\end{tabular}

参考https://blog.csdn.net/JueChenYi/article/details/77116011

每行结束之后需要加个\
\par 表示换行。

格式如下

\begin{table}[htpb]
\caption{Notations used in the paper}
\renewcommand{\arraystretch}{1.3}
\label{table}

.......

\end{tabular}
\label{tab1}
\end{table}

插入图片

并排插入两张图片,两个编号

\begin{figure}[h]
\begin{minipage}[t]{0.45\linewidth}
\centering
\includegraphics[width=5.5cm,height=3.5cm]{10}
\caption{第一张图片的图题.}
\end{minipage}
\begin{minipage}[t]{0.45\linewidth}        %图片占用一行宽度的45%
\hspace{2mm}
\includegraphics[width=5.5cm,height=3.5cm]{11}
\caption{第二章图片的图题.}
\end{minipage}
\end{figure}

插入两张图片,一个编号

\begin{figure}[ht]
\centering
\subfigure[11-1]{               %小图题的名称
\includegraphics[width=4cm]{11-1}}
\hspace{0in}
\subfigure[11-2]{
\includegraphics[width=4cm]{11-2}}
\caption{两张图片公用的图题}
\end{figure}

可以用一个文件夹下的图片,如fig/fig1a.png

当插入并排子图时,需要导入包
\usepackage{graphicx}
\usepackage{subfigure}

代码如下

\begin{figure}
\centering
\subfigure[]{
\includegraphics[width=0.7in]{fig/fig1a.png}}
\hspace{0.2in}
\subfigure[]{
\includegraphics[width=0.7in]{fig/fig1b.png}}
\caption{Watermark imaged. (a) Original watermark  images, (b) Scrambled watermark images}
\end{figure}

普通地插入一张图片:

\begin{figure}[h]
\centering
\includegraphics[width=4cm,height=5cm]{3}
\caption{这是一张图片,名字是3.png .}
\end{figure}

格式是双栏的,但是想把图片插入为单栏

\begin{figure*}[h]
\centering
\includegraphics[width=16cm,height=18cm]{fig/fig2.png}
\caption{222}
\end{figure*}

即在原来的figure后面加入*

在表格中插入图片

     \begin{minipage}[b]{0.3\columnwidth}
        \centering
        \raisebox{-.5\height}{\includegraphics[width=\linewidth]{fig/T4/t0d.png}}
    \end{minipage}  

对于其中的文字,如果想换行的话,就分行来写,自己手动加入空格。

\begin{equation} XXX \label{eq}\end{equation}

参考文献格式

没好好改,直接把原来的复制过去了。

其他格式修改

1、等式不能写成Eq.(XX),直接写成(XX)即可。


latex排版记录_第1张图片
0749957D-2B1C-4BB9-8A2A-C22C14F8E47B.png

再调整整体的格式,让图片的位置适中。

先这样吧...lui了

你可能感兴趣的:(latex排版记录)