I would like to know how to keep a whole framed box on the same page. I am finishing a manuscript and I am quite afraid to move the text before/after to check this.
I take this example, from here.
\documentclass{article}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{lipsum}
\mdfdefinestyle{MyFrame}{%
linecolor=blue,
outerlinewidth=2pt,
roundcorner=20pt,
innertopmargin=\baselineskip,
innerbottommargin=\baselineskip,
innerrightmargin=20pt,
innerleftmargin=20pt,
backgroundcolor=gray!50!white}
\begin{document}
\begin{mdframed}[style=MyFrame]
\lipsum[1]
\begin{equation}
f(x) = \sin(x)
\end{equation}
\lipsum[2]
\end{mdframed}
\end{document}
I know that in the figures, you can put a "H", like this:
\begin{figure}[H]
\centering
\includegraphics[width=0.8\linewidth]{image}
\caption{This is the caption.}
\label{fig:label_image}
\end{figure}
Is it possible to do so with framed box ? And/or fix at the page number 2 ?
\textwidth? @koleygr – Agape Gal'lo Oct 23 '18 at 17:11}". Your code works perfectly ! – Agape Gal'lo Oct 23 '18 at 18:03\parbox{\textwidth-40pt}– koleygr Dec 22 '18 at 03:12