我想apa6
使用 在每个投影仪幻灯片底部以样式显示我的参考文献biblatex
。目前我设置\usepackage[style=apa6,sortcites = true, sorting = nyt, backend = biber, autocite=footnote]{biblatex}
命令\autocite{}
在幻灯片底部显示引用信息。但是,\autocite{}
仅生成作者年份引用,如下面的屏幕截图所示(“1 Allaire et al., 2020”)。
我知道这\footfullcite{}
能达到我想要的效果(上图中的“2 Xie., Y. (2015)...”)。不过,我\autocite{}
之前已经用过很多次了,在我的环境中,我不想用 替换\autocite{}
所有\footfullcite{}
。
所以我的问题是是否有办法设置autocite = footfullcite
或者我是否可以使用 生成apa6
样式引用autocite = footnote, style = verbose
。有人有什么建议吗?
% Options for packages loaded elsewhere
\PassOptionsToPackage{unicode}{hyperref}
\PassOptionsToPackage{hyphens}{url}
%
\documentclass[
ignorenonframetext,
]{beamer}
\usepackage{pgfpages}
\setbeamertemplate{caption}[numbered]
\setbeamertemplate{caption label separator}{: }
\setbeamercolor{caption name}{fg=normal text.fg}
\beamertemplatenavigationsymbolsempty
% Prevent slide breaks in the middle of a paragraph
\widowpenalties 1 10000
\raggedbottom
\setbeamertemplate{part page}{
\centering
\begin{beamercolorbox}[sep=16pt,center]{part title}
\usebeamerfont{part title}\insertpart\par
\end{beamercolorbox}
}
\setbeamertemplate{section page}{
\centering
\begin{beamercolorbox}[sep=12pt,center]{part title}
\usebeamerfont{section title}\insertsection\par
\end{beamercolorbox}
}
\setbeamertemplate{subsection page}{
\centering
\begin{beamercolorbox}[sep=8pt,center]{part title}
\usebeamerfont{subsection title}\insertsubsection\par
\end{beamercolorbox}
}
\AtBeginPart{
\frame{\partpage}
}
\AtBeginSection{
\ifbibliography
\else
\frame{\sectionpage}
\fi
}
\AtBeginSubsection{
\frame{\subsectionpage}
}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{textcomp} % provide euro and other symbols
\else % if luatex or xetex
\usepackage{unicode-math}
\defaultfontfeatures{Scale=MatchLowercase}
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
\fi
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\makeatletter
\@ifundefined{KOMAClassName}{% if non-KOMA class
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
\KOMAoptions{parskip=half}}
\makeatother
\usepackage{xcolor}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\hypersetup{
pdftitle={Untitled},
pdfauthor={Masataka Ogawa},
hidelinks,
pdfcreator={LaTeX via pandoc}}
\urlstyle{same} % disable monospaced font for URLs
\newif\ifbibliography
\usepackage{longtable,booktabs}
\usepackage{caption}
% Make caption package work with longtable
\makeatletter
\def\fnum@table{\tablename~\thetable}
\makeatother
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{5}
\ifluatex
\usepackage{selnolig} % disable illegal ligatures
\fi
\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, autocite=footnote]{biblatex}
\addbibresource{biblio.bib}
\title{Untitled}
\author{CLRR}
\date{2020/10/1}
\begin{document}
\frame{\titlepage}
\begin{frame}{R Markdown}
\protect\hypertarget{r-markdown}{}
%\renewcommand{\autocite}[1]{\footfullcite{#1}}
This is an \textcite{R-rmarkdown} presentation \autocite{R-rmarkdown}.
This is knitr\footfullcite{knitr2015}
\end{frame}
\begin{frame}[allowframebreaks]{}
\bibliographytrue
\printbibliography[heading=none]
\end{frame}
\end{document}
答案1
你可以用 定义一个新autocite
类型\DeclareAutoCiteCommand
。但在那之前我们需要先定义\footfullcites
。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=biber]{biblatex}
\DeclareMultiCiteCommand{\footfullcites}[\mkbibfootnote]{\footfullcite}{\multicitedelim}
\DeclareAutoCiteCommand{footfullcite}[f]{\footfullcite}{\footfullcites}
\ExecuteBibliographyOptions{autocite=footfullcite}
\addbibresource{biblatex-examples.bib}
\begin{document}
Lorem\autocite{sigfridsson}
Lorem\autocites[380]{worman}[12]{nussbaum}
\printbibliography
\end{document}