# Tag Info

3

Here is a tcolorbox version. \documentclass{article} \usepackage[many]{tcolorbox} \usetikzlibrary{decorations.pathmorphing} \newtcolorbox{mybox}[1][]{% enhanced jigsaw, frame code={\path[draw=black,decorate,decoration=zigzag] (frame.south west) rectangle (frame.north east);}, left=0pt,right=0pt,top=0mm,bottom=0mm, colback = ...

3

Here is one way of doing it: \documentclass{article} \usepackage[framemethod=tikz]{mdframed} \usetikzlibrary{decorations.pathmorphing} \usepackage{mwe} \begin{document} \mdfsetup{splitbottomskip=0.8cm, splittopskip=0cm, innerrightmargin=2cm,innertopmargin=1cm,% innerlinewidth=2pt,outerlinewidth=2pt, ...

2

The problem is that you explicitly draw a line and close the path. If you remove the \pgfpathlineto before each \pgfclosepath then the problem goes away. It is also possible to make the code a teensy bit more efficient by using \pgfqpoint (which doesn't use the math parser) and \pgfmathsetlengthmacro (to make sure parsed expressions stored in macros end in ...

2

You need \usetikzlibrary{decorations.pathmorphing} \documentclass[tikz]{standalone} \usetikzlibrary{patterns} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{tikzpicture}[decoration = coil, spring/.style = { decoration = { pre length = #1, post length = #1} }] \fill[pattern = north east lines] (-2cm, 0) coordinate ...

4

The placement of a decoration relative to the path can be controlled with the raise key. A positive value shifts the decoration to the left of the path direction, and a negative value shifts it to the right. Thus, for your example, a negative value is needed. In the example below I've added the key raise=-8pt to the decoration. More information can be found ...

Top 50 recent answers are included