2

Starting from my question Does a symbol for glasses exist? and from the best @Milo's answer, I have created this MWE, using the macro \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}

to have this output:

enter image description here

How do I create a visible break effect for the second column colored gray? For the second column coloured in grey I would like to have a roughness effect like the image, coarse, shown in the best figure created from @David Carlisle in his comment:

enter image description here

Sebastiano
  • 54,118

1 Answers1

3

This post builds on this answer and this answer.

\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}

enter image description here

\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}

enter image description here