我有一个大型乳胶文档的草稿版本,其中包含很长的参考书目(超过 30 页)。它已创建biblatex
并包含大约 330 个条目。
我正在编辑草稿版本的打印件,我想创建一个简短版本的参考书目,以获得更紧凑的副本,其中包含
- 每个条目的 bibtexkey
- 数字(例如 [3])
- 以及条目的最重要数据(标题、年份、作者、出版地、页数) - 没有 URL
有没有一种简单的方法可以在单独的文档中做到这一点?
答案1
要向参考书目添加条目键,您可以重新定义。可以使用、和命令\begentry
省略参考书目中的数据,这些命令可以使用钩子执行。\clearfield
\clearlist
\clearname
\AtEveryBibitem
这些命令都不会影响书目数据,因此无需重新运行biber
/即可生成包含“简短”书目版本的文档bibtex
。以下代码提供了一个示例。
\documentclass{article}
\usepackage[style=numeric]{biblatex}
\usepackage{filecontents}
\newtoggle{draftbib}
% Comment this line for full bibliography
\toggletrue{draftbib}
\iftoggle{draftbib}
{\renewbibmacro*{begentry}{%
\printtext{\mkbibbold{\thefield{entrykey}}}\addcolon\addspace}
\AtEveryBibitem{%
\clearname{editor}%
\clearfield{subtitle}%
\clearfield{booktitle}%
\clearfield{booksubtitle}%
\clearfield{maintitle}%
\clearfield{mainsubtitle}%
\clearfield{url}%
\clearfield{doi}}}
{}
\begin{filecontents}{\jobname.bib}
@Article{bertram,
author = {Bertram, Aaron and Wentworth, Richard},
title = {Gromov invariants for holomorphic maps on Riemann surfaces},
journaltitle = {J.~Amer. Math. Soc.},
volume = {9},
number = {2},
date = {1996},
pages = {529--571}}
@Book{companion,
author = {Goossens, Michel and Mittelbach, Frank and Samarin, Alexander},
title = {The LaTeX Companion},
edition = {1},
publisher = {Addison-Wesley},
location = {Reading, Mass.},
date = {1994}}
@InBook{nietzsche,
author = {Nietzsche, Friedrich},
bookauthor = {Nietzsche, Friedrich},
editor = {Colli, Giorgio and Montinari, Mazzino},
title = {Unzeitgem{\"a}sse Betrachtungen. Zweites St{\"u}ck},
subtitle = {Vom Nutzen und Nachtheil der Historie f{\"u}r das Leben},
booktitle = {Die Geburt der Trag{\"o}die. Unzeitgem{\"a}{\ss}e Betrachtungen I--IV. Nachgelassene Schriften 1870--1973},
maintitle = {S{\"a}mtliche Werke},
mainsubtitle = {Kritische Studienausgabe},
volume = {1},
publisher = {Deutscher Taschenbuch-Verlag and Walter de Gruyter},
location = {M{\"u}nchen and Berlin and New York},
date = {1988},
pages = {243--334}}
@Online{ctan,
title = {CTAN},
subtitle = {The Comprehensive TeX Archive Network},
date = {2006},
url = {http://www.ctan.org}}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}