我的文本中有许多书籍、文章……。我已将 biblatex 配置设置为
\usepackage[
backend=biber,
style=alphabetic,
citestyle=authortitle
]{biblatex}
因为在介绍中,我使用 很容易地引用现有论文\cite{bib:key}
,它会给我作者和标题。但现在我还想引用,它只给出命令中给出的编号,\printbibliography
这样我就可以引用文章中的文本,然后只需给出它所属的参考编号,而无需再次给出完整的作者和标题。这该怎么做?
答案1
我建议您坚持使用style=alphabetic,
并为摘要中的引用定义一个新命令。对于摘要中的作者标题引用,我们可以直接复制相关代码authortitle.cbx
并重命名宏以避免名称冲突。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=alphabetic, backend=biber]{biblatex}
\newbibmacro*{atcite}{%
\iffieldundef{shorthand}
{\printnames{labelname}%
\setunit*{\printdelim{nametitledelim}}%
\usebibmacro{atcite:title}}%
{\usebibmacro{atcite:shorthand}}}
\newbibmacro*{at:citetitle}{%
\iffieldundef{shorthand}
{\usebibmacro{atcite:title}}%
{\usebibmacro{atcite:shorthand}}}
\newbibmacro*{atcite:title}{%
\printtext[bibhyperref]{%
\printfield[citetitle]{labeltitle}}}
\newbibmacro*{atcite:shorthand}{%
\printtext[bibhyperref]{\printfield{shorthand}}}
\DeclareCiteCommand{\atcite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{atcite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\atcite}
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{at:citetitle}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand{\patcite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{atcite}}
{\multicitedelim}
{\usebibmacro{postnote}}
\DeclareCiteCommand*{\patcite}[\mkbibparens]
{\usebibmacro{prenote}}
{\usebibmacro{citeindex}%
\usebibmacro{at:citetitle}}
{\multicitedelim}
{\usebibmacro{postnote}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\begin{abstract}
Lorem \patcite{nussbaum} ipsum \atcite{geer}
\end{abstract}
\section{Real text}
\autocite{sigfridsson,worman}
\printbibliography
\end{document}