2

I have using mdframed and expecting output is same innertopmargin space is continued to next page:

enter image description here

My MWE is:

\documentclass{book}
\usepackage{mathptmx,lipsum,mdframed,showframe}
\global\mdfdefinestyle{greenbox}{%
linecolor=white,
linewidth=0pt,%
frametitlerule=false,%
frametitlefont=\bfseries\fontsize{10}{13}\selectfont,
hidealllines=true,
backgroundcolor=green,
innertopmargin=25pt,
font=\fontsize{9}{12}\selectfont,
innerleftmargin=14pt,
innerrightmargin=14pt,
innerbottommargin=13pt
}
\begin{document}
\chapter{Chapter Title}
\lipsum[1-4]
\lipsum[5-7]
\begin{mdframed}[style=greenbox]
\lipsum[8-10]
\end{mdframed}

\end{document}
3

As usual, you ask a question on mdframed and I/we answer using tcolorbox ;-)

\documentclass{book}
\usepackage{mathptmx,lipsum,showframe}
\usepackage[most]{tcolorbox}

\newtcolorbox{greenbox}[1][]{%
  enhanced jigsaw,
  arc=0pt,
  outer arc=0pt,
  boxsep=1pt,
  top=25pt,
  bottom=13pt,
  left=14pt,
  right=14pt,
  boxrule=0pt,
  colback=green,
  breakable,
  parbox=false,
  #1
}
\begin{document}
\chapter{Chapter Title}
\lipsum[1-4]
\lipsum[5-7]
\begin{greenbox}
\lipsum[8-10]
\end{greenbox}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.