我想在段落或段落组(可能包括引文、列表等)后面放置一个浅灰色框。不幸的是,它mdframed
会捕获脚注并将其带入灰色框中。我的尝试导致\colorbox
脚注消失。
那么,有没有办法在段落/列表/引号等后面添加颜色,而不影响脚注?
更新:应 Teepeemm 的要求,这里有一个最小示例文档,我不知道如何更新它以以不干扰脚注的方式应用灰色框。
\documentclass{article}
\begin{document}
This is some text and this is is some more
text.\footnote{This is a footnote} And here
is some text.
\end{document}
答案1
从中获取解决方案这里(谢谢特洛伊),在 mdframe-box 中添加脚注似乎很容易,我猜,这个问题确实是重复的......
\documentclass[]{article}
\usepackage{mdframed}
\usepackage{tablefootnote, blindtext}
\makeatletter
\AfterEndEnvironment{mdframed}{%
\tfn@tablefootnoteprintout%
\gdef\tfn@fnt{0}%
}
\makeatother
\begin{document}
This is some text and this is is some more
text.\footnote{This is a footnote} And here
is some text.
\begin{mdframed}
This is text inside the frame\tablefootnote{foo}
and some more text inside the frame\tablefootnote{bar}.
\end{mdframed}
This is some text and this is is some more
text.\footnote{This is the laaaaast footnote} And here
is some text.
\end{document}