Graphics, Figures & Tables ⇒ Bubble text
Bubble text
I would like to place an image (a talking man) with a bubble text on it, just like in the image: I followed some tutorials, but no luck.
Can you help me please?
Thank you.
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10330
- Joined: Mon Mar 10, 2008 9:44 pm
Bubble text
welcome to the forum!
This can be a start:
Code: Select all
\documentclass{article}\usepackage[demo]{graphicx}\usepackage{tikz}\usepackage{lipsum}\usetikzlibrary{positioning,shapes.callouts}\begin{document}\begin{tikzpicture}\node (man) {\includegraphics{man}};\node [draw, align=center,cloud callout, cloud puffs = 17, cloud puff arc=140,callout pointer segments = 3, anchor = pointer,callout relative pointer = {(330:2cm)},aspect = 3, above left = 1.2 and 2 cm of man.north west]{This is some text\\and some more in the next line.\\That's all.};\end{tikzpicture}\end{document}

Stefan
Bubble text
I didn't even know that they are called "callouts".
Thank you so much for your help.

Bubble text
I changed my preamble to this:
Code: Select all
\usepackage[Greek,Latin]{ucharclasses}% Language declaration\usepackage{xltxtra}\usepackage{polyglossia}\setmainlanguage{greek}\setotherlanguages{english}\setTransitionsForGreek{\selectlanguage{greek}}{\selectlanguage{english}}% Fonts\setmainfont[Kerning=On,Mapping=tex-text]{Myriad Pro}
Since then, my callout code:
Code: Select all
\begin{flushright}\begin{tikzpicture}\node (man) {\includegraphics{man}};\node [draw, align=center,cloud callout, cloud puffs = 19.5, cloud puff arc=90,callout pointer segments = 2, anchor = pointer,callout relative pointer = {(345:2.5cm)},aspect = 3, above left = -1.5 and 2.5 cm of man.north west]{Ένα δύο τρία\\τέσσερα πέντε έξι\\επτά οκτώ εννιά\\δέκα έντεκα};\end{tikzpicture}\end{flushright}
Code: Select all
! Package tikz Error: Giving up on this path. Did you forget a semicolon?.See the tikz package documentation for explanation.Type H <return> for immediate help....l.100 ^^Iτέσσερα πέντε έξι\\This error message was generated by an \errmessagecommand, so I can't give any explicit help.Pretend that you're Hercule Poirot: Examine all clues,and deduce the truth by order and method.Missing character: There is no = in font nullfont!! Illegal unit of measure (pt inserted).<to be read again>=l.100 ^^Iτέσσερα πέντε έξι\\Dimensions can be in units of em, ex, in, pt, pc,cm, mm, dd, cc, bp, or sp; but yours is a new one!I'll assume that you meant to say pt, for printer's points.To recover gracefully from this error, it's best todelete the erroneous units; e.g., type `2' to deletetwo letters. (See Chapter 27 of The TeXbook.)Missing character: There is no = in font nullfont!Missing character: There is no ^^B in font nullfont!Missing character: There is no τ in font nullfont!Missing character: There is no έ in font nullfont!
Why does greek text have problem with the tikzpicture?
- Stefan Kottwitz
- Site Admin
- Posts: 10330
- Joined: Mon Mar 10, 2008 9:44 pm
Bubble text
\parbox
:Code: Select all
\documentclass{article}\usepackage[demo]{graphicx}\usepackage{tikz}\usepackage[Greek,Latin]{ucharclasses}% Language declaration\usepackage{xltxtra}\usepackage{polyglossia}\setmainlanguage{greek}\setotherlanguages{english}\setTransitionsForGreek{\selectlanguage{greek}}{\selectlanguage{english}}% Fonts\setmainfont[Kerning=On,Mapping=tex-text]{Times New Roman}\usetikzlibrary{positioning,shapes.callouts}\begin{document}\begin{flushright}\begin{tikzpicture}\node (man) {\includegraphics{man}};\node [draw, align=center,cloud callout, cloud puffs = 19.5, cloud puff arc=90,callout pointer segments = 2, anchor = pointer,callout relative pointer = {(345:2.5cm)},aspect = 3, above left = -1.5 and 2.5 cm of man.north west]{\parbox{3cm}{\centering Ένα δύο τρία\\τέσσερα πέντε έξι\\επτά οκτώ εννιά\\δέκα έντεκα}};\end{tikzpicture}\end{flushright}