Latex 排版论文 Quick Start准备工作:1.安装WinEdit2.安装MikTex,最好是直接下载80M的安装包3.安装JabRef 2.3.14.安装gnuplot5.安装 GSView和GSGhost6.下载论文的模板:注意,至少有两个文件,并不是指下载.tex文件。
下面以elsart journal 模板为例:a.elsart.cls: 指定elsart的格式b.template-num.tex: 给出了title,author,abstract,introduction等各section的空白,只需要填空即可。
7.用winEdit打开template-num.tex进行编辑。
8.编译9.dvi->pdf以下是一些小技巧:首先建一个工作目录:gossip-dlb-tex最后,这个文件中应该有如下的文件。
首先要注意不要忘记在.tex文件首加入对应的package.\documentclass{elsart}\usepackage{ifpdf}\usepackage{graphicx,amssymb,lineno}\usepackage{algorithm}\usepackage{algorithmic }\usepackage{multirow}\usepackage{subfigure}如果需要编辑公式,可以安装一个MathType ,将配置设置成“输出为Latex 格式”。
然后copy-paste 到winEdit 中即可。
注意:考过去是\[1sin ()a θ- \] 格式,如果需要将公式放在文本里,需要用$:即$1sin ()a θ-$, 如果将公式独立:\def\formulaA{1sin ()a θ-}\advance\mathindent-20pt\begin{equation}\label{eq:1}\formulaA\end{equation}如果需要在公式中加入空格,用 \注意:所有的公式都是斜体,但是一般不要用$$来讲文本斜体,而应该用\emph{},因为如果你的文本中有特殊字符就会被公式化:如sin gle, EM PTY 。
编辑算法:\begin{algorithm }\caption{The Skeleton of Gossip-based DLB Design algorithm } \label{alg-g-dlb} \begin{algorithmic } [1] \footnotesize\IF{the current time is in a \emph{gossip cycle}}\STATE Receive the \emph{gossip messages} ( \emph{aggregation message} and \emph{state-updating message} ) from the current node $g_i$'s neighbors.\STATE Compute the new aggregation values.\IF{load level change of the node > $dc_t$}\STATE Encapsulate a \emph{state-updating message}.\IF{$ dc_i< \overline {dc}+d_{p\min i}/(2c_i)$}\STATE Compute $hops\_distance_u$ , according to Formula \ref{eq:4}. \ENDIF\IF{\emph{state-updating message}'s $dc_j> \overline {dc}+d_{p\min i}/(2c_j)$} \STATE Compute $hops\_distance_o$ , according to Formula \ref{eq:5}. \ENDIF\STATE Send \emph{state-updating message} to its neighbors.\ENDIF\FOR{each \emph{state-updating message} transmitted from the current node $g_i$'s neighbors}\IF{\emph{state-updating message}'s $dc_j< \overline {dc}+d_{p\min i}/(2c_j )$} \STATE Put \emph{state-updating message} to \emph{uNList}.\ENDIF\IF{\emph{state-updating message}'s $dc_j> \overline {dc}+ d_{p\min i}/(2c_j )$} \STATE Put \emph{state-updating message} to $oNList$.\ENDIF\STATE \emph{state-updating message}'s $hops\_count$++.\IF{$hops\_count$ $<$ \emph{state-updating message}'s $hops\_distance$}\STATE Forward \emph{state-updating message} to its neighbors.\ENDIF\ENDFOR\ENDIF\IF{the current time is in \emph{epoch interval}}\IF{$dc_i > \overline {dc} + \ d_{p\min i} /(2c_i )$}\STATE Search its \emph{uNList} for \emph{underloaded nodes}.\STATE Sample some global nodes and search its stored \emph{uNList}.\STATE Perform \emph{Rank-based Autonomous Scheduler} in terms of $underloaded \ nodes$ selected.\ENDIF\ENDIF\end{algorithmic}\end{algorithm}编辑表格:\begin{table}\caption{Relative Coefficients} \centering\scriptsize\begin{tabular}{|l|l|}\hline \multicolumn{1}{|c|}{\textbf{Metric}}& \multicolumn{1}{|c|}{\textbf{Value or Scale}} \\\hline Bootstrap for aggregation & 10 cycles \\\hline Bootstrap for status gossip & 5 cycles \\\hline $f_0$ (rank criterion) & $0.6\sim0.8$ \\\hline Capacity of \emph{candidate\_list} & 3 \\\hline Sampling Times & 20 \\\hline\end{tabular}\label{tab:RelativeCoefficients}\end{table}加入图片:\begin{figure}\centering%\includegraphics[width=12cm, height=4cm]{scenario_uoNlist.eps}\includegraphics[scale=0.8]{Node-Selection-Perf.eps}\caption{Node Selection Preference}\label{fig:nsPre}\end{figure}\begin{figure}[ht]\centering\subfigure[Intialization State]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch0.eps}}\subfigure[After 1st $epoch$]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch1.eps}}\subfigure[After 2nd $epoch$]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch2.eps}}\subfigure[After 3rd $epoch$]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch3.eps}}\subfigure[After 6th $epoch$]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch6.eps}}\subfigure[After 9th $epoch$]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch9.eps}}\subfigure[After 12th $epoch$]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch12.eps}}\subfigure[After 15th $epoch$]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch15.eps}}\subfigure[After 18th $epoch$]{\includegraphics[scale=0.33]{snapshots/3Dstates_epoch18.eps}}\caption{$RAS$ Dynamic Load Balancing Effect Snapshots ($n=500$)}\label{fig:5}\end{figure}图片如何制作呢?–首先,必须是.eps格式的图像,因为这种图像是矢量图,不会失真。
一般的方法,如果是数据图,用gnuplot, 非常优秀的软件,都是例子。