# Error shapepar to use the command \circleshape

See my code: With \diamondshape it works but with \circleshape it does not. What is wrong?

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{shapepar}
\usepackage{lipsum}
\pagestyle{empty}

\begin{document}

\shapepar{\circleshape}
{\lipsum*[1]}

\end{document}

-

Use English rather than Latin or use hyphenation for Latin via the babel package and the overflow problem would go away!

\documentclass[a4paper]{article}
\usepackage[latin]{babel}
\usepackage{lipsum}
\usepackage{shapepar}
\begin{document}
\lipsum[1]

\shapepar[8.5cm]{\circleshape}
\lipsum*[1]
\end{document}


This will also work, that points certainly that there is some sort of overflow due to hyphenation not being achieved.

\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{shapepar}
\begin{document}
\shapepar[8.5cm]{\circleshape}
a an ann anne lo res ar t t \lipsum*[1]
\end{document}

-
...interesting! – Werner Nov 14 '11 at 19:09
@Werner ...TeX's mysteries! At first I thought it was an expansion problem, but then I realized it uses the fp package... – Yiannis Lazarides Nov 14 '11 at 19:13

Not exactly sure why, but LaTeX complains about a dimension being too large. My guess is this has to do with the top and bottom end of the circle. Using a similar approach to that specified in Text wrap with shapepar (insert image between text), here is a new versions of \circleshape called \mycircleshape. I've written it into a macro so you can use \mycircle{\lipsum*[1]}:

\documentclass{article}
\usepackage{shapepar}% http://ctan.org/pkg/shapepar
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\pagestyle{empty}
\newcommand{\mycircle}[1]{\shapepar{\mycircleshape}#1\par}
\def\mycircleshape{%
{25.1393}%
{0.0696379}b{25.1393}\\%
{0.278552}t{21.727}{6.82451}\\%
{0.97493}t{18.3844}{13.5097}\\%
{2.15877}t{15.1811}{19.9164}\\%
{3.69081}t{12.117}{26.0446}\\%
{5.71031}t{9.33148}{31.6156}\\%
{8.00836}t{6.82451}{36.6295}\\%
{10.6546}t{4.66574}{40.9471}\\%
{13.5794}t{2.85515}{44.5682}\\%
{16.7131}t{1.53203}{47.2145}\\%
{20.0557}t{0.626741}{49.0251}\\%
{23.3983}t{0.139276}{50}\\%
{26.8802}t{0.139276}{50}\\%
{30.2228}t{0.626741}{49.0251}\\%
{33.5655}t{1.53203}{47.2145}\\%
{36.6992}t{2.85515}{44.5682}\\%
{39.624}t{4.66574}{40.9471}\\%
{42.2702}t{6.82451}{36.6295}\\%
{44.5682}t{9.33148}{31.6156}\\%
{46.5877}t{12.117}{26.0446}\\%
{48.1198}t{15.1811}{19.9164}\\%
{49.3036}t{18.3844}{13.5097}\\%
{50}t{21.727}{6.82451}\\%
{50.2089}e{25.1393}%
}

\begin{document}
\mycircle{\lipsum*[1]}
\end{document}

-
You don't need to redefine, you need to expand the text. Try this \shapepar{\circleshape} this must have a reasonable a reasonable number of words to achieve a circle. – Yiannis Lazarides Nov 14 '11 at 18:39
This still does not explain why \lipsum*[1] works for \diamondshape but not \circleshape. – Werner Nov 14 '11 at 18:44
Thank you Werner. – Regis da Silva Nov 14 '11 at 18:46
@Werner Sure it does not but neither the answer:) I think Herbert identified the source of the error but still not the answer! – Yiannis Lazarides Nov 14 '11 at 19:04

there is a problem with the \lipsum macro. It redefines \par which isn't allow inside shapepar

\documentclass[a4paper]{article}
\usepackage[nopar]{lipsum}
\usepackage{shapepar}
\pagestyle{empty}
\makeatletter
\let\lips@par\endgraf
\makeatother
\begin{document}

\shapepar[8.5cm]{\circleshape}
\lipsum[1]

\shapepar[8.5cm]{\circleshape}
\lipsum*[1]

\end{document}

-
Regis is using \lipsum* which doesn't emit \par commands. – egreg Nov 14 '11 at 19:03
According to the definition of \lipsum*, it should do exactly as you suggest: \let\lips@par\relax by executing \ChangeLipsumPar before typesetting the actual \lipsum. So why does it not work as expected? – Werner Nov 14 '11 at 19:07
Now I also use the star version – Herbert Nov 14 '11 at 19:10
Thanks, peoples. – Regis da Silva Nov 14 '11 at 20:11