ctex 和 bib

牛人写文章起点都比较高。但是不容易操作。 我给一个apj的 模板

首先下载 apj.bst 保存到你自己的tex同目录下。

然后生成你自己的bib 文件放到tex同目录下(格式参见ads的,我是从ads上直接导出 ,例如我下面用到的名字是lgrb_re .bib)。

然后你的tex文章中加入红色那句。

\documentclass[12pt,preprint,epsfig]{aastex}

\bibliographystyle{apj}

\begin{document}

………………

\bibliography{lgrb_ref}
\end{document}
\bibliography{lgrb_ref}
\end{document}

运行 BibTeX

http://latex.yo2.cn/articles/latex-bibtex-introduction.html
分为下面四步

  • 用LaTeX编译你的 .tex 文件 , 这是生成一个 .aux 的文件, 这告诉 BibTeX 将使用那些应用.
  • 用BibTeX 编译 .bib 文件.
  • 再次用LaTeX 编译你的 .tex 文件, 这个时候在文档中已经包含了参考文献, 但此时引用的编号可能不正确.
  • 最后用 LaTeX 编译你的 .tex 文件, 如果一切顺利的话, 这是所有东西都已正常了.

arxiv 问题和解决

先 在 你下载的apj.bst 中的 ENTRY添加如下

ENTRY

{ address

author

booktitle

chapter

edition

editor

howpublished

institution

journal

key

month

note

number

organization

pages

publisher

school

series

title

type

volume

year

eprint

}

然后 替换 FUNCTION {article} 为如下

%%%%%%%  End of functions from astrobib

FUNCTION {article}

{ output.bibitem

format.authors “author” output.check

author format.key output

name.or.dash

format.date “year” output.check

date.block

crossref missing$

{ journal

“journal” output.check

pages empty$   %判断是否包含页面项

{eprint output}  % 输出eprint项

{format.vol.num.pages output} %正常输出

if$

}

{ format.article.crossref output.nonnull

format.pages output

}

if$

format.journal.pages

format.note output

fin.entry

}

Leave a Reply

You must be logged in to post a comment.