TeX - LaTeX Asked on May 22, 2021
I cite elements from my bibfile using citet{key}
. The reference appears as "Name1, and Name2 (year)" in text where year is a link leading to the bibliography. Now, instead of the "and" between the the authors name, I want to use a hyphen, e.g.
The Name1-Name2 (2019) formula implies …
Any ideas of I could adjust the citet
command?
I use biblatex
as follows.
usepackage[style=ext-authoryear-comp,
backend=biber,
natbib=true,
uniquename=false,
uniquelist=false,
giveninits=false,
dashed=false,
backref=false,
maxbibnames=99,
maxcitenames=3,
isbn=false,
doi=false]{biblatex}
With DeclareDelimFormat
you can change the delimiter between names per citation command.
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage{babel}
usepackage{csquotes}
usepackage[style=ext-authoryear-comp, natbib=true]{biblatex}
DeclareDelimFormat[textcite]{multinamedelim}{textendash}
DeclareDelimAlias[textcite]{finalnamedelim}{multinamedelim}
addbibresource{biblatex-examples.bib}
begin{document}
Lorem autocite{sigfridsson}
The textcite{sigfridsson} formula
The citet{sigfridsson} formula
printbibliography
end{document}
I'd probably prefer to define a new cite command for this so that textcite
is still usable as normal.
documentclass[british]{article}
usepackage[T1]{fontenc}
usepackage{babel}
usepackage{csquotes}
usepackage[style=ext-authoryear-comp, natbib=true]{biblatex}
makeatletter
newcommand*{attribcite}{%
AtNextCite{%
DeclareDelimFormat{multinamedelim}{textendash}%
DeclareDelimAlias{finalnamedelim}{multinamedelim}%
}%
textcite}
makeatother
addbibresource{biblatex-examples.bib}
begin{document}
Lorem autocite{sigfridsson}
The attribcite{sigfridsson} formula
As shown by textcite{sigfridsson}
printbibliography
end{document}
Correct answer by moewe on May 22, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP