[Tex/LaTex] \newmdtheoremenv environment without numbering without caption

mdframed

I would like to make a frame around content that breaks across pages. For that I use mdframed package.

Note that in that frame I also have \section and \subsection markers (because I am writing a research proposal for TUBITAK where all my content has to be put into a 1pt wide frame … originally they use Microsoft Word with a single-column-single-row table where the row has a frame and can break across pages … now I have to reproduce that in LaTeX because … you know … Word has no Biblatex and so on.

If I use \begin{mdframed} it works nice, but the frame is too thin. Using \usepackage[linewidth=1pt]{mdframed} did not work.

Now I tried to configure the frame to use a heavier line style with \newmdtheoremenv. Now I get compile errors for each \section and \subsection entry.

Do you have any ideas how I could avoid that?

If you have another idea for putting text into across-page-breakable frames or just for putting vertical lines besides text on the page I am also grateful. (I could then just add starting and finishing horizontal lines. mdframed makes footnotes frame-local so having an alternative solution would even be better.)

Best Answer

tcolorbox is more advanced and fancier for such jobs. Here is a simple example to get you started.

\documentclass[12pt,a4paper]{article}
\usepackage{kantlipsum}
\usepackage{tcolorbox}%

\tcbuselibrary{breakable}
\begin{document}%
\begin{tcolorbox}[boxrule=1pt,colback=yellow!30,arc=0mm, breakable] %% you can add many more options if 
                                                                    %% you like.
\section{Some section}
\kant[1-5]
\subsection{A subsection}
\kant[1]
\end{tcolorbox}
\end{document}

enter image description here

You can make it fancier and adjust dimensions etc. For details refer to the manual.

Related Question