Consider the following MWE.
\documentclass{article}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\usepackage[style = authoryear-comp]{biblatex}
\usepackage{xpatch}
\xpatchbibmacro{date+extradate}{\printtext[parens]}{\setunit{\addperiod\space}\printtext}{}{} % remove parenthesis around year in bibliography
\DeclareFieldFormat{editortype}{\mkbibparens{#1}} % put editor in parenthesis when before publication year
\DeclareDelimFormat{editortypedelim}{\addspace}
%\renewcommand\bibnamedash{\char"2E3B\addperiod\space} % use a 3em dash with period after it for dashed author names
\begin{filecontents}[overwrite]{\jobname.bib}
@book{anderson1980,
AUTHOR = "Peter Anderson",
TITLE = "My book",
YEAR = "1980"}
@book{anderson1981,
AUTHOR = "Peter Anderson",
TITLE = "My second book",
YEAR = "1981"}
@collection{anderson1982,
EDITOR = "Peter Anderson",
TITLE = "Interesting articles",
YEAR = "1982"}
@collection{smith1983,
EDITOR = "Harry Smith",
TITLE = "Good chapters",
YEAR = "1983"}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\nocite{anderson1980}\nocite{anderson1981}\nocite{anderson1982}\nocite{smith1983}
\printbibliography
\end{document}
The output looks fairly ok:
But I would like to adhere to Bringhurst's recommendation of using a three-em dash. Additionally, the dash should only replace the name, not the punctuation, so the dash should be followed by a period. Uncommenting the commented line in the MWE will then give this:
While the second entry here looks correct, the third does not. There should not be a period between the dash and the parenthesis (Ed.), since there was no period here to begin with, as seen in the fourth and last entry. Second, the word in the parenthesis should not have a capitalized first letter (which it receives here because of the preceding period, so it might disappear by its own once the period is removed).
In short, the third line should be --- (ed.). 1982., not ---. (Ed.). 1982. How can I achieve this without simultaneously removing the period from the second entry?


