4

This is a follow up of Mico's question on how to specify an author's title with giveninits=true. There two answers have been found which work for titles which do not include a hyphen.

Now, let us consider the title "Dr.-Ing.". With both answers I get an additional dot in front of the hyphen:

\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}

screenshot

I am aware of one work around which I will post as an answer. However, I do not like it because it involves defining custom commands and thus creating a dependency of the bib file on the tex file.

Does someone know a better solution?

  • 2
    It definitely doesn't seem right that biber (a) modifies the interior of the given-i field in the first entry and (b) essentially ignores the \relax instruction in the second entry. – Mico Jul 11 '17 at 0:12
  • 1
    Note that it is highly unusual to include academic titles and degrees in a bibliography. I have never seen a scientific work doing it and I would be hard pressed to find a popular science work that includes titles (but I can't guarantee that I have not seen one). Even in Germany you would not include the degree. – moewe Jul 11 '17 at 4:53
  • @Mico There is a rationale for modifying the interior of given-i. Names such as 'Hans-Georg' would be H-G and Biber would then insert \bibinithyphendelim also before the -. – moewe Jul 11 '17 at 4:57
  • @moewe, I can agree with you that academic degrees are unusual there, but I think this is of little relevance, given that the behavior would be the same for a regular compound name. Shouldn't Biber be robust enough to give correct results if someone would give given-i = {H.-D.} instead in the field? – gusbrs Jul 11 '17 at 10:07
  • 1
    @gusbrs You could expect that, yes. I'm not sure about the inner workings of Biber here, but I can see why things are like they are now. The feature developed over time and the present state is a direct consequence of things that were necessary in the past. If you think that there should be a way to get gievn-i exactly without interference you can submit a feature request for Biber (github.com/plk/biber/issues). – moewe Jul 11 '17 at 12:37
2

I don't really know why it works, but you can remove the dot in Dr-Ing., and the added one will be there to obtain the desired results:

\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}

It works for both Mico's and moewe's solutions.

enter image description here

  • True, this will still leave you with a dependency between the bib file and the tex file, for if you abandon the giveninits=true option, you will be missing the dot. – gusbrs Jul 10 '17 at 21:14
  • 1
    @moewe, do you think this is desired behavior? Is "Prof. Dr.-Ing." stretching the purpose of given name? Or is there an \isdot or alike missing somewhere in the case of "compound names"? – gusbrs Jul 10 '17 at 22:27
  • 1
    It is highly unusual to include academic titles in the bibliography and 'Prof. Dr.-Ing.' does not quite work like a first name. Biber inserts \bibinithyphendelim before a hyphen when it does initials to get names like 'Hans-Dieter' right, that would be given-i = {H-D} and then H\bibinithyphendelim G\bibinitperiod. Here the same happens, \bibinithyphendelim is inserted before the hyphen. That's why hiding it in a command helps, the insertion is done by Biber who does not expand your TeX commands. – moewe Jul 11 '17 at 5:00
  • 1
    @jakun, given moewe's comments on what Biber expects in given-i and how it works I believe this might be your best bet. Plus, contrary to my initial impression, you can achieve independence of tex and bib files (in the sense of not depending on your defined commands and also not depending on the option given to giveninits, leading to correct results for true or (default) false). It is enough that (in moewe's solution) you supply the dot in Dr. for given and omit it for given-i. I changed the answer's code accordingly. – gusbrs Jul 11 '17 at 10:49
5

Putting the hyphen in a command avoids the insertion of an additional dot.

I am assuming that this works because the hyphen's catcode is here fixed to other and can not be made active. According to moewe's comment on gusbrs' answer this works because "the insertion is done by Biber who does not expand your TeX commands".

I am not sure why those curley braces around the commands are needed but without them I am getting an error.

The position of those braces is based on an answer by Mico.

\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}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.