平均能量损失

平均能量损失

我想制作带有的beamer幻灯片biblatex,并将引文的字体大小设置为,\autocite{}同时\tiny保持引文的字体大小为\textcite默认值(\normalsize)。

目前,我使用\renewcommand*{\citesetup}{\tiny}但此命令将所有引用的字体大小设置为\tiny

有什么方法可以修改beamerbiblatex设置来实现这一点吗?

在此处输入图片描述

请注意,但我不想通过手写输入来获得这种效果\tiny \autocite{...} \normalsize。我正在寻找更系统的方法。

平均能量损失

\documentclass{beamer}

\begin{filecontents*}{biblio.bib}
@Manual{R-rmarkdown,
  title = {rmarkdown: Dynamic Documents for R},
  author = {JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone},
  year = {2020},
  note = {R package version 2.3},
  url = {https://github.com/rstudio/rmarkdown},
}

@Book{knitr2015,
  title = {Dynamic Documents with {R} and knitr},
  author = {Yihui Xie},
  publisher = {Chapman and Hall/CRC},
  address = {Boca Raton, Florida},
  year = {2015},
  edition = {2nd},
  note = {ISBN 978-1498716963},
  url = {https://yihui.org/knitr/},
}
\end{filecontents*}

\usepackage[%
  style = apa6,
  sortcites = true, 
  sorting = nyt, 
  backend = biber]{biblatex}
\bibliography{biblio.bib}

\renewcommand*{\citesetup}{%
  \tiny
}

\title{Untitled}
\author{CLRR}

\begin{document}
\frame{\titlepage}

\begin{frame}{R Markdown}

This is a markdown variant by \textcite{R-rmarkdown}.

This is knitr \autocite{knitr2015}
\end{frame}

\begin{frame}[allowframebreaks]{}
  \bibliographytrue
  \printbibliography[heading=none]
\end{frame}

\end{document}

答案1

不幸的是,当\citesetup使用时,我们还无法访问定界符上下文来分支我们所处的确切引用命令。一个直接但稍微繁琐的解决方案是使用包装器命令来\DeclareCiteCommand包装\parencite(这就是\autocite这里的情况)不仅在括号中,而且在小括号中。

原始定义可以在apa.cbx(版本 8.5 中第 484-503 行)。我们只定义一个新的\mkbibtinyparens并使用它来代替\mkbibparens

\documentclass{beamer}

\usepackage[%
  style = apa6,
  sortcites = true, 
  backend = biber]{biblatex}
\bibliography{biblatex-examples.bib}

\newcommand*{\mkbibtinyparens}[1]{{\tiny\mkbibparens{#1}}}

\DeclareCiteCommand{\parencite}[\mkbibtinyparens]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}%
   \usebibmacro{cite:post}}
  {}
  {\usebibmacro{postnote}}

\DeclareMultiCiteCommand{\parencites}[\mkbibtinyparens]{\parencite}
  {\setunit{\multicitedelim}}

\DeclareCiteCommand*{\parencite}[\mkbibtinyparens]
  {\usebibmacro{cite:init}%
   \usebibmacro{prenote}}
  {\usebibmacro{citeindex}%
   \usebibmacro{citeyear}%
   \usebibmacro{cite:post}}
  {}
  {\usebibmacro{postnote}}

\begin{document}
\begin{frame}{R Markdown}

This is a markdown variant by \textcite{sigfridsson}.

This is knitr \autocite{nussbaum}
\end{frame}

\begin{frame}[allowframebreaks]{}
  \printbibliography[heading=none]
\end{frame}
\end{document}

微小的方解石,正常的方解石。

相关内容