
這是後續的米科的問題關於如何使用 指定作者的標題giveninits=true
。已找到兩個適用於不包含連字符的標題的答案。
現在,讓我們考慮一下「Dr.-Ing.」這個頭銜。對於這兩個答案,我在連字號前面多了一個點:
\RequirePackage{filecontents}
\begin{filecontents*}{mybib.bib}
@unpublished{tet-skript-moewe,
author = {family={Schuhmann}, given={Prof. Dr.-Ing. Rolf}, given-i={Prof. Dr.-Ing. R}},
title = {Skriptum zu den {V}orlesungen
{T}heoretische {E}lektrotechnik {I} und {II}},
date = {2013-12-17},
note = {moewe's answer}
}
@unpublished{tet-skript-mico,
author = {{{\relax Prof. Dr.-Ing. R}olf} Schuhmann},
title = {Skriptum zu den {V}orlesungen
{T}heoretische {E}lektrotechnik {I} und {II}},
date = {2013-12-17},
note = {Mico's answer}
}
\end{filecontents*}
\documentclass{article}
\usepackage[backend=biber, giveninits=true]{biblatex}
\addbibresource{mybib.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
我知道一項工作,我將發布該工作作為答案。但是,我不喜歡它,因為它涉及定義自訂命令,從而創建 bib 檔案對 tex 檔案的依賴關係。
有人知道更好的解決方案嗎?
答案1
我真的不知道為什麼它會起作用,但是您可以刪除 中的點Dr-Ing.
,然後添加的點將在那裡獲得所需的結果:
\RequirePackage{filecontents}
\begin{filecontents*}{mybib.bib}
@unpublished{tet-skript-moewe,
author = {family={Schuhmann}, given={Prof. Dr.-Ing. Rolf}, given-i={Prof. Dr-Ing. R}},
title = {Skriptum zu den {V}orlesungen
{T}heoretische {E}lektrotechnik {I} und {II}},
date = {2013-12-17},
note = {moewe's answer}
}
@unpublished{tet-skript-mico,
author = {{{\relax Prof. Dr-Ing. R}olf} Schuhmann},
title = {Skriptum zu den {V}orlesungen
{T}heoretische {E}lektrotechnik {I} und {II}},
date = {2013-12-17},
note = {Mico's answer}
}
\end{filecontents*}
\documentclass{article}
\usepackage[backend=biber, giveninits=true]{biblatex}
\addbibresource{mybib.bib}
\begin{document}
\nocite{*}
\printbibliography
\end{document}
它適用於 Mico 和 moewe 的解決方案。
答案2
在命令中放置連字符可以避免插入額外的點。
我假設這是有效的,因為連字符的目錄代碼在這裡固定為其他並且無法激活。根據 moewe 的評論古斯布爾斯的回答這是有效的,因為「插入是由 Biber 完成的,他不會擴展你的 TeX 命令」。
我不確定為什麼需要命令周圍的大括號,但如果沒有它們,我會收到錯誤。
這些大括號的位置是基於米科的回答。
\RequirePackage{filecontents}
\begin{filecontents*}{mybib.bib}
@unpublished{tet-skript,
author = {{\Prof{} \DrIng{} R}olf Schuhmann},
title = {Skriptum zu den {V}orlesungen
{T}heoretische {E}lektrotechnik {I} und {II}},
date = {2013-12-17},
}
\end{filecontents*}
\documentclass{article}
\usepackage[backend=biber, firstinits=true]{biblatex}
\addbibresource{mybib.bib}
\newcommand{\DrIng}{Dr.-Ing.\@}
\newcommand{\Prof}{Prof.\@}
\begin{document}
\nocite{*}
\printbibliography
\end{document}