I want to use shorthand
to abbreviate the author of a publication. Unfortunately, \textcite
doesn't produce the expected output.
MWE:
\begin{filecontents}{myfile.bib}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}
\end{filecontents}
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[backend=biber,citestyle=authoryear]{biblatex}
\addbibresource{myfile.bib}
\begin{document}
\cite{goossens93} \\
\parencite{goossens93} \\
\textcite{goossens93}
\end{document}
Gives the following output, as expected:
Goossens, Mittelbach, and Samarin 1993
(Goossens, Mittelbach, and Samarin 1993)
Goossens, Mittelbach, and Samarin (1993)
When I add shorthand = "GMS"
to the BIB entry, the output becomes
GMS
(GMS)
Goossens, Mittelbach, and Samarin (GMS)
but I'd expect \textcite
to output something similar as \cite
.
Is there a way to fix this?
I neiter want to redefine \textcite
globally because there are other references without shorthands which I don't want to break nor do I want to use \cite
instead of \textcite
to keep the opporunity to drop the shorthand later on.
EDIT:
In response to LaRiFaRi's comment: I do want to change \textcite
, but only for bib-items that have a shorthand.
MWE2:
\begin{filecontents}{myfile.bib}
@book{goossens93,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
% shorthand = "GMS"
}
@book{else2015,
author = "Someone Else",
title = "Interesting thing.",
year = "2015"
}
\end{filecontents}
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[backend=biber,citestyle=authoryear]{biblatex}
\addbibresource{myfile.bib}
\begin{document}
Some guys called \textcite{goossens93} wrote something about LaTeX and \textcite{else2015} also wrote something interesting.
\end{document}
#1 Output: Some guys called Goossens, Mittelbach, and Samarin (1993) wrote something about LaTeX and Else (2015) also wrote something interesting.
#2 Output with shorthand: Some guys called Goossens, Mittelbach, and Samarin (GMS) wrote something about LaTeX and Else (2015) also wrote something interesting.
#3 Desired output with shorthand: Some guys called GMS wrote something about LaTeX and Else (2015) also wrote something interesting.
Why not globally redefine \textcite
for all citations? As I don't want to change how else2015
is cited.
Why not use \cite
? As I may change my mind and drop the shorthand
field from the BIB file. Then I want the output as in #1 - which I will only get if I don't use \cite
instead of \textcite
.
\textcite
or use\cite
for those cases, what are you expecting to have then? Please give a complete MWE showing one citation with and one without that shorthand. Than explain, how you are citing both, what the result looks like and what you want to have. You should also mention, why you do not want to use\cite
. Thanks. – LaRiFaRi Jun 8 '15 at 12:54