TeX - LaTeX Asked by Oğuzhan Kılıç on March 10, 2021
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?
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.
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=bfserieslarge,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=bfserieslarge,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}
Correct answer by Cicada on March 10, 2021
Surely it is not very beautiful my cloud but this it is the result that I have obtained. You can change:
scale=.7
to increase or decrease the size frame clasic tcolorbox
;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}
Answered by Sebastiano on March 10, 2021
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}
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
Answered by Ignasi on March 10, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP