
Mein Ziel ist es, mehrere Quellen mit (ohne Datum) zu zitieren shortauthor
und die Quellenangabe in Klammern zu setzen. Da es keinen \parenciteauthor
Befehl gibt, habe ich einen definiert, der auf basiert \citeauthor
.
skipbib=true
Darüber hinaus möchte ich diese Einträge mit Hilfe der Option bzw. aus dem Literaturverzeichnis ausschließen skipbiblist=true
.
Mein Ansatz funktioniert immer dann, wenn ich eineinzelQuelle. Leider kann ich immer nur eine dieser beiden Anforderungen erfüllen, wenn ich zitieremehrereQuellen.
Wenn ich die Option verwende skipbiblist=true
, kann ich beide Quellen gleichzeitig zitieren (siehe Zeile 2 der Ausgabe). Die Einträge erscheinen aber trotzdem im Literaturverzeichnis. Wenn ich stattdessen die Option verwende skipbib=true
, werden die Einträge erfolgreich aus dem Literaturverzeichnis entfernt. Das Zitieren einer einzelnen Quelle funktioniert auch problemlos (Zeile 3 der Ausgabe). Wenn ich aber mehrere Quellen gleichzeitig zitiere, sind die Klammern beim Zitat leer (Zeile 4 der Ausgabe).
Gibt es eine Möglichkeit, beide Anforderungen gleichzeitig zu erfüllen? Warum sind die Klammern bei der Verwendung leer skipbib=true
?
So sieht meine Ausgabe aus:
MIAUEN:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[style=authoryear-icomp,
backend=biber,
bibstyle=authoryear
]{biblatex}
\newcommand{\parenciteauthor}[1]{(\citeauthor{#1})}
\begin{filecontents*}[overwrite]{publist.bib}
@misc{test1,
author = {Author1},
shortauthor = {T1},
title = {Paper 1},
year = {2010},
howpublished = {Paper presented at the meeting of Organization Name, Location},
options = {skipbiblist=true}
}
@misc{test2,
author = {Author2},
shortauthor = {T2},
title = {Paper 2},
year = {2010},
howpublished = {Paper presented at the meeting of Organization Name, Location},
options = {skipbiblist=true}
}
@misc{test3,
author = {Author3},
shortauthor = {T3},
title = {Paper 3},
year = {2010},
howpublished = {Paper presented at the meeting of Organization Name, Location},
options = {skipbib=true}
}
@misc{test4,
author = {Author4},
shortauthor = {T4},
title = {Paper 4},
year = {2010},
howpublished = {Paper presented at the meeting of Organization Name, Location},
options = {skipbib=true}
}
\end{filecontents*}
\addbibresource{publist.bib}
\begin{document}
Cite paper 1 \parenciteauthor{test1} and paper 2 \parenciteauthor{test2}, both with the option skipbiblist=true.
Cite paper 1 and 2 together: \parenciteauthor{test1,test2}. % This is how I want to output to look like. Unfortunately, the sources still show up in the list of references.
Cite paper 3 \parenciteauthor{test3} and paper 4 \parenciteauthor{test4}, both with the option skipbib=true.
Cite paper 3 and 4 together: \parenciteauthor{test3,test4}. % The sources are omitted from the list of references as desired, but the citation does not work.
\printbibliography
\end{document}
Antwort1
Aktualisieren
Der hier gefundene Fehler wurde in biblatex
v3.18 (22.06.2022) behoben. Aktualisieren Sie Ihr System, wenn dieses Problem weiterhin auftritt.
Dieses Problem wird nicht durch eine Ihrer Definitionen verursacht. Es wird durch einen Fehler in verursacht biblatex
:https://github.com/plk/biblatex/issues/1225.
Wenn Sie möchten, dass die Dinge jetzt funktionieren, können Sie den Fix fürhttps://github.com/plk/biblatex/issues/1225wie folgt. Bitte denken Sie daran, den \makeatletter ... \makeatother
Block zu löschen, sobald biblatex
er aktualisiert wurde.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[
backend=biber,
style=authoryear-icomp,
]{biblatex}
\makeatletter
\protected\def\blx@bbl@endentry{%
\csuse\blx@bbl@data
\ifcsundef{blx@pref@\the\c@refsection @\abx@field@entrykey}
{}
{\blx@addpageref{\abx@field@entrykey}}%
\nottoggle{blx@setonly}
{}
{\global\toggletrue{blx@addset}%
\toggletrue{blx@skipbib}%
\toggletrue{blx@skipbiblist}%
\toggletrue{blx@skiplab}}%
\expandafter\ifstrequal\expandafter{\blx@dlist@type}{entry}
{\listcsxadd{blx@type@\the\c@refsection @\abx@field@entrytype}{\abx@field@entrykey}%
\ifdef\abx@field@entrysubtype
{\listcsxadd{blx@subt@\the\c@refsection @\abx@field@entrysubtype}{\abx@field@entrykey}}
{}%
\nottoggle{blx@setonly}
{\listcsxadd{blx@dlist@centry@\the\c@refsection @\blx@dlist@name}{\abx@field@entrykey}}
{}%
\nottoggle{blx@skipbib}
{\listcsxadd{blx@dlist@entry@\the\c@refsection @\blx@dlist@name}{\abx@field@entrykey}}
{}}%
{}%
\nottoggle{blx@skipbiblist}
{\expandafter\ifstrequal\expandafter{\blx@dlist@type}{list}
{\blx@bbl@labelfields
\listcsxadd{blx@dlist@\blx@dlist@type @\the\c@refsection @\blx@dlist@name}{\abx@field@entrykey}}
{}}%
{}%
\nottoggle{blx@skiplab}
{\iftoggle{blx@labelnumber}
{\blx@bbl@labelnumber}
{}%
\iftoggle{blx@labelalpha}
{\blx@bbl@labelalpha}
{}%
\iftoggle{blx@labeltitle}
{\blx@bbl@labeltitle}
{}%
\iftoggle{blx@labeltitleyear}
{\blx@bbl@labeltitleyear}
{}%
\iftoggle{blx@labeldateparts}
{\blx@bbl@labeldate}
{}%
\blx@bbl@labelname}
{}%
\blx@bbl@titles
\blx@bbl@hooks
\endgroup}
\makeatother
\newcommand{\parenciteauthor}[1]{(\citeauthor{#1})}
\begin{filecontents*}[overwrite]{\jobname.bib}
@misc{test1,
author = {Author1},
title = {Paper 1},
year = {2010},
options = {skipbiblist=true},
}
@misc{test2,
author = {Author2},
title = {Paper 2},
year = {2010},
options = {skipbiblist=true}
}
@misc{test3,
author = {Author3},
title = {Paper 3},
year = {2010},
options = {skipbib=true}
}
@misc{test4,
author = {Author4},
title = {Paper 4},
year = {2010},
options = {skipbib=true}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\begin{document}
Cite paper 1 \parenciteauthor{test1}
and paper 2 \parenciteauthor{test2}, both with the option skipbiblist=true.
Cite paper 1 and 2 together: \parenciteauthor{test1,test2}.
Cite paper 3 \parenciteauthor{test3} and paper 4 \parenciteauthor{test4},
both with the option skipbib=true.
Cite paper 3 and 4 together: \parenciteauthor{test3,test4}.
\printbibliography
\end{document}
Wie ich oben erwähnt habe, liegt das Problem nicht an Ihren Definitionen, sondern
\DeclareCiteCommand{\parenciteauthor}[\mkbibparens]
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printnames{labelname}}
{\multicitedelim}
{\usebibmacro{postnote}}
wäre etwas idiomatischer - wenn auch zugegebenermaßen viel länger als
\newcommand{\parenciteauthor}[1]{(\citeauthor{#1})}