I'm trying to decorate a long (multipage) quote environment by adding bars on both sides, or a colored background.
I've seen environments like mdframed for such cases, but they affect footnotes : they are processed and shipped out at the end of the environment.
The \footnotemark[]/\footnotext[] after the \end{} method is not relevant for this problem, notes are still shipped out on the last page of the environnement.
I've seen the package footnotehyper that can solve some of the problems causes by such environments, with the command \savenotes and \spewnotes but, that does not restore the default page by page behaviour either.
I've also seen the option footnoteinside from the mdframed but, as the manual states:
The output of the footnotes with the option
footnoteinside=falseare not in a splitted frame. I think it isn’t useful because the first line of a new page shouldn’t be a footnote.
My guess is that the author not only finds it not useful but finds it also a hard problem to fix.
Here is the best I can do to make the quote block obvious, but the footnote text is all at the end of the block.
\documentclass{article}
\usepackage{lipsum}
\usepackage{tikz}
\usepackage{mdframed}
\usepackage{subcaption}
\usepackage{footnotehyper}
\begin{document}
\section{Regular quote environnement}
Here is a very long quote:
\begin{quote}
Hello\footnote{Used anytime}
\textcolor{lightgray}{\lipsum}
Good morning\footnote{Only in the morning}
\begin{figure}
\centering
\begin{tikzpicture}
\node[draw=black]{Hi i'm a picture!};
\end{tikzpicture}
\caption{example of figure}
\end{figure}
\textcolor{lightgray}{\lipsum}
Good evening\footnote{Only in the evening}
\end{quote}
But the highlighting of the quote is not very obvious. Floats do work as intended, and footnotes have their default behaviour\footnote{I mean, the text of the footnote is written on the same page of the mark}.
\section{Mdframed environnement}
Here is a very long quote:
\begin{savenotes} % \usepackage{footnotehyper}
\begin{mdframed} %[footnoteinside=false] % This option would print the a b and c footnote outside the box but on a specific area. This is less usfull than \begin{savenotes} which send the notes on the general footnote area.
% Float will not work here, but I can redefine the environment so that they have a similar behavior, not exactly the same, but the do not mess the reading flow:
\renewenvironment{figure}[1][options]% % ##
{\captionsetup{type=figure}\begin{center}}% %\usepackage{subcaption}
{\end{center}}
%%%%%%%
\begin{quote}
Hello\footnote{Used anytime}
\textcolor{lightgray}{\lipsum}
Good morning\footnote{Only in the morning}
\begin{figure}
\centering
\begin{tikzpicture}
\node[draw=black]{Hi i'm a picture!};
\end{tikzpicture}
\caption{example of figure}
\end{figure}
\textcolor{lightgray}{\lipsum}
Good evening\footnote{Only in the evening}
\end{quote}
\end{mdframed}
\end{savenotes}
The highlighting of the quote is way more obvious. Floats can work as intended (with a minor tweaking), but footnotes have an annoying behaviour\footnote{I mean, they are resolved at the end of the environnment}.
\end{document}
As I understand things, all environments based on minipage and assimilated will affect the footnotes. The problems are the same with tcolorbox for example. Thus, I would need to find one that is not based on a minipage mechanics.
I need to find commands that do modify something at the \begin and restore it at the \end, like one can do with margins, text color... Based on this approach, one could use a tikzpicture with remember picture on every paragraph like here. But that seems overkill.
Well, so my question, do you know any easy way to decorate a long environment with border or color that would not need a minipage and break footnotes? Or do you see an easy way to restore the default footnote behaviour in such an environment?
Or if not, can you see any other way of highlighting the environment that is not "dealing with the margin or the font", and that would be relevant for multi page block ?
Thanks in advance.
