zoukankan      html  css  js  c++  java
  • 用Latex写IEEE论文

    如果在搞科研,想在IEEE上发表文章,那么就不得不用IEEE的论文模板,分为doc版本和Tex版本。Tex是高德纳·纳什所写,大牛级的任务,写过《计算机程序设计艺术》,曾经是美国最年轻的科学院院士(入院年龄),三十多岁。Tex写论文排版十分容易,擅长公式编辑。然而,由于Tex是基于命令式的文本编辑器,不是“所见即所得”的模式,并且包含了大量的内容,所以学习起来比较吃力,但是一旦掌握了会发现word太弱了。本文主要介绍在IEEE模板下如何进行编写。

    首先安装CTEX,其是Latex的中文套件,包含了丰富的package,易于使用。当然之后就是漫长的学习了,跟学习编程一样,边学习,边编程,事半功倍。

    然后,应当看IEEE给出的IEEEtran_HOWTO.pdf,其中详细介绍了如何在该模板下进行论文排版。

    最后,有恒心,有毅力,有耐心地解决碰到的问题。

    下面介绍几种常用的,并且容易犯错的。

    (一)插入图片

    Latex对于eps格式的图片支持的很好,而其它格式却没有这样幸运,所以建议使用eps的图片,这样对于图片操作就简单多了。

    包含usepackage{graphicx}

    插入一个图片

    [Math Processing Error]

    如果想并排插入多个图片,并且进行编号:

    [Math Processing Error]

    (二)公式

    Latex对于公式的处理主要有三种方法

    a. 使用$符号,对于公式y=x^2+z,可以写成$y=x^2+z$。其中^表示上标,_表示下表。

    b.采用displaymath,提供公式环境

    [Math Processing Error]

    c. 采用enquation,displaymath没有公式编号,而enquation有。

    (三)算法(伪代码)

    一般来说,只需要如下形式就可以了

    documentclass{article}
    usepackage{algorithm}
    usepackage{algorithmicx}
    usepackage{algpseudocode}
    egin{document}


    egin{algorithm}
    caption{Euclid’s algorithm}label{euclid}
    egin{algorithmic}[1]
    Procedure{Euclid}{$a,b$}Comment{The g.c.d. of a and b}
       State $rgets amod b$
       If{sfdfdsa}
       State sdfsadf
       EndIf
       While{$r ot=0$}Comment{We have the answer if r is 0}
          State $agets b$
          State $bgets r$
          State $rgets amod b$
       EndWhilelabel{euclidendwhile}
       State extbf{return} $b$Comment{The gcd is b}
    EndProcedure
    end{algorithmic}
    end{algorithm}


    end{document} 

    然而对于IEEE的模板,就不能同时使用

    usepackage{algorithm}
    usepackage{algorithmicx}
    usepackage{algpseudocode}

    会报一个algorithmic重复定义的错误,猜想有可能是包含的package冲突,所以就不能使用If等等一些列的宏,只能供使用IF,ENDIF等全大写的宏。

    例子如下:

    usepackage{algorithm}
    usepackage{algorithmicx}

    egin{algorithm}[!h]
    caption{Routing algorithm}
    egin{algorithmic}[1]
    IF{there is a packet Px coming from X-}
        IF{$x eq x_t(Px)$}
            STATE $ST(S_X)=ON$
            STATE $ST(S_F)=ON$

       ENDIF

    ENDIF

    end{algorithmic}

    end{algorithm}

    这里一定要注意IF和ENDIF要匹配,否则会报错。

    from: http://blog.csdn.net/lingdongjiangzhi/article/details/7581889

  • 相关阅读:
    1451. Rearrange Words in a Sentence
    1450. Number of Students Doing Homework at a Given Time
    1452. People Whose List of Favorite Companies Is Not a Subset of Another List
    1447. Simplified Fractions
    1446. Consecutive Characters
    1448. Count Good Nodes in Binary Tree
    709. To Lower Case
    211. Add and Search Word
    918. Maximum Sum Circular Subarray
    lua 时间戳和时间互转
  • 原文地址:https://www.cnblogs.com/GarfieldEr007/p/5560179.html
Copyright © 2011-2022 走看看