本文记录自己第一次使用 LaTeX 模板写作的整个经过, 其中涉及到模板的安装、REVTeX 的写作方式、写作中遇到的问题及其解决策略。如有不当之处请提示更正,有更好的方法请不吝赐教,谢谢。
软件环境:
win7_64;
MikTeX 2.9.5845;
Sublime Text 3(with LaTeXTools)
如何安装模板?
首先使用文档类revtex4-1
\documentclass{revtex4-1}
可以随便写点内容编译一下,这样就完成了Revtex4-1宏包下载和安装。好了可以开始正式使用了。(其实这一步不要也可,等到真正的写了点东西以后在编译也行,但是先编译的话可以得到说明文档和模板直接在模板里面写东西就可以了,我现在就是在模板里面写东西的)
APS的模板是这样的
\documentclass[aps,prl,preprint,groupedaddress]{revtex4-1}
\begin{document}
\title{}
\author{}
\email[]{Your e-mail address}
\affiliation{}
\date{\today}
\begin{abstract}
\end{abstract}
\pacs{}
\maketitle
\bibliography{basename of .bib file}
\end{document}
下面开始给出折磨人的TroubleShooting
大部分问题在 FAQ 里面已经说明了。
- 如何用双栏?
这个在文档说明(C:\Program Files\MiKTeX 2.9\doc\latex\revtex\auguide\auguide4-1.pdf)中已经写清楚了。twocolumn 或者 reprint都可以的,我比较喜欢 PRL 的最终排版格式,所以直接就选择了 reprint 选项。
A layout option such as preprint (single-column formatting), reprint (an approximation to the selectedjournal’s actual layout which may be one- or twocolumn depending on the journal), or twocolumn
- 选择了PRL 的 reprint 为什么字体却不一样呢?
因为 Revtex4-1 没有对字体进行设定(我猜的,管他那么多呢,没工夫研究这破玩意)
直接生成的 PDF 文档里面的字体真的很难看,显得特别细而柔弱,而 PRL 里面的文字颜色比较重,笔画有力。
搜素了一下LaTeX如何设定整篇文章字体,这个还真是没有多少参考,最后在 在一个外文网站tex.stackexchange找到答案
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
这样使用的是接近于 Times 的字体。
- 多个作者共用一个机构如何处理? 并且其中某些作者有多个机构
这都不是事!模板里面的注释都说明了——使用superscriptaddress
- 作者邮箱不显示?
在第一个作者 的前面添加 \noaffiliation,然后在开始正常的按照模板给的格式书写即可,不知道为什么会这样。
- 参考文献中期刊名称如何实现自动缩写?
从EN里面使用jabref格式导出的bibtex期刊名称全是原样输出,使用Revtex,prl的默认文献风格bst是不能够实现自动转换为缩写的,需要自己进行修改需要注意的是 bst 并没有帮助实现自动缩写的功能,肯定有软件或者命令支持的,因为没有理由不支持呀。可以借助于Jabref来实现全称变为缩写然后导出bib条目即可。
Jabref 的 GUI 更新了,现在还可以,官网就更好看了。以前的真是惨不忍睹
- 参考文献中的人名缩写问题
由于各个网站上提供的 ris 源文件的格式不统一,一些 人名是 Axx Bxx Zhang, 另一些是 CxxDxx Wang,这样在生成参考文献的时候是完全不一样的,前者是 A. B. Zhang 后者是 C. Wang。而这个和是完全不能接受的。
另外外国人名也存在相似的问题,Exx-Fxx Steve, Gxx Hxx Smith, 将分写缩写为 E. Steve 和 G. H. Smith, 这同样也是不可接受的。
只能去文献里面查找他们自己是怎么写自己的名字的,或者 别人是如何引用的。然后在 bib 里面进行修正。
从官网上下载 bib 条目保持原样即可,虽然这会使得某些人名格式不统一
- 一个ref中引用多个 bib 条目
\cite{feynman,*bohr}
将后面的加上*即可
- 参考文献中加入文字说明
How can I add additional text to a bibliography entry?
Another feature of natbib and REVTeX 4.1 is to allow the prepending or appending of text to an entry in the bibliography. This is done via\cite{*[{*prepended text*}][{*appended text*}]*key*}
. Note the use of the curly braces within the square bracket to avoid problems with the processing of the text. See the REVTeX 4.1 documentation for more information.
注意:这里面给的代码不是很合适,现做一些解释:
{}外面的 * 表示不加编号;而{}里面的内容按照LaTeX的语法将会原样输出(空格除外,一个空格会原样输出 而多个连续的空格只会输出一个);
至于key处是否需要 **呢? 可以实验 一下,如果加一颗星或者两颗星,key其实已经变化成 加星之后的了,已经是另外一个 key了,不出意外的话编译器会抛出错误
C:/xxx.tex:192: Package natbib Warning: Citation `*PetzoldAPB1996' on page 1 undefined on input line 192.
看着了吧,未定义,如果你的bib里面恰好还真有一个*PetzoldAPB1996的条目,那么恭喜你成功地引用错误了。
正确的格式是:
\cite{[{See, e.g.,~}][{ for air; }]PetzoldAPB1996,*[{See, e.g.,~}][{ for aluminum.}]AndrewsMSEA1999}
注意一下在
for air;
的两侧和
for alulminum.
的前侧都有一个空格。第一个
See, e.g.,
后面还有一个
~
这个也是表示空格的,在最终进行了原样输出。
在第一个item恰门面没有添加 星号,而第二个item前面添加了 星号,这就是说第二个item不会被编号而第一个会,而不编号的item将会合并在他前面的那个item中一起输出;如果我们给第一个item也加上 星号那么这两个会一块合并到 8 号文献(也就是8号文献中将会出现3个文献,哈哈哈)
- 一次cite多个bibitem时候PDF里面出现"?"
这是由于\cite{}
里面存在多余的逗号,
注意所有的逗号只能出现在 两个 bibitem之见,不要有最后写逗号的坏毛病
- 参考文献 需要单独来一个bib文件吗?
在 FAQ 里面已经说明了这个问题了,在最后提交的时候把bbl文件拷贝到tex文档。所以最后的提交就是 tex 文档以及 图片 (以及 Supplementary materials)
BibTeX will have created a .bbl file. When submitting to APS or AIP journals, we ask that youinclude the final .bbl directly into the main .tex file.
Tips for Authors也说了:For REVTeX and LaTeX files, please run BibTeX before submitting your paper, and read-in (i.e., \input) orpaste the resulting .bbl file within the reference section of your paper.
只要把文献信息写到 tex 文档中就可以了,单独的 bib 文档是不必要的,而且也没有什么价值的。
注意一下这里面的 bbl 文件有两种处理方式:
- 保留 bbl 文件,并使用
\input
命令; - 不保留 bbl, 直接将 所有内容复制到 tex档
今后只维护一个 bib 文件 C:/EndNote/Meta
即可。
待编译完成后把 bbl 里面的 信息全部拷贝到 tex 里以替换\bibliography{C:/EndNote/Meta}` 语句。 这样就可以把 tex 走哪带哪了(不要忘了图片啊)
- [Web Submission Guidelines](http://journals.aps.org/authors/web-submission-guid
elines-physical-review)File formats--TeX
Text files should be formatted in REVTeX (preferred), LaTeX, or some varieties of plain TeX. The file must be in ASCII containing no control codes, with line lengths of 80 characters or less【还得老老实实的一句一行地写,但是这显然是一个及其不合理的规定,他没有任何理由不支持多余80字符的一行数据,如果说在这个年代 APS 的系统还没有能力来处理这个,那么只能说这个系统是一个垃圾】【顺便了解一下到底 ASCII 文件为何物。 What is an ASCII file? When do you use an ASCII file? What can you do with an ASCII file? Which ASCII format is the best for your client?】. Submissions in MSWord, PostScript and PDF are also acceptable; although their use is extremely limited in either the peer review or production process.
[顺便说一下,其实APS的投稿系统是可以支持 超过 80字符的 源文档的,嘿嘿,无聊的时候试了一下。而且呢还有个特点,我的图含有像素元素的话会变得非常大,但是经过 APS 系统处理之后生成的PDF会非常小,这样一来,野菊没有必要再去转换格式或者使用其他软件进行压缩处理了,除非是 出版社真的对图片的尺寸有要求。]
The advantage of using the REVTeX macro package is that extensive use can be made of the electronic text file during the peer review process. This helps make the process much more efficient and quick. In addition, the file will be used in the production of the copy-edited proof and final published article, via a conversion process to our production formats. The conversion process ignores most formatting instructions and instead captures the structure "tagged" by the REVTeX macros (for example the title in a \title{} macro), rendering the final manuscript in the standard style for the journal. Please use the REVTeX macros, character sets, and other LaTeX commands as outlined in the REVTeX Input Guide and the examples accompanying the macro package.Additional low-level formatting commands and macrosshould not be introduced, although keystroke-saving macros (for example: \def\be{\begin{equation}}) are acceptable.Text and math fonts, line spacing, type size, headings, margins, table and equation layout, and detailed character positioningare among the items controlled by the production process, and should not be the focus of significant author effort. If exceptions to the standard style are necessary they may be introduced at the proof stage. For non-REVTeX or non-MSWord electronic manuscripts we have found it significantly less expensive to re-key; more care is required by the author at the proof stage to ensure that errors have not been introduced in this process. You may find the linked general tips on generating Physical Review style with TeX and REVTeX useful.File formats--Figure
the preferred format for figures transmitted electronically is PostScript or Encapsulated PostScript; EPS is a subset of PostScript with some structural conventions. Photographic images should be submitted as high resolution JPEG or PNG files. All figure files pertaining to a manuscript should have the same format[必须保证所有图片的格式一致]. Each figure should be contained in a separate file, clearly labeled either with a comment line near the top of the file, or preferably with a label on the figure itself, outside the image area. Figures with well-separated parts (a, b, c, etc.) can be sent either as separate files for each figure part, or as a single file including all parts on one page. PostScript files should print correctly when sent by themselves to our PostScript printer; EPS files should print correctly at a reasonable size when a "showpage" command is appended. Please check all files by sending them to a PostScript printer that has not had any fonts or scripts downloaded to it. PostScript or EPS figures may be referenced from within the manuscript file using the psfig, epsf or other applicable LaTeX macros. Figure captions and call-in commands, if any, should be in the last portion of the manuscript file.
- 钱钱钱
Publication Charges and Reprints for Physical Review Letters
To help defray editorial and production expenses, authors of published Letters are expected to pay a publication charge of $740 ($265 for a Comment or Reply). Charges are higher ($925 for a Letter, $340 for a Comment or Reply) for those that are not submitted in an acceptable electronic format. Acceptable formats are REVTeX (preferred), LaTeX, plain TeX, MS Word; PostScript figures (preferred). Upon acceptance, authors will receive a unique link to the Copyright Clearance Center's (CCC) RightsLink system. APS has partnered with CCC to provide our authors with an online, web-based interface, RightsLink, to pay for various author charges, including applicable publication charges. Charges for color figures and reprints are separate from these publication charges.
- 注意,巨坑来袭!!!
@Article{XieNC2014,
author = {Xie, Yangbo and Wang, Wenqi and Chen, Huanyang and Konneker, Adam and Popa, Bogdan Ioan and Cummer, Steven A.},
title = {Wavefront modulation and subwavelength diffractive acoustics with an acoustic metasurface},
journal = {Nat. Commun.},
year = {2014},
volume = {5},
number = {5553},
url = {http://dx.doi.org/10.1038/ncomms6553},
type = {Journal Article},
5553明明是 number 非得改成 pages才行,因为 apsrev4-1 只输出 pages,不输出 number
好了,折腾了半天了,真的有半天了。
- 图片问题
PostScript or EPS preferred
Tips for Authors【嵌入特殊字体】Although we discourage the use of any unusual fonts, if it is necessary, please embed these type fonts in your PostScript or EPS files so that we are able to generate proper output.Is there a way to convert .jpg (.jpeg) files to .ps or .eps?
Tables and figures
Figures should be planned for the column width (8.6 cm or 3 3/8 in.) of the journal. If the detail shown requires it, 1.5 or 2 columns may be used.【如果必要可以使用1.5栏或者双栏图片】
^
Figures must be prepared so that the details can be seen after reproduction.
^
Photographic images (either grayscale or color) should be submitted electronically as high-resolution JPEG or PNG files.【注意这里所说的是 相机产生的图片而不是说所有的位图都应该这样,他们还是喜欢接收 PS的】
^
In order to reproduce figures, tables, etc., from another journal, authors must show that they have complied with the requirements of the publisher of the other journal, possibly including written agreement of both publisher and author of the originally published work. (If the original journal is published by APS, only the written agreement of the original author is required to reproduce a few figures or tables.)
- They must have a clear background and unbroken lines with as much black-white contrast as possible.
- The symbol width and lettering height on the journal page should be at least 2 mm.
- Avoid small open symbols that tend to fill in, small dots and decimal points, and shading or cross-hatching that is not coarse enough to withstand reproduction.
- Curves should be smooth; curves and lines should have consistent line widths of sufficient weight [final weight of at least 0.18 mm (0.5 point)].
- The resolution of the drawing software and output device should be set as high as possible (preferably 600 dpi or higher).
Figures should be numbered in the order in which they are referred to in the text.【图片文件以序号命名】
- Each figure must have a caption that makes the figure intelligible without reference to the text; list captions on a separate sheet. Text should be placed in the caption, not on the figure.
- Groups of figures that share a (single) caption must be labeled "(a), (b)," etc. 【子图应当以这种形式标记】
- The figure itself should have properly labeled axes with correctly abbreviated units enclosed in parentheses. Use consistent lettering and style as in the body of the text (correct capitalization, unslashed zeros, proper exponential notation, superscripts and subscripts, decimal points instead of commas, etc.). Use the form R (10³ Ω), not R×10³ Ω. Use half spacing within compound units, not hyphens or periods. Avoid ambiguous usage of the solidus ("/"�), e.g., (mb/MeV sr), not (mb/MeV/sr). When possible, integer numbers should be used on the axis scales of figures, e.g., 1, 2, 3, or 0, 5, 10, not 1.58, 3.16, 4.75. Decimal points must be on the line (not above it); do not use commas instead. Use the same number of digits to the right of the decimal point for all numbers on the axis scales. A number must be both before and after the decimal point, e.g., 0.2, not .2. For complete instructions see the Physical Review Style and Notation Guide.
- 图片的label问题
在 Frequently Used Memos 页面上找到 Axis Labels and Scales on Graphs 这里面给出了详细的说明,如果没有说明的参照图中给出的样子去做就行了,或者翻一翻最近的几期文章。- 不要使用 E 这种程序表示方法来标记图片
- 横纵坐标都需要 Label (例如带结构的 Reduced Wave Number)
If your attempted submission is not successful, please do not begin a new submission. Please continue with the same attempted submission, or send a message to [email protected] for further assistance. Do not start numerous, unnecessary submissions.
When sending a message for assistance to [email protected], please be sure to include the full text of any error messages received. This will help us to determine quickly and resolve the source of any problems encountered.
Axis Labels and Scales on Graphs
File formats, figures, video (includes MSWord instructions and submission of color figures for online publication)
For direct use in the journal production process, to avoid an intermediate bitmap or scanning step, figure files should meet the following additional requirements:
- For figures with parts (a, b, c, etc.) all parts must be included in one file containing the entire figure.
- The printed size of the figure should be as close as possible to the final size to appear in the journal - the standard is 8.5 cm maximum width for one column.
- Any resolution-dependent graphics should be drawn with at least 600 dots per inch (dpi) resolution for pure or mixed line art, and at least 264 dpi for color or halftone images.
- Figures not intended to be printed as color reproduce best when they contain only grayscale (or black and white) graphics.
顺便说一下,文档格式使用 Revtex, 图片采用 PS
http://journals.aps.org/authors/web-submission-guidelines-physical-review#submit%20a%20manuscript
Each figure file should be described as such and must have a number, for example, "3" or "3c" if only part of figure 3. It is quite acceptable to have a file figure called, for example, graph.ps, but it should be described with an appropriate number such as Fig number 1. Only in those rare instances when a table is formatted using PostScript should the description "Table" be used.
- Submission of Supplemental Material**
- 暂时没有其他问题了
预计不能达到 PRL 要求,改投 APL
APL 同样使用 RevTex4-1 来 写作(其实这个就是他们两家自己定制出来的 LaTeX 模板)
APL 和 PRL 在结构和格式上的要求是一致的,但是具体的细节还是有些差别的,例如:
- 单栏图片 最大 85mm(PRL是86mm)
- APL 对图片中的字号大小有明确要求 (>8pt)
- APL的模板中文献引用统一为 上标形式。【如果想使用普通正文样式需要使用
\onlinecite
命令】
最后 APL 悲剧了。。。