CTex的基本使用方法

来源:互联网 发布:互联网共享打印机端口 编辑:程序博客网 时间:2024/06/06 00:58

来自:http://blog.csdn.net/LHQJ1992/article/details/50458118 博客,那边代码显示比较清晰~

主要内容

  1. Latex简介
  2. 命令和环境
  3. 文档排版和组织
  4. 普通文本编辑
  5. 数学公式编辑
  6. 图形,插图,表格,文献等的编辑

一、Latex简介 
1、概述 
首先要从TEX介绍起。TEX是斯坦福大学的教授Donald E.Knuth(图灵奖获得者)开发的一个功能强大的幕后排版系统。他当时在撰写名为The Art of Computer Programming的书,由于出版商把他书中的数学式子排版得很难看,他决定推迟出版,自行研发一套排版系统进行排版。这个系统就是TEX系统。 
其次就是宏集(macro):把一些经常用到的功能,事先定义好,到要用的时候只引用一小段代码就可以实现一个相对复杂的功能,那不仅提高了排版效率,而且版面也会清晰很多。这种事先定义好的功能,叫做宏集(macro)。 
LaTeX就是TEX的众多宏集之一,也是比较实用的一个,是由Leslie Lamport编写的。编写的目的是使版面设置内容和文档的具体内容尽可能分离,让写文档的人更加专注于文档的撰写,而少花些心思在排版上。所以,LaTeX从本质上讲,就是TEX排版系统的一个宏集,将一些常用到的功能整合为文档类型中的设置,简化了TEX排版的工作量及难度。 
CTEX是利用TEX排版系统的CTEX中文套装的简称。它集成了编辑器 、WinEdt和 PostScript处理软件 Ghostscript 和 GSview 等主要工具。 CTeX中文套装在 MiKTeX的基础上增加了对中文的完整支持。 CTeX中文套装支持 CCT 和 CJK 两种中文 TeX处理方式。 
一般用windows操作系统的人会选择CTEX中的WinEdt软件作为编写LaTeX文档的工具,因为它里面会将latex命令改变颜色,并且将多种命令都集成到图形界面中,又简化了排版操作。 
2、Latex特点

  • TeX 系统是公认的数学公式排版最好的系统
  • TeX 文档是 ASCII 码的纯文本文件
  • 自动编号:章节,图表,公式定理,文献…
  • 自动生成目录,索引、章节,图表,公式定理,参考文献页码可以交叉使用
  • 输出直接生成pdf文件
  • TeX 是可编程的
  • 可以建立参考文献库…

Ctex套装下载链接(现在最小版本是2.9),下载完整版本(CTeX_2.9.2.164_Full.exe)安装好就行。

<code class="hljs  has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">    TeX 不是在一个下午就能完全学会的,本文只是列出一些常用的基本方法。</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>

安装好CTex之后,在安装好的目录中可以看到一下几个文件夹:

  • WinEdit: 功能强大的文本编辑器(主要使用的
  • MikTeX: 一个TeX系统,核心
  • Yap: 打印‘.dvi’文件
  • Ghostscript: 将‘.dvi’文件转化为‘.ps’文件
  • gsview: 打印‘.ps’文件

    WinEdt主界面 
    这里写图片描述

一个简单的例子

  • 创建并编辑你的源文件
  • 运行LATEX 编译你的源文件
  • 来预览得到的pdf文件
<code class="hljs mathematica has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">\documentclass<span class="hljs-list" style="box-sizing: border-box;">{article}</span>\begin<span class="hljs-list" style="box-sizing: border-box;">{document}</span><span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">Small</span> is beautiful.\end<span class="hljs-list" style="box-sizing: border-box;">{document}</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li></ul>

shift+ctrl+p运行,得到一个文件夹,里面有生成好的pdf文档 
这里写图片描述 
test.pdf就是生成好的文档,内容就是Small is beautiful.

当我们要投某个期刊时,一般该期刊都会提供一个Tex的包,这个包就是期刊提供的论文排版格式,我们只需要在它的文件了进行编辑就行。

二、环境和命令 
这里以Information and Computation(INDAC)期刊的模板为例。 
这里写图片描述

文档目录结构 
.tex 
.bib 参考文献库 
.cls 规定正文格式 
.bst 规定参考文献格式 
.sty 模版宏包 
以及示例、说明、帮助等辅助文档

用WinEdt打开.tex文件,这个就是该期刊的格式文档,我们在里面进行编辑就行。

在第一节中有用到一个小例子,其中有\begin{document}和\end{document},这两个就是简单的环境设定。 
1、环境介绍 
环境用\begin{..}和\end{…}来设定 
作用:对环境内的所有文本进行统一格式 
例: \begin{verbatim} ….\end{verbatim} 
一般格式: 
\begin{<环境名>} 
… … …… 
\end{<环境名>} 
直接单击‘insert’菜单中的有关条目

比如在IDNAC提供的格式文档中

<code class="hljs tex has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\begin</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>abstract<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span>This template helps you to create a properly formatted <span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\LaTeX</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\ </span>manuscript.<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\end</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>abstract<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\begin</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>keyword<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\texttt</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>elsarticle.cls<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\sep</span> <span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\LaTeX</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\sep</span> Elsevier <span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\sep</span> template<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\MSC</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">[</span>2010<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">]</span> 00-01<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\sep</span>  99-00<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\end</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>keyword<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li></ul>

其中的\begin{abstract}、\end{abstract}、\begin{keyword}、\end{keyword}就是一个摘要和关键字的环境。

还有一个就是在文档中要用数学公式或者其它排版,可以用到

<code class="hljs mathematica has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">\usepackage<span class="hljs-list" style="box-sizing: border-box;">{amssymb, amsthm, amsmath}</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>

就有点像是C++中的include一样。

2、文档内容编辑的命令与环境 
这里以IANDC期刊的格式为例子,该期刊提供了论文编辑的格式包。 
文档目录结构: 
.tex 
.bib 参考文献库 
.cls 规定正文格式 
.bst 规定参考文献格式 
.sty 模版宏包 
以及示例、说明、帮助等辅助文档 
这里写图片描述

1、文本编辑命令

环境用\begin{..}和\end{…}来设定 
作用:对环境内的所有文本进行统一格式 
例: \begin{verbatim} ….\end{verbatim}

如IANDC期刊论文格式中:

<code class="hljs tex has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\begin</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>abstract<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span>This template helps you to create a properly formatted <span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\LaTeX</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\ </span>manuscript.<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\end</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>abstract<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\begin</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>keyword<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\texttt</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>elsarticle.cls<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\sep</span> <span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\LaTeX</span><span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\sep</span> Elsevier <span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\sep</span> template<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\MSC</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">[</span>2010<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">]</span> 00-01<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\sep</span>  99-00<span class="hljs-command" style="box-sizing: border-box; color: rgb(0, 0, 136);">\end</span><span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">{</span>keyword<span class="hljs-special" style="box-sizing: border-box; color: rgb(102, 102, 0);">}</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li></ul>

其中的\begin{abstract}、\end{abstract}、\begin{keyword}、\end{keyword}为摘要和关键字的编辑命令。

<code class="hljs applescript has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">\section{The Elsevier article <span class="hljs-type" style="box-sizing: border-box;">class</span>}\<span class="hljs-property" style="box-sizing: border-box;">paragraph</span>{Installation} If <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">the</span> document <span class="hljs-type" style="box-sizing: border-box;">class</span> \emph{elsarticle} <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> available <span class="hljs-function_start" style="box-sizing: border-box;"><span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">on</span></span> your computer, you can download <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span> install <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">the</span> system package \emph{texlive-publishers} (Linux) <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> install <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">the</span> \LaTeX\ package \emph{elsarticle} using <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">the</span> package manager <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">of</span> your \TeX\ installation, which <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">is</span> typically \TeX\ Live <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">or</span> Mik\TeX.</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li></ul>

其中\section、\paragraph为标题和段落的编辑命令等等。

2、数学公式的添加命令 
注意:CTex是可编程的,所以在添数学公式时,需要”引用“包才能添加数学公式,这也是根据文档格式来进行排版的一种方式,如

<code class="hljs mathematica has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">\usepackage<span class="hljs-list" style="box-sizing: border-box;">{amssymb, amsthm, amsmath}</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li></ul>

其他的一些排版,如图片、表格都需要用此方法\usepackage{...} 
首先看一下在latex中添加数学公式需要用到的一些命令: 
这里写图片描述 
这里写图片描述 
只要在tex文件中添加这些数学公式的命令,在对应生成的pdf文件中就会出现对应的数学公式符号。 
但是这么多公式怎么记住了?不用记住!我们可以用MathType数学编辑软件来添加公式,直接复制粘贴就可以。 
注意:要使Mathtype的中编辑的公式可以拷贝到tex文件中,先要对MathType进行设置–>点击Preferences->Cut and Copy…,在这里面设置复制到tex格式。 
这里写图片描述

2、图表添加命令环境 
如上所述,添加图表,也要添加对应的格式包\usepackage{...} 
这里写图片描述 
[具体的图表添加方式可参考此博客](http://blog.sina.com.cn/s/blog_976290d401014bv1.html) 
这里写图片描述 
这里写图片描述

3、参考文献 
这里写图片描述 
参考文献不用我们自己像在word一样去用交叉引用,只需要在.bib文件中添加对应的参考文献,在tex文件中用/cite引用对应文献的lable名称就行,这个lable是我们自己给参考文献取的名字,便于我们自己区分是哪一篇论文。 
如IANDC期刊中用\bibliography{mybibfile}mybibfile就是参考文献的.bib文件。 
在.bib文件中的参考文献格式如下(其中的lable就是Dirac1953888),那么在文中对应该文献的引用格式就是\cite{Dirac1953888}

<code class="hljs applescript has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">@article{Dirac1953888,  title   = <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"The lorentz transformation and absolute time"</span>,  journal = <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"Physica "</span>,  volume  = <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"19"</span>,  <span class="hljs-type" style="box-sizing: border-box;">number</span>  = <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"1-–12"</span>,  pages   = <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"888--896"</span>,  <span class="hljs-property" style="box-sizing: border-box;">year</span>    = <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"1953"</span>,  doi     = <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"10.1016/S0031-8914(53)80099-6"</span>,  author  = <span class="hljs-string" style="color: rgb(0, 136, 0); box-sizing: border-box;">"P.A.M. Dirac"</span>}</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li><li style="box-sizing: border-box; padding: 0px 5px;">10</li></ul>

这个格式不用我们自己去写,比如在百度学术中找到参考文献, 
这里写图片描述 
选择BibTex就可以,打开之后得到如下结果:

<code class="hljs mathematica has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">@article<span class="hljs-list" style="box-sizing: border-box;">{杨金锋2004一种新型的基于内容的图像识别与过滤方法,  title={一种新型的基于内容的图像识别与过滤方法}</span>,  author=<span class="hljs-list" style="box-sizing: border-box;">{杨金锋 and 傅周宇 and 谭铁牛 and 胡卫明 and 北京}</span>,  journal=<span class="hljs-list" style="box-sizing: border-box;">{通信学报}</span>,  volume=<span class="hljs-list" style="box-sizing: border-box;">{25}</span>,  number=<span class="hljs-list" style="box-sizing: border-box;">{7}</span>,  pages=<span class="hljs-list" style="box-sizing: border-box;">{93-106}</span>,  year=<span class="hljs-list" style="box-sizing: border-box;">{2004}</span>,}</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li><li style="box-sizing: border-box; padding: 0px 5px;">6</li><li style="box-sizing: border-box; padding: 0px 5px;">7</li><li style="box-sizing: border-box; padding: 0px 5px;">8</li><li style="box-sizing: border-box; padding: 0px 5px;">9</li></ul>

对应不同的期刊,对其各个部分进行相应的调整就行了。

0 0
原创粉丝点击