![如何在 biblatex 中的程序类型中添加电子标识符 (eid) 字段](https://linux22.com/image/306454/%E5%A6%82%E4%BD%95%E5%9C%A8%20biblatex%20%E4%B8%AD%E7%9A%84%E7%A8%8B%E5%BA%8F%E7%B1%BB%E5%9E%8B%E4%B8%AD%E6%B7%BB%E5%8A%A0%E7%94%B5%E5%AD%90%E6%A0%87%E8%AF%86%E7%AC%A6%20(eid)%20%E5%AD%97%E6%AE%B5.png)
默认情况下,在 biblatex 中,论文集条目不支持 eid 字段(电子标识符)。在文章条目中,打印的是 eid 而不是页码,请参阅以下 MWE:
\documentclass{scrbook}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage[%
citestyle = alphabetic,
bibstyle = ieee-alphabetic,
labelalpha = true,
defernumbers = true,
backend = biber,
maxalphanames = 1,
firstinits = true,
abbreviate = true,
bibencoding = utf8,
dateabbrev = true,
maxbibnames = 10,
minbibnames = 3
%eprint = true
]{biblatex}%
\bibliography{./Literatur.bib}
\DeclareFieldFormat{eid}{Art. \addnbspace #1}
\begin{filecontents}{./Literatur.bib}
@article{ibrahim_spectral_2010,
title = {Spectral imaging method for material classification
and inspection of printed circuit boards},
author = {Ibrahim, Abdelhameed and Tominaga, Shoji and
Horiuchi, Takahiko},
journal = {Optical Engineering},
volume = 49,
number = 5,
eid = 05720,
year = 2010
}
@inproceedings{gruna_optical_2012,
author = {Gruna, Robin and Beyerer, Juergen},
title = {Proc. Optical feature extraction with illumination-encoded
linear functions},
series = {Proceedings of SPIE},
year = 2012,
booktitle = {Image Processing: Machine Vision Applications V},
volume = 8300,
eid = 830004
}
\end{filecontents}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
我如何修改会议录入类型以像文章中一样打印 eid 字段(而不是在相同位置打印页码)?
答案1
我们可以重新定义打印页码和章节的宏,以便eid
通过以下方式输出
\renewbibmacro*{chapter+pages}{%
\printfield{chapter}%
\setunit{\bibpagespunct}%
\printfield{eid}
\setunit{\bibpagespunct}%
\printfield{pages}%
\newunit}
这也允许eid
和pages
同时存在。(请注意,我们本质上将eid
和视为pages
相同,因为它们前面都有和\bibpagespunct
,而不是标准的\newunitpunct
。)
平均能量损失
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage{filecontents}
\usepackage[utf8]{inputenc}
\usepackage[%
citestyle = alphabetic,
bibstyle = ieee-alphabetic,
labelalpha = true,
defernumbers = true,
backend = biber,
maxalphanames = 1,
firstinits = true,
abbreviate = true,
bibencoding = utf8,
dateabbrev = true,
maxbibnames = 10,
minbibnames = 3
%eprint = true
]{biblatex}%
\DeclareFieldFormat{eid}{Art. \addnbspace #1}
\begin{filecontents*}{\jobname.bib}
@article{ibrahim_spectral_2010,
title = {Spectral imaging method for material classification
and inspection of printed circuit boards},
author = {Ibrahim, Abdelhameed and Tominaga, Shoji and
Horiuchi, Takahiko},
journal = {Optical Engineering},
volume = 49,
number = 5,
eid = 05720,
year = 2010
}
@inproceedings{gruna_optical_2012,
author = {Gruna, Robin and Beyerer, Juergen},
title = {Proc. Optical feature extraction with illumination-encoded
linear functions},
series = {Proceedings of SPIE},
year = 2012,
booktitle = {Image Processing: Machine Vision Applications V},
volume = 8300,
eid = 830004,
}
\end{filecontents*}
\renewbibmacro*{chapter+pages}{%
\printfield{chapter}%
\setunit{\bibpagespunct}%
\printfield{eid}
\setunit{\bibpagespunct}%
\printfield{pages}%
\newunit}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}