我正在尝试更改特定条目中的“in”一词。具体来说,我希望除未发表和论文集外,所有类型的来源都应包含“in”。此外,我想将所有论文集元素中的“in”更改为“Künftig in”。
这是一个简短的 mwe
\documentclass[12pt, bibliography=totocnumbered, listof=totoc]{scrartcl}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=ext-authoryear,
maxbibnames=9, maxcitenames=3, uniquelist=false, uniquename=false,
useprefix=true, giveninits=true, dashed=false
doi=false,isbn=false,url=false,
date=year]{biblatex}
\renewbibmacro{in:}{%
\ifboolexpr{%
test {\ifentrytype{unpublished}}%
or
test {\ifentrytype{proceedings}}%
}
{}
\ifentrytype{inproceedings
}
{\printtext{\bibstring{Künftig in}\intitlepunct}}
{\printtext{\bibstring{in}\intitlepunct}}%
}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Hansen2011,
author = {Hansen, Peter R. and Lunde, Asger and Nason, James M.},
title = {The Model Confidence Set},
journal = {Econometrica},
year = {2011},
volume = {79},
number = {2},
pages = {453-497},
url = {https://EconPapers.repec.org/RePEc:ecm:emetrp:v:79:y:2011:i:2:p:453-497},
}
@InProceedings{Loeschel2018,
author = {Andreas Löschel and Benjamin Johannes Lutz and Shunsuke Managi},
title = {The impacts of the {EU} {ETS} on efficiency and economic performance {\textendash} An empirical analyses for German manufacturing firms},
booktitle = {Resource and Energy Economics},
year = {2018},
month = {mar},
doi = {10.1016/j.reseneeco.2018.03.001},
journal = {Resource and Energy Economics},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\textcite{Hansen2011} \textcite{Loeschel2018}
\printbibliography
\end{document}
我尝试重新定义
\renewbibmacro{in:}{%
\ifboolexpr{%
test {\ifentrytype{unpublished}}%
or
test {\ifentrytype{proceedings}}%
}
{}
\ifentrytype{inproceedings
}
{\printtext{\bibstring{Künftig in}\intitlepunct}}
{\printtext{\bibstring{in}\intitlepunct}}%
}
在这里添加这一行:
\ifentrytype{inproceedings}
{\printtext{\bibstring{Künftig in}\intitlepunct}}
但那不起作用。
答案1
在评论中发现,该问题背后的想法是引用@article
即将出现在特定期刊上但尚未确定卷数和页码的文献。
在这种情况下,我不会滥用@incproceedings
它来做不该做的事情。相反,我会pubstate
按照建议的那样使用Biblatex:为某些出版物添加“已提交”或“将出现在”。
\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\addbibresource{biblatex-examples.bib}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{loeschel,
author = {Andreas Löschel and Benjamin Johannes Lutz and Shunsuke Managi},
title = {The impacts of the {EU} {ETS} on efficiency and economic performance},
subtitle = {An empirical analyses for {German} manufacturing firms},
pubstate = {toappearin},
journal = {Resource and Energy Economics},
date = {2018-03-23},
doi = {10.1016/j.reseneeco.2018.03.001},
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\NewBibliographyString{toappearin}
\NewBibliographyString{submittedto}
\DefineBibliographyStrings{english}{%
toappearin = {to appear in},
submittedto = {submitted to},
}
\DefineBibliographyStrings{german}{%
toappearin = {künftig in},
}
\renewbibmacro*{in:}{%
\ifboolexpr{not test {\iffieldundef{pubstate}}
and (test {\iffieldequalstr{pubstate}{toappearin}}
or test{\iffieldequalstr{pubstate}{submittedto}})}
{\printtext{%
\printfield{pubstate}\intitlepunct}%
\clearfield{pubstate}}
{\printtext{%
\bibstring{in}\intitlepunct}}}
\begin{document}
\cite{loeschel,sigfridsson}
\printbibliography
\end{document}