我正在尝试设置我的配置文件,这样即使是书籍也biblatex
不会打印pagetotal
。我更愿意将信息保留在我的书目文件中,因此pagetotal
我想知道是否可以禁止打印这些信息,而不是删除那里的信息。
我尝试使用“ pagetotal=false
”,如下所示:文档
但是我收到一个错误,说命令未知:Package xkeyval Error: pagetotal undefined in families blx@opt@pre.
平均能量损失
%----------------------------------------------------------------------------
% LAYOUT
%----------------------------------------------------------------------------
\documentclass[
12pt,
a4paper,
%parskip,
headings=standardclasses,
listof=totoc,
numbers=noenddot
]{scrartcl}
\usepackage[hmargin=2.5cm, top=2.5cm, bottom=2cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}
\usepackage{hyphenat}% create hypen without overfull box
%----------------------------------------------------------------------------
% TOC
%----------------------------------------------------------------------------
\KOMAoptions{toc=sectionentrydotfill}
\KOMAoption{captions}{tableheading}% correct TOC count for tables
\renewcaptionname{ngerman}{\contentsname}{TOC}
\BeforeTOCHead[toc]{{\pdfbookmark[1]{\contentsname}{toc}}}% TOC in bookmarks
\AddtoDoHook{heading/preinit/part}{\clearpage\vspace*{\stretch{1}}}
\AddtoDoHook{heading/endgroup/part}{\vspace*{\stretch{2}}\clearpage}
\setkomafont{partprefix}{\usekomafont{part}}
%----------------------------------------------------------------------------
% BIB
%----------------------------------------------------------------------------
\usepackage[
backend=biber,
style=ext-authoryear,
sorting=nyvt,
datamodel=customstyles,
maxnames=25,
innamebeforetitle=true,
usetranslator=true,
alldates=terse,
labeldate=year,
dashed=false,
doi=false,
isbn=false,
url=false,
pagetotal=false
]{biblatex}
\AtEveryBibitem{\clearlist{language}}
\addbibresource{library.bib}
\usepackage[hidelinks, pdfencoding=auto]{hyperref}
\usepackage{microtype}% avoid bib formatting issues
%----------------------------------------------------------------------------
% MAIN
%----------------------------------------------------------------------------
\begin{document}
\nocite{*}
\clearpage
\printbibliography
\end{document}
我的 library.bib 文件:
@book{Lakoff.1987-WomenFireDangerous,
title = {Women, Fire, and Dangerous Things. What Categories Reveal about the Mind},
author = {Lakoff, George},
date = {1987},
publisher = {The University of Chicago Press},
location = {Chicago},
isbn = {978-0-226-46804-4},
pagetotal = {614},
}
答案1
链接的文档针对的是该包的样式biblatex-iso690
。biblatex-ext
和标准样式不支持pagetotal
选项。
您可以使用已经在使用的\AtEveryBibitem
- \clearfield
/ \clearlist
/技巧删除字段\clearname
language
\AtEveryBibitem{%
\clearlist{language}%
\clearfield{pagetotal}%
}
或者,您可以使用源映射在从文件读取数据时删除数据.bib
。这通常是我的首选,因为这样字段内容实际上根本不会被biblatex
Biber 看到,这意味着它们也不会影响排序等“不太明显的事情”。(源映射的另一个优点是您不必担心字段的“类型”[field/list/name],您可以对所有类型使用相同的习惯用法。)
MWE 与源图
\documentclass[12pt, a4paper,]{scrartcl}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[
backend=biber,
style=ext-authoryear,
sorting=nyvt,
maxnames=25,
innamebeforetitle=true,
usetranslator=true,
alldates=terse,
labeldate=year,
dashed=false,
doi=false,
isbn=false,
url=false,
]{biblatex}
\DeclareSourcemap{
\maps[datatype=bibtex, overwrite]{
\map{
\step[fieldset=language, null]
\step[fieldset=pagetotal, null]
}
}
}
\usepackage[hidelinks, pdfencoding=auto]{hyperref}
\usepackage{microtype}
\begin{filecontents}{\jobname.bib}
@book{Lakoff.1987-WomenFireDangerous,
title = {Women, Fire, and Dangerous Things. What Categories Reveal about the Mind},
author = {Lakoff, George},
date = {1987},
publisher = {The University of Chicago Press},
location = {Chicago},
isbn = {978-0-226-46804-4},
pagetotal = {614},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}