使用以下代码:
\renewcommand*{\multinamedelim}{\textendash}
\renewcommand*{\finalnamedelim}{\textendash}
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printtext[bibhyperref]{\printnames{labelname}}}
{\multicitedelim}
{\usebibmacro{postnote}}
% Redefine \citeyear to only output the last two digits
\DeclareCiteCommand{\citeshortyear}
{}
{\bibhyperref{\printlasttwo{\thefield{year}}}}
{\multicitedelim}
{}
% Define a new command to print the last two digits of a string
\newcommand{\printlasttwo}[1]{\expandafter\lasttwo\StrRight{#1}{2}\relax}
\def\lasttwo#1#2\relax{#1#2\cprime}
\newcommand{\aycite}[1]{%
{\mkbibbrackets{\citeshortyear{#1}\,\citeauthor{#1}}}%
}
我能够创建一个类似于[69' Gelfond]
的引用\aycite{Gelfond69}
,但是,如果我将它与多重引用一起使用,那么它的输出将不如预期:
\aycite{Gelfond69,Gelfond79}->[69';79' Gelfond; Gelfond]
,我期望
[69' Gelfond; 79' Gelfond]
。
平均能量损失
\documentclass{beamer}
\usepackage[bibencoding=utf8,
backend=biber,
style=authoryear-comp,
doi=false,
url=false,
eprint=true,
isbn=true,
giveninits]{biblatex}
\usepackage{xstring}
\usepackage{mathscinet}
\renewcommand*{\multinamedelim}{\textendash}
\renewcommand*{\finalnamedelim}{\textendash}
\DeclareCiteCommand{\citeauthor}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}}
{}%
\printtext[bibhyperref]{\printnames{labelname}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\citeshortyear}
{}
{\bibhyperref{\printlasttwo{\thefield{year}}}}
{\multicitedelim}
{}
% Define a new command to print the last two digits of a string
\newcommand{\printlasttwo}[1]{\expandafter\lasttwo\StrRight{#1}{2}\relax}
\def\lasttwo#1#2\relax{#1#2\cprime}
\newcommand{\aycite}[1]{%
{\mkbibbrackets{\citeshortyear{#1}\,\citeauthor{#1}}}%
}
\usepackage{filecontents}
\begin{filecontents}[overwrite]{\jobname.bib}
@incollection {Gelfond1969Hilberts,
AUTHOR = {Gel\cprime fond, A. O.},
TITLE = {On {H}ilbert's seventh problem},
BOOKTITLE = {Hilbert's {P}roblems ({R}ussian)},
PAGES = {121--127},
PUBLISHER = {Izdat. ``Nauka'', Moscow},
YEAR = {1969},
MRCLASS = {10.32},
MRNUMBER = {253994},
MRREVIEWER = {K. Mahler},
}
@incollection {Gelfond1979Hilberts,
AUTHOR = {Gel\cprime fond, A. O.},
TITLE = {On {H}ilbert's seventh problem},
BOOKTITLE = {Hilbert's {P}roblems ({R}ussian)},
PAGES = {121--127},
PUBLISHER = {Izdat. ``Nauka'', Moscow},
YEAR = {1979},
MRCLASS = {10.32},
MRNUMBER = {253994},
MRREVIEWER = {K. Mahler},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
\aycite{Gelfond1969Hilberts,Gelfond1979Hilberts}
\printbibliography
\end{document}