I've used the original zitat
tcolorbox
environment and extended it a little bit, detaching a title to the upper box, with bold font, and \large
as fontsize declaration.
The vertical line can be generated with the borderline west=...
option, the box is breakable,as is shown in the screenshot.
\documentclass{article}
\usepackage{blindtext}
\usepackage[most]{tcolorbox}
\definecolor{block-gray}{gray}{0.95}
\newtcolorbox{zitat}[2][]{%
colback=block-gray,
grow to right by=-10mm,
grow to left by=-10mm,
boxrule=0pt,
boxsep=0pt,
breakable,
enhanced jigsaw,
borderline west={4pt}{0pt}{gray},
title={#2\par},
colbacktitle={block-gray},
coltitle={black},
fonttitle={\large\bfseries},
attach title to upper={},
#1,
}
\begin{document}
\begin{zitat}{Minimal working document}
A document that contains the relevant documentclass, the packages, a document-environment and the code that produces the issue.
\blindtext[5]
\end{zitat}
\end{document}
Best Answer
As you probably know,
tcolorbox
can create all kind of coloured boxes and also includes atheorems
library to support creation of coloured environments for theorems, definitions, ...The main command for these kind of boxes is:
which is explained in section 16.1 from tcolorbox documentation. This command creates an environment
env-name
with two mandatory parameters, a theorem title and a label which will be preceded by thereference prefix
to create a label associated with this particular box.Following code shows how to use three
\newtcbtheorem
commands for the definition of theorems, definitions and corollaries with the desired style. All boxes will break on page boundaries, but only the first fragment will be labelled. If box contents height is shorter than rotated title height, undesired effects will appear as you can see in first example.(Side note: if following code shows an error related to
tcolorbox
options, please updatetcolorbox
package`)