1

I just can't solve my problem. I want that in the Bibliography the authors are put in one [.........] bracket, like e.g. the dinat format does it. (Is not available since I am using Biblatex)

\usepackage[
  backend=biber,
  style=authoryear-icomp,
  ]{biblatex}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}

\DeclareFieldFormat*{title}{\mkbibemph{#1}}
\DeclareFieldFormat*{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{journaltitle}{#1}
\setlength{\bibitemsep}{0.5\baselineskip} 

\DeclareListFormat{author}{\mkbibbrackets{#1}}     (*)

Thats my approach, but (*) does not cause any differences.

Thank you for taking your time.

1

From biblatex 3.12 onwards, you can use \DeclareNameWrapperFormat and \DeclareListWrapperFormat to formt the complete output of a (name) list field (\DeclareNameFormat and \DeclareListFormat only format a single item). See https://github.com/plk/biblatex/issues/754 and https://github.com/plk/biblatex/pull/829.

So if you want to print the author (or editor and translator in author position) in square brackets, you can simply use

\DeclareNameWrapperFormat{sortname}{\mkbibbrackets{#1}}

In full

\documentclass{article}

\usepackage[
  backend=biber,
  style=authoryear-icomp,
  ]{biblatex}

\renewcommand*{\mkbibnamefamily}{\textsc}
\DeclareNameWrapperFormat{sortname}{\mkbibbrackets{#1}}

\DeclareFieldFormat*{title}{\mkbibemph{#1}}
\DeclareFieldFormat*{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{journaltitle}{#1}

\setlength{\bibitemsep}{0.5\baselineskip} 

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson}
\printbibliography
\end{document}

[Sigfridsson, Emma and Ulf Ryde] (1998). Comparison of methods for deriving atomic charges from the electrostatic potential and moments. In: Journal of Computational Chemistry 19.4, pp. 377–395. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.


Since you mention dinat in your question, I suspect you actually want something slightly different. We can try and recreate the bibliography format of dinat, which introduces each entry with an author-year label, with biblatex-ext.

\documentclass{article}

\usepackage[
  backend=biber,
  citestyle=ext-authoryear-icomp,
  bibstyle=ext-authortitle,
  sorting=nyt,
  introcite=plain,
  ]{biblatex}

\DeclareFieldFormat{bbx@introcite}{\mkbibbrackets{#1}}
\DeclareDelimAlias*[bbx@introcite]{nameyeardelim}[parencite]{nameyeardelim}
\UndeclareInnerCiteDelims{bbx@introcite}
\renewcommand*{\introcitepunct}{\quad}

\renewcommand*{\mkbibnamefamily}{\textsc}

\DeclareFieldFormat*{title}{\mkbibemph{#1}}
\DeclareFieldFormat*{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{journaltitle}{#1}

\setlength{\bibitemsep}{0.5\baselineskip} 

\addbibresource{biblatex-examples.bib}

\begin{document}
\autocite{sigfridsson}
\printbibliography
\end{document}

[Sigfridsson and Ryde 1998] Sigfridsson, Emma and Ulf Ryde. Comparison of methods for deriving atomic charges from the electrostatic potential and moments. In: Journal of Computational Chemistry 19.4 (1998), pp. 377–395. doi: 10.1002/(SICI)1096-987X(199803)19:4<377::AID-JCC1>3.0.CO;2-P.

You can read more about introcite in the biblatex-ext documentation (pp. 15-19).

If you prefer square brackets for \parencite/\autocite, have a look at \DeclareOuterCiteDelims.


The

\DeclareListFormat{author}{\mkbibbrackets{#1}}

had no effect, since author is a name list, whose format needs to be set up with \DeclarNameFormat (and \DeclareNameWrapperFormat). Declarations using the incorrect field type (\DeclareListFormat{author} and \DeclareFieldFormat{author}) are silently ignored.

\DeclareNameFormat{author}{\mkbibbrackets{#1}}

would not have been ignored, but would not have produced the desired output, either, since name formats are quite special and don't work with the usual #1.

  • I had to make an update to the latest TeXLive, but this was nothing bad at all. Thank you for Your detailed answer! Fabulous! (This verifies that this very solution does work on the latest software) – cruiser0223 Jun 30 at 15:35
1

For old versions of biblatex (< v3.12, as for example used in overleaf) one can add the \mkbibbrackets to the author macro:

\documentclass{article}

\usepackage[
  backend=biber,
  style=authoryear-icomp,
  ]{biblatex}
\renewcommand*{\mkbibnamefamily}[1]{\textsc{#1}}

\DeclareFieldFormat*{title}{\mkbibemph{#1}}
\DeclareFieldFormat*{citetitle}{\mkbibemph{#1}}
\DeclareFieldFormat{journaltitle}{#1}
\setlength{\bibitemsep}{0.5\baselineskip} 

\renewbibmacro*{author}{%
  \ifboolexpr{
    test \ifuseauthor
    and
    not test {\ifnameundef{author}}
  }
    {\usebibmacro{bbx:dashcheck}
       {\bibnamedash}
       {\usebibmacro{bbx:savehash}%
        \mkbibbrackets{\printnames{author}}%
        \iffieldundef{authortype}
          {\setunit{\printdelim{nameyeardelim}}}
          {\setunit{\printdelim{authortypedelim}}}}%
     \iffieldundef{authortype}
       {}
       {\usebibmacro{authorstrg}%
        \setunit{\printdelim{nameyeardelim}}}}%
    {\global\undef\bbx@lasthash
     \usebibmacro{labeltitle}%
     \setunit*{\printdelim{nonameyeardelim}}}%
  \usebibmacro{date+extradate}}

\addbibresource{biblatex-examples.bib}


\begin{document}


\cite{sigfridsson}
\printbibliography


\end{document}

enter image description here

  • With a current version of biblatex (at least v3.12, in particular the system run on Overleaf is much too old for that), the code block could simply be replaced with \DeclareNameWrapperFormat{author}{\mkbibbrackets{#1}}, though I would use \DeclareNameWrapperFormat{sortname}{\mkbibbrackets{#1}}, so that editors and translators in the same position are treated the same way. – moewe Jun 30 at 10:19
  • @moewe I think it would be good if you would post this as an answer. I made clear that my one is for old systems – user191948 Jun 30 at 10:23
  • If you have a modern system and can verify that the code I suggested works I would be happy if you included it in your answer. – moewe Jun 30 at 10:24
  • @moewe Unfortunately I currently don't have access to an up-to-date installation. I would be happy to see your answer – user191948 Jun 30 at 10:26
  • OK, in that case I will write an answer. – moewe Jun 30 at 10:27

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.