减少.bib文件中的作者/标题/链接
princeton-bibreduce的Python项目详细描述
这是一个用于减少乳胶.bib文件的包,以包含您想要的内容。
无耻的插头:看看我们的book。
亚历克斯·泰特制作
安装
$ pip install princeton-bibreduce
用法
有三种方法可以调用同一个对象
1:unix命令行可执行文件:
$ princeton-bibreduce -cu myManuscript.aux
2:python命令行:
$ python -m bibreduce -cu myManuscript.aux
3:来自python代码:
import bibreduce bibreduce.main('myManuscript.aux', coauthors=True, urlLinks=True)
行为
生成.bib文件。默认情况下,它会将_proc后缀添加到生成的.bib。可自定义的字段是:
- 标题(标记-T)
- 合著者(标志C)
- doilinks(标志-d)
- urlinks(标志-u)
- 摘要(标记A)
指定标志将传输该字段。不在此列表中的所有字段都将被转移。
获得更多帮助:
$ princeton-bibreduce -h
链接的特殊行为
如果指定了链接格式,它将填充字段link。对于urlinks,它只复制url字段中的内容。对于doilinks,它将“http://dx.doi.org/thedoi”放在link字段中。
典型的tex工作流
这里的目标是从引用中删除标题并尝试添加url。
(可选)集中式BIB库
假设您有一个集中的bib库MasterLibrary.bibbib globals应该进入
OSX: ^{tt7}$
Linux: ^{tt8}$
Windows: ^{tt9}$
文本文件
假设您正在处理一个文本文件myManuscript.tex,其中包含:
\begin{document} The text of your paper. ... \bibliography{MasterLibrary} \end{document}
这将从您的集中库中提取。
flow
编译时使用:
$ pdflatex myManuscript.tex $ bibtex myManuscript.aux $ pdflatex myManuscript.tex
你的.aux文件包含了提取一个.bib所需的所有内容,这是这个手稿特有的。这是您使用此模块的地方:
$ princeton-bibreduce myManuscript.aux -cu
生成myManuscript_proc.bib。现在,返回到.tex文件并将参考书目更改为精简版:
\bibliography{myManuscript_proc}
再打一次,电话:
$ pdflatex myManuscript.tex $ bibtex myManuscript.aux $ pdflatex myManuscript.tex