答案1
使用该包的变体解决方案tcolorbox
:
\documentclass{article}
\usepackage{lipsum}
\usepackage[theorems,skins]{tcolorbox}
\newtcbtheorem{postulate}{Postulate}{
description delimiters parenthesis,
separator sign ={.},
coltitle=black,
colback=white,
fontupper=\itshape,
fonttitle=\upshape\bfseries,
attach title to upper={\ },
empty,
left*=0pt,
right*=0pt,
boxsep=0pt,
top=1em,
bottom=1em,
borderline west={2mm}{-5mm}{blue}
}{section}
\begin{document}
\lipsum[1]
\begin{postulate*} {Heisenberg}
Time translation is given by, $\rho\mapsto e^{-itH}\rho e^{itH}.$
\lipsum[1]
\end{postulate*}
\lipsum[2]
\begin{postulate} {Schr\"odinger}{Schrodinger}
Time translation is given by, $\rho\mapsto e^{-itH}\rho e^{itH}.$
\lipsum[2]
\end{postulate}
\textcolor{red}{See} the postulate \ref{section:Schrodinger}
\end{document}
答案2
这就是你想要的吗?如果不是,请访问一
\documentclass{article}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{mathtools}
\usepackage{lipsum}
\usepackage[framemethod=tikz]{mdframed}
% As I am working with transparency here, you should define darker colors.
\definecolor{colorBackground}{HTML}{F5F5F5} % Grey 500
\definecolor{colorDefinition}{HTML}{4CAF50} % Green 500
\definecolor{colorNotiz}{HTML}{81D4FA} % Light Blue 200
\mdfdefinestyle{box}{
topline=false,
bottomline=false,
rightline=false,
linewidth=4pt,
backgroundcolor=none,
apptotikzsetting={\tikzset{mdfbackground/.append style={fill=gray!45,fill opacity=.6}}},
frametitlefont=\sffamily\bfseries\color{black},
splittopskip=.5cm,
frametitlebelowskip=0.0cm,
}
% Definition
\mdtheorem[style=box,linecolor=colorDefinition]{Def}{Postulate}
\begin{document}
\begin{Def}
$$\rho\mapsto e^{-itH}\rho e^{itH}.$$
\end{Def}
\end{document}