[texworks] How to color background

Charles Nix cnix at bargerandnixorgans.com
Fri Feb 26 15:39:35 CET 2021


Just trying to help out--this is mailing list is specific for only the 
text editor Texworks, which is one of many interfaces to Tex/LaTeX/*TeX. 
Since your question is about LaTeX in general, you may have better 
responses asking on a site such as https://tex.stackexchange.com/

On 2/25/21 6:13 PM, Aleks Kleyn wrote:
> I recently put attention that in LaTeX file I can change background of
> theorem. I like this idea because it may help to see where statement is in
> text. Some theorems I print in 2 columns (to compare them when somebody read
> them) and after some search and trial I found the following code
>
> \documentclass{amsbook}
> \begin{document}
> \usepackage{graphicx}
> \usepackage{color}
> \definecolor{Gray}{rgb}{.94,.95,.94}
> \setlength{\parindent}{-9pt}
> \colorbox{Gray}
> {
> \noindent
> \begin{tabular}{@{}l|r}
> \begin{minipage}{175pt}
> \setlength{\parindent}{4mm}
> Text 1
> \end{minipage}
> &
> \begin{minipage}{175pt}
> \setlength{\parindent}{4mm}
> Text 2
> \end{minipage}
> \end{tabular}
> }
> \setlength{\parindent}{9pt}
> \end{document}
>
> I do not see using colorbox in this code because colorbox and minipage do
> not flow from page to page, but this is problem for single theorem. Is there
> way to change background color for single theorem?
>
> Thank you
> Aleks Kleyn
>
>


More information about the texworks mailing list.