figura envolvente y llaves

figura envolvente y llaves
\documentclass{article}
\usepackage{wrapfig}


\begin{document}

    \begin{wrapfigure}{r}{3cm}
        \centering
        \rule{3cm}{3cm}
    \end{wrapfigure}
 g,sd; agmgts bsgfs shgsnhg  {\bf snhbfx} fdbhsmn jnnsndg ndsngas gngdfznagk dfhbf
gsgfsh shgfs

{Here is the problem!} "Observe that after using the wrapfigure command, when I am writing something which has to be kept inside the curly braces something unsusal happening." How to resolve this?

\end{document} 

Respuesta1

De hecho, se esperan problemas.

Para hacer fluir varios párrafos alrededor de la imagen, wrapfiges necesario utilizar \everyparpara pasar nuevos párrafos algún código a ejecutar, hasta estar seguro de que el texto tiene más líneas de las necesarias para pasar la imagen.

¿Qué pasa en tu caso? El segundo párrafo comienza dentro de un grupo, por lo que la configuración de la forma del párrafo se pierde cuando termina el grupo.

¿Cómo solucionar el problema? Supongo que sucedió porque querías algo como

{\bf Here is the problem!}

pero tú eres la causa de tus problemas. Los comandos de cambio de fuente de dos letras han estado obsoletos durante más de veinte años.

Nunca jamásuse \bfo \itcomandos similares. Han estado en desuso durante más de veinte años. Pueden aparecer problemas inesperados cuando se utilizan comandos que han estado en desuso durante más de veinte años.

Podría seguir con esta perorata, pero espero que tres veces sea suficiente. ;-)

\documentclass{article}
\usepackage{wrapfig}

\begin{document}

\begin{wrapfigure}{r}{3cm}
\centering
\rule{3cm}{3cm}
\end{wrapfigure}

g,sd; agmgts bsgfs shgsnhg  \textbf{snhbfx} fdbhsmn jnnsndg ndsngas gngdfznagk dfhbf
gsgfsh shgfs

\textbf{Here is the problem!} "Observe that after using the wrapfigure command, when I am writing
something which has to be kept inside the curly braces something unsusal happening." How to resolve
this?

\end{document}

ingrese la descripción de la imagen aquí

Si realmente lo necesita {...}para algún otro propósito, simplemente agréguelo \mbox{}delante de la llave de apertura, si ocurre al comienzo de un párrafo en relación con un wrapfigure.

información relacionada