从我的问题开始是否存在眼镜的符号?从最好的@Milo的回答中,我使用宏创建了这个MWE \advice
,
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usepackage{colortbl}
\definecolor{ocre}{RGB}{243,102,25}
\newcommand{\glasses}{\resizebox{3em}{!}{%
\tikz{\draw(0,0) coordinate (Origin) --++(0.2,0) coordinate (endL) arc (180:0:0.05)--++(0.2,0) coordinate (endR) --++(45:0.25) arc (180-45:0:0.08) (endR) arc (0:-180:0.1) (endL) arc (0:-180:0.1) (Origin)--++(45:0.25) arc (180-45:0:0.08);
}}}
\newcommand{\advice}{\begin{table}[ht]
\centering
{\renewcommand{\arraystretch}{1.8}
\begin{tabular}{c!{\color{white}\vrule width 1pt}c}
\rowcolor{olive!20}
\textcolor{ocre}{\glasses\, \textbf{\textsc{\large Attenzione:}}} & \cellcolor{gray!15} Long Long empty cell with a break \\
\end{tabular}}
\end{table}}
\begin{document}
\advice
\end{document}
得到这个输出:
如何为第二列灰色创建可见的断裂效果?对于第二列灰色,我希望有一个粗糙效果,就像@David Carlisle 在他的评论中创建的最佳图中显示的图像一样粗糙:
答案1
\documentclass{article}
\usepackage[many]{tcolorbox}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{lipsum}
\newtcolorbox{Sebastiano}{%
colback=white,right=1cm,left=2cm,
enhanced,% jigsaw, breakable, % allow page breaks
frame hidden, % hide the default frame
overlay={%
\draw[decoration={random steps,segment length=2pt,amplitude=1pt}]
(frame.south east)
-- (frame.south west) --
(frame.north west)--([xshift=-1cm]frame.north east)
decorate { --cycle};
\draw([xshift=2cm]frame.south west) --
([xshift=2cm]frame.north west) ;
\begin{scope}[shift={([xshift=3.14mm]frame.west)}]
\draw(0,0) coordinate (Origin) --++(0.2,0) coordinate (endL) arc (180:0:0.05)--++(0.2,0) coordinate (endR) --++(45:0.25) arc (180-45:0:0.08) (endR) arc (0:-180:0.1) (endL) arc (0:-180:0.1) (Origin)--++(45:0.25) arc (180-45:0:0.08);
\end{scope}
},
% paragraph skips obeyed within tcolorbox
parbox=false,
}
\begin{document}
\begin{Sebastiano}
I dunno what to write. Too many users who really were great supporters of TeX-SE
left, so I dunno what to say.
\end{Sebastiano}
\end{document}
\documentclass{article}
\usepackage[many]{tcolorbox}
\usetikzlibrary{decorations.pathmorphing}
\usepackage{lipsum}
\newtcolorbox{Sebastiano}{%
colback=white,left=3.4cm,%,right=1cm
enhanced,% jigsaw, breakable, % allow page breaks
frame hidden, % hide the default frame
overlay={%
\draw[fill=gray!30,decoration={random steps,segment length=2pt,amplitude=1pt}]
([xshift=-4cm]frame.south east)
-- ([xshift=3.4cm]frame.south west) --
([xshift=3.4cm]frame.north west)--([xshift=-5cm]frame.north east)
decorate { --cycle};
\draw[fill=yellow!50](frame.south west) rectangle
([xshift=3.4cm]frame.north west) ;
\node[anchor=west,text=red] at ([xshift=1.1cm]frame.west)
{\textsc{Attenzione}};
\begin{scope}[shift={([xshift=1.5mm]frame.west)}]
\draw[red](0,0) coordinate (Origin) --++(0.2,0) coordinate (endL) arc (180:0:0.05)--++(0.2,0) coordinate (endR) --++(45:0.25) arc (180-45:0:0.08) (endR) arc (0:-180:0.1) (endL) arc (0:-180:0.1) (Origin)--++(45:0.25) arc (180-45:0:0.08);
\end{scope}
},
% paragraph skips obeyed within tcolorbox
parbox=false,
}
\begin{document}
\begin{Sebastiano}
I dunno what to write. Too many users who really were great supporters of TeX-SE
left, so I dunno what to say.
\end{Sebastiano}
\end{document}