4

I was happy to see the extensions in the biblatex-ext manual the biblatex-ext can provide and I have added biblatex-ext using the MikTex 2.9 packet manager.

I have successfully made my citations with "[" and "]" using:

\DeclareOuterCiteDelim{parencite}{\bibopenbracket}{\bibclosebracket}
\DeclareInnerCiteDelim{parencite}{\bibopenparen}{\bibcloseparen}

On page 16 I found then exactly the bibliography style I want for my thesis and took over the five lines by cut&paste in my main-tex file:

\documentclass{scrreprt}

\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}

\usepackage[babel,german=quotes]{csquotes}
\usepackage[ext-style=authoryear-icomp,sorting=nyt]{biblatex}

\DeclareOuterCiteDelim{parencite}{\bibopenbracket}{\bibclosebracket}
\DeclareInnerCiteDelim{parencite}{\bibopenparen}{\bibcloseparen}
%the interesting lines start here:
\DeclareFieldFormat{bbx:introcite}{\mkbibbold{#1}}
\DeclareDelimcontextAlias{bbx:introcite}{textcite}
\DeclareInnerCiteDelim{bbx:introcite}{\bibopenparen}{\bibcloseparen}
\setlength{\introcitewidth}{0pt}
\setlength{\introcitesep}{\bibhang}
%the interesting lines end here:
\addbibresource{Literatur.bib}

\begin{document}

Citation1: \autocite{Knuth:Texbook}
Citation2: \autocite{Schlosser:Latex}
Citation2: \autocite[siehe][S. 130]{Beucher:MATLAB}

\printbibliography

\end{document}

The Literatur.bib file:

@Book{Knuth:Texbook,
author = {Donald Knuth},
title = {The TeXbook},
editor = {unknown},
publisher = {Addison Wesley},
year = {1986},
}
@Book{Schlosser:Latex,
author = {Joachim Schlosser},
title = {Wissenschaftliche Arbeiten schreiben mit Latex},
editor = {unknown},
publisher = {mitp Verlag},
year = {2014},
}
@Book{Beucher:MATLAB,
author = {Ottmar Beucher},
title = {Immer Ärger mit MATLAB und Simulink},
publisher = {mitp Verlag},
editor = {unknown},
year = {2012},
url = {http://www.amazon.de},
}

There is no effect of the five lines:

\DeclareFieldFormat{bbx:introcite}{\mkbibbold{#1}}
\DeclareDelimcontextAlias{bbx:introcite}{textcite}
\DeclareInnerCiteDelim{bbx:introcite}{\bibopenparen}{\bibcloseparen}
\setlength{\introcitewidth}{0pt}
\setlength{\introcitesep}{\bibhang}

to the bibliography! There is no error message at the LaTeX runs. When I remove them from the code there is no change at the bibliography appearance.

I have updated MikTex completely, even it took a while and I rebooted my PC - no change.

I am not a LaTeX professional and I don't have an idea what the reason could be why these five lines are ineffective.

Do you have an idea what the reason could be?

Thanks a lot for every hint!

Greetings from Germany

2

1 Answer 1

5

The lines only have effect if the introcite option is used with value label. That's why the title of the code example is "Example customisations for introcite=label". If no introcite option is given the default value false is assumed, which means that there is no citation label in the bibliography. Consequently styling it does not do anything.

\documentclass{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[babel,german=quotes]{csquotes}
\usepackage[style=ext-authoryear-icomp, introcite=label]{biblatex}

\DeclareOuterCiteDelims{parencite}{\bibopenbracket}{\bibclosebracket}
\DeclareInnerCiteDelims{parencite}{\bibopenparen}{\bibcloseparen}
%the interesting lines start here:
\DeclareFieldFormat{bbx@introcite}{\mkbibbold{#1}}
\DeclareDelimFormat[bbx@introcite]{nameyeardelim}{\addspace}
\DeclareInnerCiteDelims{bbx@introcite}{\bibopenparen}{\bibcloseparen}
\setlength{\introcitewidth}{0pt}
\setlength{\introcitesep}{\bibhang}
%the interesting lines end here:

%\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Book{Knuth:Texbook,
author = {Donald Knuth},
title = {The TeXbook},
publisher = {Addison Wesley},
year = {1986},
}
@Book{Schlosser:Latex,
author = {Joachim Schlosser},
title = {Wissenschaftliche Arbeiten schreiben mit Latex},
publisher = {mitp Verlag},
year = {2014},
}
@Book{Beucher:MATLAB,
author = {Ottmar Beucher},
title = {Immer Ärger mit MATLAB und Simulink},
publisher = {mitp Verlag},
year = {2012},
url = {http://www.amazon.de},
}
\end{filecontents}
\addbibresource{\jobname.bib}

\begin{document}
Citation1: \autocite{Knuth:Texbook}
Citation2: \autocite{Schlosser:Latex}
Citation2: \autocite[siehe][130]{Beucher:MATLAB}

\printbibliography
\end{document}

works.

Since \DeclareDelimcontextAlias{bbx@introcite}{textcite} can have counter-intuitive results, I have exchanged it with \DeclareDelimFormat[bbx@introcite]{nameyeardelim}{\addspace}.

Note that you don't need to write \autocite[S. 130]{Beucher:MATLAB}, biblatex adds the "S." itself if appropriate, so \autocite[130]{Beucher:MATLAB} is enough.

I also don't think that writing editor = {unknown} is very useful, so I have removed that.

sorting=nyt is the default for style=authoryear-icomp (and therefore also for ext-authoryear-icomp), so you don't need to give that option explicitly.

enter image description here


In biblatex-ext v0.4 the 'virtual' cite macro bbx:introcite was renamed to bbx@introcite for consistency and implementation reasons. See https://github.com/moewew/biblatex-ext/issues/10 and https://github.com/moewew/biblatex-ext/pull/11

That means that the bbx:introcite in

\DeclareFieldFormat{bbx:introcite}{\mkbibbold{#1}}
\DeclareDelimFormat[bbx:introcite]{nameyeardelim}{\addspace}
\DeclareInnerCiteDelims{bbx:introcite}{\bibopenparen}{\bibcloseparen}

must be replaced with bbx@introcite as in the code above. Common uses of the old code will generate a warning.

\DeclareInnerCiteDelim and \DeclareOuterCiteDelim were replaced by \DeclareInnerCiteDelims and \DeclareOuterCiteDelims (with an s). That change is fully backwards compatible: The old names will continue to work and generate a handy warning to please use the new names.

3
  • Hi Moritz, my bibliography looks perfect now. I just determined that the link from the citations just work when I point to the year behind the author but not on the author with the code above - something weird. Is this the same in the small test when you corrected my mistake or is it normal? I think this is more general issue and has likely nothing to do with biblatex-ext I assume. Do you have any idea?
    – Rico
    Jun 10, 2018 at 18:08
  • 1
    @Rico I'm not entirely sure if I understand correctly what you mean, but by default only the year bit of the citation is a link, the name is not linked. There are ways around that (see for example tex.stackexchange.com/q/15951/35864 and many more), but it turns out that there are conceptual and implementation difficulties to linking the entire label. So I would just let it go...
    – moewe
    Jun 10, 2018 at 19:55
  • Hi Moritz, I will follow the link to the example. If it does not help I will ask this question to LaTeX forum. Thanks a lot!
    – Rico
    Jun 11, 2018 at 12:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .