1

I have difficulties changing the current format from

, Hg.

to

(Hg.)

if the editor is mentioned as the author (at the start of the entry).

To give you a short example in my LaTex: https://www.overleaf.com/read/dvtrpzgfqghn

Also, as a visual input - I have configured it correctly, if the editor is mentioned in a collection in a later part of the bibliography entry: enter image description here

however if it is supposed to be right behind the author it shows as follows instead of (Hg.) enter image description here

(Also, what bothers me on a side note, is that my idea of using titleaddons as translations, there is always a dot between the actual title and the addon - can I omit the dot after a title only if there is a title addon? And would that work with all kinds of title (title, maintitle, booktitle e.g.?)

Sorry for all the issues! :D

Have a nice evening

1 Answer 1

2

To use (Hg.) after a main editor you can adjust the editortypedelim and editortype field format. (You could do the same for translator.)

To format the titleaddon as you want, you need to patch the title, booktitle, and maintitle macros. I've made a new titleaddondelim to control what is printed. You can also change the titleaddon field format to include the brackets, rather than putting them in your bib file.

MWE

This is taken from your Overleaf document and simplified to make it minimal, so just the problems asked about in this question are dealt with. (In the future, include this kind of code in your question.)

\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{CommissionontheHumanities.1980,
  editor = {{Commission on the Humanities}},
  year = {1980},
  title = {The Humanities in American Life},
  subtitle = {Report of the Commission on the Humanities},
  location = {Berkeley and London},
  publisher = {University of California Press}
}
@book{Doi.1978,
  author = {Doi, Yutaka and Sano, Tetsuji and Tanaka, Itsuo},
  year = {1978},
  title = {Senkyo seido},
  titleaddon = {Das Wahlsystem},
  volume = {10},
  series = {Gendai chih\^o jichi zensh\^u},
  location = {T\^oky\^o},
  publisher = {Gy\^osei}
}
\end{filecontents}
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear]{biblatex}
\addbibresource{\jobname.bib}
\renewcommand{\mkbibnamefamily}[1]{\textsc{#1}}
\DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}
% Use Hg. in parentheses after editor
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DefineBibliographyStrings{german}{%
  editor = {Hg\adddot}
}
% Use space instead of period before bracketed titleaddon
\usepackage{xpatch}
\DeclareFieldFormat{titleaddon}{\mkbibbrackets{#1}}
\DeclareDelimFormat{titleaddondelim}{\addspace}
\xpatchbibmacro{title}
  {\printfield{titleaddon}}
  {\setunit{\printdelim{titleaddondelim}}%
   \printfield{titleaddon}}
  {}
  {}
\xpatchbibmacro{booktitle}
  {\printfield{booktitleaddon}}
  {\setunit{\printdelim{titleaddondelim}}%
   \printfield{booktitleaddon}}
  {}
  {}
\xpatchbibmacro{maintitle}
  {\printfield{maintitleaddon}}
  {\setunit{\printdelim{titleaddondelim}}%
   \printfield{maintitleaddon}}
  {}
  {}
\begin{document}
\nocite{*}
\printbibliography
\end{document}

enter image description here

3
  • 1
    +1 editortypedelim and editortype are exactly what I would use (probably I would also redefine translatortype and translatortypedelim analogously). But since the OP mentions Overleaf prominently, I should mention that editortypedelim was introduced in biblatex 3.8. but Overleaf runs 3.7. (I would also replace \renewcommand{\labelnamepunct}{\addcolon\space} with \DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}.)
    – moewe
    Nov 6, 2018 at 23:56
  • @moewe, thanks! I wonder if it's worth adding a titleaddondelim to biblatex? I think I've seen a few questions where it makes sense to modify this more easily. Nov 7, 2018 at 0:10
  • 1
    I just added it to my biblatex-ext styles. Not sure what the official stance is on adding all kinds of (useful, no doubt) delimiters to the standard styles. Relevant, though not exactly comparable: github.com/plk/biblatex/issues/180
    – moewe
    Nov 7, 2018 at 0:21

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.