Graphics, Figures & Tables ⇒ Heart around text
-
- Posts: 3
- Joined: Thu May 19, 2011 6:05 pm
Heart around text
Well, i am trying to help a friend. And my problem is pretty much as described in the title, is there any possibility to get a heart around some text? The text will typicaly be between 5 and 20 characters.
NEW: TikZ book now 40% off at Amazon.com for a short time.
-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Re: Heart around text
You should be able to use the picture environment to draw a heart, though you'll have to get comfortable with how to draw quadratic splines. You can put text inside the picture environment as well, which will have the effect of putting the text inside a heart.
-
- Posts: 3
- Joined: Thu May 19, 2011 6:05 pm
Re: Heart around text
Thank you for the answer, I guess that would be a solution. Though I think it is maybe a little bit over my knowledge to do so 
Is there anyone who has another solution, maybe a solution that is a bit easier?

Is there anyone who has another solution, maybe a solution that is a bit easier?

-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Heart around text
Here's an example. It's not particularly elegant or pretty; if you want that, you'll have to spend more than five minutes generating the quadratic Bezier curves (and more than likely splice a few of them together).
"The Not-So-Short Introduction to LaTeX" by Oetiker, Partl, Hyna, and Schlegl (see the list of resources on the forums or search the Web for "Not-So-Short LaTeX") has a good section on how to draw Bezier curves.
Code: Select all
\documentclass{article}
\begin{document}
\setlength{\unitlength}{5mm}
\framebox{
\begin{picture}(20,20)
\qbezier(10,4)(5,15)(10,10)
\qbezier(10,4)(15,15)(10,10)
\put(9,8){Hello!}
\end{picture}
}
\end{document}
Heart around text
Here's another example using the shapepar package:
Code: Select all
\documentclass{article}
\usepackage{shapepar}
\begin{document}
\heartpar{mmmm mmmm mmm mmmm mmmm mmm mmmmm mmmm mmm mmm mm
mmmm mmmm mmm mmm mmm mmmm mmmm mmm mmmm mmmm mmm mmmmm mmmm mmm mmm mm mmmm mmmm mmm mmmm mmmm mmm mmmmm mmmm mmm mmm mm mmmm mmmm mmm mmmm mmmm mmm mmmmm mmmm mmm mmm mm }
\end{document}