Biblatex, APA style, hyperlink parencite not displaying author on 2nd cite
I'm having trouble with my code.
I'd like the 2nd parencite to also include the authors name.
The DeclareCiteCommand is causing the authors name to be absent after the first cite
documentclass{article}
begin{filecontents}{jobname.bib}
@misc{A01,
author = {Sutherland and Varnam},
year = {2001},
title = {Title},
}
end{filecontents}
usepackage[style=apa,backend=biber]{biblatex}
addbibresource{jobname.bib}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperref]{usebibmacro{cite}}}
{multicitedelim}
{usebibmacro{postnote}}
usepackage{hyperref}
begin{document}
First cite parencite{A01}.
Second cite parencite{A01}.
printbibliography
end{document}
biblatex hyperref apa-style
add a comment |
I'm having trouble with my code.
I'd like the 2nd parencite to also include the authors name.
The DeclareCiteCommand is causing the authors name to be absent after the first cite
documentclass{article}
begin{filecontents}{jobname.bib}
@misc{A01,
author = {Sutherland and Varnam},
year = {2001},
title = {Title},
}
end{filecontents}
usepackage[style=apa,backend=biber]{biblatex}
addbibresource{jobname.bib}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperref]{usebibmacro{cite}}}
{multicitedelim}
{usebibmacro{postnote}}
usepackage{hyperref}
begin{document}
First cite parencite{A01}.
Second cite parencite{A01}.
printbibliography
end{document}
biblatex hyperref apa-style
add a comment |
I'm having trouble with my code.
I'd like the 2nd parencite to also include the authors name.
The DeclareCiteCommand is causing the authors name to be absent after the first cite
documentclass{article}
begin{filecontents}{jobname.bib}
@misc{A01,
author = {Sutherland and Varnam},
year = {2001},
title = {Title},
}
end{filecontents}
usepackage[style=apa,backend=biber]{biblatex}
addbibresource{jobname.bib}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperref]{usebibmacro{cite}}}
{multicitedelim}
{usebibmacro{postnote}}
usepackage{hyperref}
begin{document}
First cite parencite{A01}.
Second cite parencite{A01}.
printbibliography
end{document}
biblatex hyperref apa-style
I'm having trouble with my code.
I'd like the 2nd parencite to also include the authors name.
The DeclareCiteCommand is causing the authors name to be absent after the first cite
documentclass{article}
begin{filecontents}{jobname.bib}
@misc{A01,
author = {Sutherland and Varnam},
year = {2001},
title = {Title},
}
end{filecontents}
usepackage[style=apa,backend=biber]{biblatex}
addbibresource{jobname.bib}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperref]{usebibmacro{cite}}}
{multicitedelim}
{usebibmacro{postnote}}
usepackage{hyperref}
begin{document}
First cite parencite{A01}.
Second cite parencite{A01}.
printbibliography
end{document}
biblatex hyperref apa-style
biblatex hyperref apa-style
edited Oct 29 '18 at 20:33
Stefan Pinnow
20.3k83578
20.3k83578
asked Oct 29 '18 at 20:29
SocadilloSocadillo
182
182
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
biblatex-apa defines parencite slightly different than the redefinition in your example assumes. That definition works for some of the standard styles, but not for more complicated styles like authoryear-icomp and apa.
For apa you need
documentclass{article}
usepackage[style=apa,backend=biber]{biblatex}
usepackage{hyperref}
addbibresource{biblatex-examples.bib}
DeclareFieldFormat{bibhyperrefnonest}{%
DeclareFieldFormat{bibhyperref}{##1}%
bibhyperref{#1}}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{cite}}}
{}
{usebibmacro{postnote}%
usebibmacro{cite:post}}
DeclareCiteCommand{textcite}
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{textcite}}}
{}
{usebibmacro{textcite:postnote}%
usebibmacro{cite:post}}
begin{document}
First cite parencite{sigfridsson}.
Second cite parencite{sigfridsson}.
citereset
First cite textcite{sigfridsson}.
Second cite textcite{sigfridsson}.
printbibliography
end{document}

edit: Added a redefinition for textcite as well. Note that the parentheses in textcite may not be linked as expected. Fixing that would be much more complicated.
I had the same issue and your answer solved it for me, Moewe. Do you know of a similar workaround for the textcite command by any chance? Thanks in advance!
– Michiel Schreurs
6 hours ago
@MichielSchreurs See the edit for the analogue redefinition oftextcite. Note that that might not give exactly what you want w.r.t. the parentheses. Getting the links right there is much more complicated. If you want that you can ask a new question.
– moewe
4 hours ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f457411%2fbiblatex-apa-style-hyperlink-parencite-not-displaying-author-on-2nd-cite%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
biblatex-apa defines parencite slightly different than the redefinition in your example assumes. That definition works for some of the standard styles, but not for more complicated styles like authoryear-icomp and apa.
For apa you need
documentclass{article}
usepackage[style=apa,backend=biber]{biblatex}
usepackage{hyperref}
addbibresource{biblatex-examples.bib}
DeclareFieldFormat{bibhyperrefnonest}{%
DeclareFieldFormat{bibhyperref}{##1}%
bibhyperref{#1}}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{cite}}}
{}
{usebibmacro{postnote}%
usebibmacro{cite:post}}
DeclareCiteCommand{textcite}
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{textcite}}}
{}
{usebibmacro{textcite:postnote}%
usebibmacro{cite:post}}
begin{document}
First cite parencite{sigfridsson}.
Second cite parencite{sigfridsson}.
citereset
First cite textcite{sigfridsson}.
Second cite textcite{sigfridsson}.
printbibliography
end{document}

edit: Added a redefinition for textcite as well. Note that the parentheses in textcite may not be linked as expected. Fixing that would be much more complicated.
I had the same issue and your answer solved it for me, Moewe. Do you know of a similar workaround for the textcite command by any chance? Thanks in advance!
– Michiel Schreurs
6 hours ago
@MichielSchreurs See the edit for the analogue redefinition oftextcite. Note that that might not give exactly what you want w.r.t. the parentheses. Getting the links right there is much more complicated. If you want that you can ask a new question.
– moewe
4 hours ago
add a comment |
biblatex-apa defines parencite slightly different than the redefinition in your example assumes. That definition works for some of the standard styles, but not for more complicated styles like authoryear-icomp and apa.
For apa you need
documentclass{article}
usepackage[style=apa,backend=biber]{biblatex}
usepackage{hyperref}
addbibresource{biblatex-examples.bib}
DeclareFieldFormat{bibhyperrefnonest}{%
DeclareFieldFormat{bibhyperref}{##1}%
bibhyperref{#1}}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{cite}}}
{}
{usebibmacro{postnote}%
usebibmacro{cite:post}}
DeclareCiteCommand{textcite}
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{textcite}}}
{}
{usebibmacro{textcite:postnote}%
usebibmacro{cite:post}}
begin{document}
First cite parencite{sigfridsson}.
Second cite parencite{sigfridsson}.
citereset
First cite textcite{sigfridsson}.
Second cite textcite{sigfridsson}.
printbibliography
end{document}

edit: Added a redefinition for textcite as well. Note that the parentheses in textcite may not be linked as expected. Fixing that would be much more complicated.
I had the same issue and your answer solved it for me, Moewe. Do you know of a similar workaround for the textcite command by any chance? Thanks in advance!
– Michiel Schreurs
6 hours ago
@MichielSchreurs See the edit for the analogue redefinition oftextcite. Note that that might not give exactly what you want w.r.t. the parentheses. Getting the links right there is much more complicated. If you want that you can ask a new question.
– moewe
4 hours ago
add a comment |
biblatex-apa defines parencite slightly different than the redefinition in your example assumes. That definition works for some of the standard styles, but not for more complicated styles like authoryear-icomp and apa.
For apa you need
documentclass{article}
usepackage[style=apa,backend=biber]{biblatex}
usepackage{hyperref}
addbibresource{biblatex-examples.bib}
DeclareFieldFormat{bibhyperrefnonest}{%
DeclareFieldFormat{bibhyperref}{##1}%
bibhyperref{#1}}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{cite}}}
{}
{usebibmacro{postnote}%
usebibmacro{cite:post}}
DeclareCiteCommand{textcite}
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{textcite}}}
{}
{usebibmacro{textcite:postnote}%
usebibmacro{cite:post}}
begin{document}
First cite parencite{sigfridsson}.
Second cite parencite{sigfridsson}.
citereset
First cite textcite{sigfridsson}.
Second cite textcite{sigfridsson}.
printbibliography
end{document}

edit: Added a redefinition for textcite as well. Note that the parentheses in textcite may not be linked as expected. Fixing that would be much more complicated.
biblatex-apa defines parencite slightly different than the redefinition in your example assumes. That definition works for some of the standard styles, but not for more complicated styles like authoryear-icomp and apa.
For apa you need
documentclass{article}
usepackage[style=apa,backend=biber]{biblatex}
usepackage{hyperref}
addbibresource{biblatex-examples.bib}
DeclareFieldFormat{bibhyperrefnonest}{%
DeclareFieldFormat{bibhyperref}{##1}%
bibhyperref{#1}}
DeclareCiteCommand{parencite}[mkbibparens]
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{cite}}}
{}
{usebibmacro{postnote}%
usebibmacro{cite:post}}
DeclareCiteCommand{textcite}
{usebibmacro{cite:init}%
usebibmacro{prenote}}
{usebibmacro{citeindex}%
printtext[bibhyperrefnonest]{usebibmacro{textcite}}}
{}
{usebibmacro{textcite:postnote}%
usebibmacro{cite:post}}
begin{document}
First cite parencite{sigfridsson}.
Second cite parencite{sigfridsson}.
citereset
First cite textcite{sigfridsson}.
Second cite textcite{sigfridsson}.
printbibliography
end{document}

edit: Added a redefinition for textcite as well. Note that the parentheses in textcite may not be linked as expected. Fixing that would be much more complicated.
edited 4 hours ago
answered Oct 29 '18 at 20:49
moewemoewe
96.5k10118362
96.5k10118362
I had the same issue and your answer solved it for me, Moewe. Do you know of a similar workaround for the textcite command by any chance? Thanks in advance!
– Michiel Schreurs
6 hours ago
@MichielSchreurs See the edit for the analogue redefinition oftextcite. Note that that might not give exactly what you want w.r.t. the parentheses. Getting the links right there is much more complicated. If you want that you can ask a new question.
– moewe
4 hours ago
add a comment |
I had the same issue and your answer solved it for me, Moewe. Do you know of a similar workaround for the textcite command by any chance? Thanks in advance!
– Michiel Schreurs
6 hours ago
@MichielSchreurs See the edit for the analogue redefinition oftextcite. Note that that might not give exactly what you want w.r.t. the parentheses. Getting the links right there is much more complicated. If you want that you can ask a new question.
– moewe
4 hours ago
I had the same issue and your answer solved it for me, Moewe. Do you know of a similar workaround for the textcite command by any chance? Thanks in advance!
– Michiel Schreurs
6 hours ago
I had the same issue and your answer solved it for me, Moewe. Do you know of a similar workaround for the textcite command by any chance? Thanks in advance!
– Michiel Schreurs
6 hours ago
@MichielSchreurs See the edit for the analogue redefinition of
textcite. Note that that might not give exactly what you want w.r.t. the parentheses. Getting the links right there is much more complicated. If you want that you can ask a new question.– moewe
4 hours ago
@MichielSchreurs See the edit for the analogue redefinition of
textcite. Note that that might not give exactly what you want w.r.t. the parentheses. Getting the links right there is much more complicated. If you want that you can ask a new question.– moewe
4 hours ago
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f457411%2fbiblatex-apa-style-hyperlink-parencite-not-displaying-author-on-2nd-cite%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown