我想在 Beamer 演示文稿中添加一些参考资料。添加完整的参考书目当然很麻烦,但包\fullcite
中的命令输出biblatex
太冗长了。
我正在寻找类似的命令\fullcite
,只会插入作者、标题和年份
某种 MWE 可能是:
\documentclass{beamer}
\usepackage[backend=bibtex, style=authoryear-comp]{biblatex}
\addbibresource{biblio}
\begin{document}
\begin{frame}
\XXXcite{Kennedy01}
\end{frame}
\end{document}
biblio.bib 包含
@Article{Kennedy01,
author = {Kennedy, Marc C. and O'Hagan, Anthony},
title = {Bayesian calibration of computer models},
journal = {Journal of the royal statistical society: series b (statistical methodology)},
year = 2001,
volume = 63,
number = 3,
pages = {425-464}}
并且\XXXcite
是类似于的所需命令\fullcite
。
我想在哪里可以找到书目样式的集合?可以使用,但我对其工作原理的理解非常有限biblatex
。
答案1
这可能不是最有效的方法(我是 biblatex 的新手),但它确实有效
\documentclass{beamer}
\usepackage[backend=bibtex, style=authoryear-comp]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{Kennedy01,
author = {Kennedy, Marc C. and O'Hagan, Anthony},
title = {Bayesian calibration of computer models},
journal = {Journal of the royal statistical society: series b (statistical methodology)},
year = 2001,
volume = 63,
number = 3,
pages = {425-464}}
\end{filecontents}
\addbibresource{\jobname.bib}
\newcommand{\customcite}[1]{\citeauthor{#1}, \citetitle{#1}, \citeyear{#1}}
\begin{document}
\begin{frame}
\customcite{Kennedy01}
\end{frame}
\end{document}
答案2
可能最直接的方法是定义一个新的引用命令:
\DeclareCiteCommand{\customcite}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}%
\indexfield{indextitle}}
{}%
\printnames{labelname}%
\setunit{\labelnamepunct}%
\printfield[citetitle]{labeltitle}%
\newunit
\printfield{year}}
{\multicitedelim}
{\usebibmacro{postnote}}
答案3
答案与@Oleg Domanov还添加了引用的超链接:
\documentclass{article}
\usepackage[backref=true]{biblatex}
\usepackage{hyperref}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@misc{A01,
author = {Author, A.},
year = {2001},
title = {Alpha},
}
@misc{B02,
author = {Buthor, B.},
year = {2002},
title = {Bravo},
}
\end{filecontents}
\addbibresource{\jobname.bib}
\DeclareCiteCommand{\customcite}
{\boolfalse{citetracker}%
\boolfalse{pagetracker}%
\usebibmacro{prenote}}
{\ifciteindex
{\indexnames{labelname}%
\indexfield{indextitle}}
{}%
\printtext[bibhyperref]{%
\printnames{labelname}%
\setunit{\labelnamepunct}%
\printfield[citetitle]{labeltitle}%
\newunit
\printfield{year}%
}%
}
{\multicitedelim}
{\usebibmacro{postnote}}
\begin{document}
In this cite \customcite{A01} I do get a link now.
\printbibliography
\end{document}
相关问题:
- \setunit 和 \newunit 起什么作用?
- 隐藏 \citetitle 中的引号或其他标记
- 使 \cite{我的参考} 显示名称和年份
- 使用 \citeauthor 时在 biblatex 中超链接作者姓名
- biblatex+hyperref: citetitle/citeauthor 并获取超链接
- 使用 \fullcite 悬挂引用
- 使用 biblatex 的 printfield 而不进行格式化
- 如何提取 BibTeX 条目(如 DOI、摘要等)
- 自定义 \cite 命令
- biblatex - 我怎样才能让 \printfield{number} 只打印数字(图形)而不打印“Nr.”?
- \citefield 参考书目链接 (hyperref & backref)
- biblatex 的 \citefield{key}{author} 和 \citefield{key}{journal} 不起作用
- 不带斜体的替代 \citetitle 命令
- bibtex 是否无法在 latex 中引用特定条目(作者、标题)?
- 如何在 LaTeX 中引用作者?
- 使用一个命令引用标题和作者