1

I would like to use:

\begin{wrapfigure}{r}[Xcm]{Ycm}
\itshape
\SomeSymbolHere\\
\fontsize{16}{16}
\textbf{bla bla bla.}
\end{wrapfigure}

many times within my document, preferably writing something like \mywrap{bla bla bla.}. I guess I somehow have to invoke the \renewcommand as well. According to the documentation 1 page 3 , we should be able to implement some of it:

\setlength{\wrapoverhang}{\marginparwidth}
\addtolength{\wrapoverhang}{\marginparsep}

This doesn't work for me, however. But how do I add all of the abovementioned settings?

1

You can just put it all in a new command with one argument for the text:

Sample output

\documentclass{article}

\usepackage{wrapfig}

\newcommand{\mywrap}[1]{\begin{wrapfigure}{r}[1cm]{3cm}
\itshape
\rule{1cm}{1cm}\par
\fontsize{16}{18}\selectfont
\textbf{#1.}
\end{wrapfigure}}

\begin{document}

\mywrap{Blurb} Some text.  Some text.  Some text.  Some text.  Some
text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.  Some text.  Some text.  Some text.  Some text.
Some text.  Some text.

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.