
Envolvi um texto em torno de uma figura circular. Preciso ajustar horizontalmente a posição da figura, trazendo-a para o meio da página com o texto enrolado circularmente em torno dela.
\hspace*{-5cm}\includegraphics
... não está funcionando. Como eu posso fazer isso?
\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx,wrapfig}
\begin{document}
\null\hfill\smash{
\raisebox{\dimexpr-\height+\baselineskip}{%
\includegraphics[width=2in]{magmag2.png}}}%
\par\vspace*{\dimexpr-\baselineskip-\parskip}%
\parshape 12 0pt 0.7\textwidth
0pt \dimexpr0.5\textwidth+4.5\baselineskip\relax
0pt \dimexpr0.5\textwidth+3.75\baselineskip\relax
0pt \dimexpr0.5\textwidth+3.25\baselineskip\relax
0pt \dimexpr0.5\textwidth+3.00\baselineskip\relax
0pt \dimexpr0.5\textwidth+3.0\baselineskip\relax
0pt \dimexpr0.5\textwidth+3.20\baselineskip\relax
0pt \dimexpr0.5\textwidth+3.5\baselineskip\relax
0pt \dimexpr0.5\textwidth+4.25\baselineskip\relax
0pt \dimexpr0.5\textwidth+6.0\baselineskip\relax
0pt \dimexpr0.5\textwidth+6.75\baselineskip\relax
0pt \textwidth
\noindent\lipsum[1]
\end{document}
Responder1
Isso se baseia em um raio de furo de 1,1 pol. para fornecer alguma margem. Observe que lipsum sempre foi difícil de hifenizar.
Tentei configurar \holeshape
usando pgfmath, mas não dá para usar \edef
. OTOH, deve ser possível gravar a definição em um arquivo e lê-la novamente.
\documentclass{article}
\usepackage{lipsum}
\usepackage{shapepar}
\usepackage{tikz}
\usepackage{showframe}
\marginparsep=0.5in
\def\holeshape{{14.375}% h center
{0}b{0}\\
{0}t{0}{28.75}\\
{1}t{0}{11.566}st{17.184}{11.566}\\
{2}t{0}{10.029}t{18.721}{10.029}\\
{3}t{0}{9.0941}t{19.655}{9.0941}\\
{4}t{0}{8.4684}t{20.281}{8.4684}\\
{5}t{0}{8.0593}t{20.690}{8.0593}\\
{6}t{0}{7.836}t{20.924}{7.826}\\
{7}t{0}{7.750}t{20.999}{7.750}\\
{8}t{0}{7.836}t{20.924}{7.826}\\
{9}t{0}{8.0593}t{20.690}{8.0593}\\
{10}t{0}{8.4684}t{20.281}{8.4684}\\
{11}t{0}{9.0941}t{19.655}{9.0941}\\
{12}t{0}{10.029}t{18.721}{10.029}\\
{13}t{0}{11.566}jt{17.184}{11.566}\\
{14}t{0}{28.75}\\
{16}t{0}{28.75}\\
{16}e{28.75}}
\begin{document}
By using \verb|\baselineskip| as the scale, one can use $\sqrt{r^2-n^2}$ for $n=0,1,\dots$
to compute the offset startng at the center.
radius = \pgfmathparse{1.1in/\baselineskip}\pgfmathresult\par
text width = \pgfmathparse{\textwidth/\baselineskip}\pgfmathresult
\noindent\begin{tikzpicture}[overlay,baseline=(origin)]
\coordinate (origin) at (0,3pt);% ad hoc fudge factor
\draw (0.5\textwidth,-7\baselineskip) circle[radius=1in];
\end{tikzpicture}%
\shapepar[\baselineskip]{\holeshape}\lipsum[1]
\end{document}
Responder2
\documentclass{article}
\usepackage{lipsum}
\usepackage{shapepar}
\usepackage{tikz}
%\usepackage{showframe}
\marginparsep=0.5in
\def\holeshape{{14.375}% h center
{0}b{0}\\
{0}t{0}{28.75}\\
{1}t{0}{11.566}st{17.184}{11.566}\\
{2}t{0}{10.029}t{18.721}{10.029}\\
{3}t{0}{9.0941}t{19.655}{9.0941}\\
{4}t{0}{8.4684}t{20.281}{8.4684}\\
{5}t{0}{8.0593}t{20.690}{8.0593}\\
{6}t{0}{7.836}t{20.924}{7.826}\\
{7}t{0}{7.750}t{20.999}{7.750}\\
{8}t{0}{7.836}t{20.924}{7.826}\\
{9}t{0}{8.0593}t{20.690}{8.0593}\\
{10}t{0}{8.4684}t{20.281}{8.4684}\\
{11}t{0}{9.0941}t{19.655}{9.0941}\\
{12}t{0}{10.029}t{18.721}{10.029}\\
{13}t{0}{11.566}jt{17.184}{11.566}\\
{14}t{0}{28.75}\\
{16}t{0}{28.75}\\
{16}e{28.75}}
\begin{document}
By using \verb|\baselineskip| as the scale, one can use $\sqrt{r^2-n^2}$ for
$n=0,1,\dots$
to compute the offset starting at the center.
radius = \pgfmathparse{1.1in/\baselineskip}\pgfmathresult\par
text width = \pgfmathparse{\textwidth/\baselineskip}\pgfmathresult
\noindent\begin{tikzpicture}[overlay,baseline=(origin)]
\coordinate (origin) at (0,3pt);% ad hoc fudge factor
\fill [white] (0.5\textwidth,-7\baselineskip) circle[radius=1in];
\node[inner sep=0pt] (magmag2) at (6,-3)[opacity=1]
{\includegraphics[width=.4\textwidth]{magmag2.png}
};
\end{tikzpicture}%
\shapepar[\baselineskip]{\holeshape}\lipsum[1]
\end{document}