Comments on: LaTex: Making Floatng Text Boxes http://www.terminally-incoherent.com/blog/2007/02/04/latex-making-floatng-text-boxes/ I will not fix your computer. Tue, 04 Aug 2020 22:34:33 +0000 hourly 1 https://wordpress.org/?v=4.7.26 By: Vítor Estêvão Silva Souza http://www.terminally-incoherent.com/blog/2007/02/04/latex-making-floatng-text-boxes/#comment-17313 Wed, 29 Sep 2010 16:29:32 +0000 http://www.terminally-incoherent.com/blog/2007/02/04/latex-making-floatng-text-boxes/#comment-17313

Hi,

Thanks for the tip! I wanted to create a macro for a nice information box and your tip solved it for me. Using also the color package, here’s my macro for anyone else that may be interested:

\newcommand{\infobox}[2]{
\begin{boxedminipage}{0.9\textwidth}
\vspace{-0.1cm}\hspace{-0.1cm}\colorbox{black}{\makebox[\textwidth][ c]{\textcolor{white}{\textbf{#1}}}}

\small{#2}
\end{boxedminipage}\vspace*{0.6cm}
}

And to use it:

\infobox{Box Title}{
First paragraph in the box.

Second paragraph in the box.

Third paragraph in the box, and so on and so forth…
}

Now I have to figure out how to change the spacing of the lines in a paragraph, because when I reduced the font size the spacing seems too large.

Reply  |  Quote
]]>