2

What I mean is when we make tcolorboxes they are in the shape of box with straight lines by using borderline command we could change how far away it is or how it looks. For example:

\begin{tcolorbox}[enhanced,arc=3mm,boxrule=1.5mm,frame hidden,colback=blue!10!white,borderline={1mm}{0mm}{blue,dotted} ]

\lipsum[2]

\end{tcolorbox}

In this code, we're making different things but importantly we make our borderline dotted and blue I want to make it curly like a sine wavy or cloudy? Is there anything for this?

Edit after comment: Idea was thisIdea was this

  • 3
    Try the frame code=<tikz drawing code> option. – muzimuzhi Z Dec 24 '20 at 08:10
  • Hope based on muzimuzhi Z suggestion you solved the issue, if not so, can you show a image of your requirement, sorry it is not clear for me.... – MadyYuvi Dec 24 '20 at 13:25
  • oh i didn't but i believe what he said is just enough.I checked the manuel for tcolorbox probably it would work but i just give up on the idea it was taking to much time and i'm very rusty on latex so that is that. If i continue using after my work is done probably i would give it a try – Oğuzhan Kılıç Dec 24 '20 at 15:49
  • @MadyYuvi I added a picture – Oğuzhan Kılıç Dec 24 '20 at 15:58
  • 2
    tcolorbox does "an accentuated colored text box with rounded corners" (manual, p 12), the core code being a bunch of \pgfpathlinetos with (adjustable) arcs on the ends. A TikZ cloud node with some rectangular nodes emulating a tcolorbox might work. – Cicada Dec 25 '20 at 07:26
  • @OğuzhanKılıç Hi, I think with umilty that the answer of Cicada it is the best. Can you, please, switch the green check mark to Cicada user? – Sebastiano Dec 25 '20 at 23:08

3 Answers3

6

To add one detail to @Sebastiano's creative solution, making the cloud fill and the tcolorbox frame and background all the same colour perhaps gives the cloud a more 'cloudy' feel.

cloud with tcb

MWE

\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usetikzlibrary{shapes.symbols}
\usepackage{tcolorbox}
\tcbuselibrary{skins}
\usepackage{lipsum}

\begin{document} \begin{center} \begin{tikzpicture} \node (a) [draw,cloud,cloud puffs=15, aspect=2.5, cloud puff arc=120,inner sep = 0pt,fill=blue!10,text width=14em,text height=2ex] {% \begin{tcolorbox}[fonttitle=\bfseries\large,coltitle=black,colbacktitle=blue!10,title=Title Text,colframe=blue!10,colback=blue!10,width=12em] An idea goes here \ldots \end{tcolorbox} }; \end{tikzpicture} \bigskip

\begin{tikzpicture} \node (a) [draw,cloud,cloud puffs=15, aspect=2.5, cloud puff arc=120,inner sep = 0pt,fill=blue!10,text width=14em,text height=2ex] {% \begin{tcolorbox}[fonttitle=\bfseries\large,coltitle=black,colbacktitle=blue!15,title=Title Text,colframe=blue!30,colback=blue!20,width=12em] An idea goes here \ldots \end{tcolorbox} }; \end{tikzpicture} \end{center}

\end{document}

Cicada
  • 10,129
5

Surely it is not very beautiful my cloud but this it is the result that I have obtained. You can change:

  1. the parameter of scale=.7 to increase or decrease the size frame clasic tcolorbox;
  2. The number of the cloud puffs=...;

\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usetikzlibrary{shapes,fit}
\usepackage[all]{tcolorbox}
\usepackage[margin=2cm]{geometry}
\usepackage{lipsum}

\begin{document} \begin{center} \begin{tikzpicture} \node (a) at (0,0) [inner sep = 0pt,scale=.7] {\begin{tcolorbox}[enhanced,title=Text, attach boxed title to top left] \lipsum[1].\end{tcolorbox} }; \node [draw, inner sep=0pt, cloud, cloud puffs=20, aspect=1.8,fit=(a)] {}; \end{tikzpicture} \end{center} \end{document}

enter image description here

Sebastiano
  • 54,118
3

This is more an exercise than a useful solution, but frame code app allow to define any kind of path as tcolorbox border.

In this particular case, a combination of a fit node with a cloud shape is proposed.

You can see from the example that the resulting tcolorbox won't have any consideration with margins and surrounding text.

\documentclass{article}
\usepackage[most]{tcolorbox}
\usetikzlibrary{fit,shapes.symbols}

\usepackage{lipsum}

\newtcolorbox{mycloud}[1][]{% enhanced, colback=red!5!white, colframe=red!75!black, fonttitle=\bfseries, coltitle=black, frame code app={\node[fit=(frame), draw=tcbcolframe, fill=tcbcolback, cloud, inner sep=0pt, cloud puffs=15, cloud puff arc=120, aspect=3] {};}, #1}

\begin{document} \lipsum[1]

\begin{mycloud}[title=my title] \lipsum[2] \end{mycloud} \end{document}

enter image description here

A second exercise could be to adapt answers in Rectanglar cloud shaped node in TikZ to tcolorbox if a biscuit form is accepted as equivalent to cloud

Ignasi
  • 136,588