Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

colored paragraph

1 view
Skip to first unread message

pcast...@gmail.com

unread,
May 26, 2009, 1:58:55 AM5/26/09
to
Hi comp.text.tex

I would like to put color to a paragraph containing equations and
verbatim. Something like this

\colorbox{blue}{
\begin{minipage}{\textwidth}

\begin{verbatim}
(%i15) limit(exp(1/x), x, 0, plus);
\end{verbatim}
$$\infty \leqno{\tt (\%o15) }$$

\end{minipage}
}

but it doesn't work. Can anybody help me?

Tanks in advance

Ulrike Fischer

unread,
May 26, 2009, 2:32:49 AM5/26/09
to
Am Mon, 25 May 2009 22:58:55 -0700 (PDT) schrieb
pcast...@gmail.com:

Use an lrbox:

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin

--
Ulrike Fischer

Rolf Niepraschk

unread,
May 26, 2009, 6:38:29 AM5/26/09
to
pcast...@gmail.com schrieb:

> Hi comp.text.tex
>
> I would like to put color to a paragraph containing equations and
> verbatim. Something like this
>
...
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{xcolor}
\usepackage{listings}
\lstset{%
basicstyle=\footnotesize\ttfamily,
backgroundcolor=\color{black!10}
}

\begin{document}
\begin{lstlisting}[language={}]


(%i15) limit(exp(1/x), x, 0, plus);

\end{lstlisting}
\end{document}
%---------------------------

...Rolf

0 new messages