请问图中段落的包裹样式该如何实现呢? 该样式包括 标题、半包裹的段落边框、以及文字内容. 该图是从一个双栏学术论文中截取的. tcolorbox
似乎只能实现全包裹样式; tikz
也许可以实现这种, 但我不太清楚如何下手. 是否有大佬可以提供一个MVP, 谢谢大家.
选自:https://tex.stackexchange.com/questions/235547/editing-theorem-environments
代码如下:
\documentclass{article}
\usepackage{lipsum}
\usepackage{amsmath,amssymb}
\usepackage[most]{tcolorbox}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[french]{babel}
\usepackage{lmodern}
\tcbset{
thmbox/.style={
enhanced,
breakable,
sharp corners=all,
fonttitle=\bfseries\normalsize,
fontupper=\normalsize\itshape,
top=0mm,
bottom=0mm,
right=0mm,
colback=white,
colframe=white,
colbacktitle=white,
coltitle=black,
attach boxed title to top left,
boxed title style={empty, size=minimal, bottom=1.5mm},
overlay unbroken ={
\draw (title.south west)--(title.south east);
\draw ([xshift=3.5mm]frame.north west)|-%
(frame.south east)--(frame.north east);},
overlay first={
\draw (title.south west)--(title.south east);
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);
\draw (frame.north east)--(frame.south east);},
overlay middle={
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);
\draw (frame.north east)--(frame.south east);},
overlay last={
\draw ([xshift=3.5mm]frame.north west)|-%
(frame.south east)--(frame.north east);},
},
S/.style={thmbox,
overlay unbroken ={
\draw (title.south west)--(title.south east);
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
overlay first={
\draw (title.south west)--(title.south east);
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
overlay middle={
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
overlay last={
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
},
L/.style={thmbox,
overlay unbroken ={
\draw (title.south west)--(title.south east);
\draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);},
overlay first={
\draw (title.south west)--(title.south east);
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
overlay middle={
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
overlay last={
\draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);},
},
LQ/.style={thmbox,
overlay unbroken ={
\draw (title.south west)--(title.south east);
\draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);
\node[anchor=east] at (frame.south east) {$\square$};},
overlay first={
\draw (title.south west)--(title.south east);
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
overlay middle={
\draw ([xshift=3.5mm]frame.north west)--([xshift=3.5mm]frame.south west);},
overlay last={
\draw ([xshift=3.5mm]frame.north west)|-([xshift=15mm]frame.south west);
\node[anchor=east] at (frame.south east) {$\square$};},
},
}
\newtcbtheorem[]{tcbthmbox}{Theorem}{thmbox}{theo}
\newtcbtheorem[]{tcbSthmbox}{Theorem}{thmbox,S}{theo}
\newtcbtheorem[]{tcbLthmbox}{Theorem}{thmbox,L}{theo}
\newtcbtheorem[]{proof}{Démonstration}{thmbox,LQ}{theo}
\begin{document}
\begin{tcbthmbox}{First result}{}
\lipsum[3]
\end{tcbthmbox}
\begin{tcbSthmbox}{Important}{}
\lipsum[2]
\end{tcbSthmbox}
\begin{tcbLthmbox}{Final}{}
\lipsum[1]
\end{tcbLthmbox}
\begin{proof}{Proof}{}
\lipsum[1]
\end{proof}
\end{document}
厉害了 谢谢