0

I found this box, but didn't know the design. Can you tell me which library or packages are used to design it. Thanksenter image description here

2
  • 1
    This can be achieved using the tcolorbox package, for example. Sep 4 at 16:32
  • Probably though it has not been made with latex but with an application such as InDesign or Illustrator. It's not so common to create such boxes with tcolorbox, and if it's possible it needs some extra work to achieve. If is on a pdf somebody can see with which application was created.
    – Miltos P.
    Sep 4 at 18:16

1 Answer 1

2
\documentclass[tikz, border=1cm]{standalone}
\usepackage{lipsum}
\tikzset{framed/.style={path picture={
\fill[blue!50!violet!50, even odd rule, rounded corners]
(path picture bounding box.south west) rectangle (path picture bounding box.north east) 
([shift={( 2pt, 4pt)}] path picture bounding box.south west) -- 
([shift={( 2pt,-2pt)}] path picture bounding box.north west) -- 
([shift={(-2pt,-4pt)}] path picture bounding box.north east) -- 
([shift={(-6pt, 6pt)}] path picture bounding box.south east) -- cycle;
}}} 
\begin{document}
\begin{tikzpicture}
\node[framed, text width=10cm, inner sep=15pt] {\lipsum[][1-10]};
\end{tikzpicture}
\end{document}

Text box with a purple frame

Edit: With label

\documentclass[tikz, border=1cm]{standalone}
\usepackage{lipsum}
\tikzset{exercise/.style={path picture={
\fill[blue!50!violet!50, even odd rule, rounded corners]
(path picture bounding box.south west) rectangle (path picture bounding box.north east) 
([shift={( 2pt, 4pt)}] path picture bounding box.south west) -- 
([shift={( 2pt,-2pt)}] path picture bounding box.north west) -- 
([shift={(-2pt,-4pt)}] path picture bounding box.north east) -- 
([shift={(-6pt, 6pt)}] path picture bounding box.south east) -- cycle;
},
label={[anchor=west, xshift=1em, yshift=-1pt, rotate=6, fill=blue!50!violet!50]north west:Exercise #1:},
}} 
\begin{document}
\begin{tikzpicture}
\node[exercise=1, text width=10cm, inner sep=15pt] {\lipsum[][1-10]};
\end{tikzpicture}
\end{document}

Framed text with an "Exercise 1:" label

3
  • thank you very much, how can I add exercise like in the picture above Sep 4 at 22:08
  • tnakn you very much Sep 4 at 23:31
  • No need to write thank you - just accept the answer, if it answers your question. Sep 5 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.