I'm trying to create an environment like quotation
, but with a line on the left.
I would also like it to support multiple paragraphs, footnotes, math environments and floats (basically you should be able to wrap it around any, or most content and it should just work).
The difficult thing is that I want it to handle pagebreaks, even when nested.
From the TeXFAQ entry about breaking boxes of text, I know it is possible to do this with the boites package, but it breaks floats and footnotes, sadly, so this is not an option for me. There have been similar questions before, but for whole boxes instead of only left lines. I'm not sure if this question might be easier to answer. I am also aware that this is apparently not possible to solve using the framed
, mdframed
or tcolorbox
packages (see the package documentations).
There is a similar question about mdframed
specifically, instead of about the problem in general, but the boxes in the answer do not work with arbitrary content. (previous question was marked as duplicate, this is to clarify why I think it isn't)
Can this be done?
Example code adapted from a similar question:
\documentclass{article}
\usepackage{framed}
\usepackage[parfill]{parskip}
\newenvironment{quotationb}%
{\begin{leftbar}}%
{\end{leftbar}}
\begin{document}
\begin{quotationb}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\begin{quotationb}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\begin{quotationb}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{quotationb}
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{quotationb}
Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{quotationb}
\end{document}
quotation
environment. So footnotes should go at the bottom of the page as usual and floats should be placed depending on the placement specifier h/t/c etc. The margins of pages shouldn't matter much for the behaviour and should be user definable.