我有一些框,我想将它们视为浮动环境。我为原始文档中的浮动框设置了一个自定义环境,但我遇到的问题在 中重现figure
。
当引用在 mdframed 浮动中连续出现时,引用会出现在框的底部(如预期),但不会像其他地方一样使用 ibid。我如何确保在这种情况下使用 ibid?
MWE。我想要的输出像第二个框一样,但像第一个框一样浮动。
\documentclass{article}
\usepackage[b6paper]{geometry}
\usepackage[backend=biber,style=authoryear-ibid]{biblatex}
\usepackage{mdframed}
\begin{filecontents}{\jobname.bib}
@book{Labov1972,
Address = {Philadelphia},
Author = {William Labov},
Publisher = {University of Pennsylvania Press},
Title = {Sociolinguistic Patterns},
Year = {1972}}
@book{Chomsky1957,
Address = {The Hague},
Author = {Noam Chomsky},
Publisher = {Mouton},
Title = {Syntactic Structures},
Year = {1957}}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\begin{document}
La\footcite{Labov1972} and La\footcite{Labov1972}
\begin{mdframed}
La\footcite{Chomsky1957} and La\footcite{Chomsky1957}
\end{mdframed}
\begin{figure}
\begin{mdframed}
La\footcite{Labov1972} and La\footcite{Labov1972}
\end{mdframed}
\end{figure}
\printbibliography
\end{document}
答案1
浮动结构在引用跟踪方面有点棘手,因为它们在某种程度上超出了文本流。因此biblatex
默认情况下禁用引用跟踪。
另请参阅 §4.11.5浮标和 TOC/LOT/LOF 中的追踪器
如果在浮动体中给出引文(通常在图片或表格的标题中),学术反向引用(如“ibidem”)或基于页面跟踪器的反向引用将变得含糊不清,因为浮动体是(物理和逻辑上)位于文本流之外的对象,因此此类引用的逻辑不太适用于它们。为了避免任何此类含糊不清,所有浮动体中的引文和页面跟踪器都暂时被禁用。
在里面biblatex
手动的。
我们可以使用以下命令重新启用它
\makeatletter
\AtBeginDocument{%
\apptocmd\@floatboxreset
{\booltrue{citetracker}%
\booltrue{pagetracker}}
{}
{\blx@err@patch{floats}}
}
\makeatother
在大多数情况下,这会给出预期的输出,但如果您的盒子浮动“太多”,您可能会看到意外的结果。
在 MWE 中
\documentclass{article}
\usepackage[b6paper]{geometry}
\usepackage[backend=biber,style=authoryear-ibid]{biblatex}
\usepackage{mdframed}
\begin{filecontents}{\jobname.bib}
@book{Labov1972,
Address = {Philadelphia},
Author = {William Labov},
Publisher = {University of Pennsylvania Press},
Title = {Sociolinguistic Patterns},
Year = {1972}}
@book{Chomsky1957,
Address = {The Hague},
Author = {Noam Chomsky},
Publisher = {Mouton},
Title = {Syntactic Structures},
Year = {1957}}
}
\end{filecontents}
\addbibresource{\jobname.bib}
\makeatletter
\AtBeginDocument{%
\apptocmd\@floatboxreset
{\booltrue{citetracker}%
\booltrue{pagetracker}}
{}
{\blx@err@patch{floats}}
}
\makeatother
\begin{document}
La\footcite{Labov1972} and La\footcite{Labov1972}
\begin{mdframed}
La\footcite{Chomsky1957} and La\footcite{Chomsky1957}
\end{mdframed}
\begin{figure}
\begin{mdframed}
La\footcite{Labov1972} and La\footcite{Labov1972}
\end{mdframed}
\end{figure}
\printbibliography
\end{document}
它做了正确的事。