Quantcast
Channel: draw milk carton in tikzpicture - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 3

draw milk carton in tikzpicture

$
0
0

i want to draw 4 milk carton like attachment.Please helpExample: Create water cup symbolthis code for water:

\documentclass{article}\usepackage[most]{tcolorbox}\makeatletter\tcbset{        myvbox/.style 2 args={%        enhanced,         colback=white,        colframe=blue!30!black,        left=8mm,        overlay={            \node[rotate=90, anchor=north west, inner sep=2mm, text=white] (title@aux) at (frame.south west) {#2};            \path[fill=tcbcol@frame] (title@aux.south west)--(title@aux.south east)                 to[out=90, in=270] ([yshift=5mm]title@aux.east)--                (title@aux.center|-frame.north)                [rounded corners=\kvtcb@arc] -|                 (frame.west) |- (title@aux.west)[sharp corners] -- cycle;               \node[rotate=90, inner sep=2mm, text=white] at (title@aux) {#2};        },        #1    },  }\makeatother\newcommand{\mycup}{%    \begin{tikzpicture}        \draw (0,1.2) -- (0.2,0) -- (0.6,0) -- (0.8,1.2);        \draw[blue] (0.05,1) -- (0.1,1.1) -- (0.2,1) -- (0.3,1.1) -- (0.4,1)-- (0.5,1.1) -- (0.6,1) -- (0.7,1.1) -- (0.75,1);    \end{tikzpicture}%    \hspace{1em}%}\begin{document}\begin{tcbposter}[poster = {columns=1, rows=1, width=0.5\textwidth, height=0.5\textheight,spacing=0.1mm}]    \posterbox[height=3cm,width =10cm, myvbox={colframe=blue!80!black}{Milk carton}]{column=1, row=1,  xshift=0cm, yshift=1cm}{%        \mycup\mycup\mycup\\        \mycup\mycup\mycup    }\end{tcbposter}\end{document}

enter image description here


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images