Gray Shading in Latex

Mimi Burbank mimi at CSIT.FSU.EDU
Tue Apr 20 16:26:18 CEST 2004


On Apr20 03:44PM, Saeed Ghahramani wrote:
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> > Dear Friends,
> >
> > I need help on an issue, which you might be able to help or refer me to
> > the appropriate sources. For a new book contract, I need to put certain
> > parts of the text inside boxes that are gray-shaded. As you know, these
> > days, many books do that. Do you know what should I do to achieve this?
> > If there are files that I
> > need to down load where can I find them, and in which of the Y and Y
> > subdirectories should I copy them? If the necessary tools already have
> > been installed with the usual Y and Y installation, what command(s)
> > should I use?
> >
> > I really appreciate your help.
> >
> > --Saeed Ghahramani
> > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


Hello Saeed,

You need to use the graphicx package and the color package

If you've never purchased the Latex Graphics Companion, then
you might get buy with looking at the documentation for the
"graphics bundle" ...   you can download this from the CTAN
archives...

http://ctan.tug.org/tex-archive/macros/latex/required/graphics/

(get the whole directory if your files are not dated the
same as the ones there)   and  run and print out the grfguide.tex
file...  (or simply grab the grfguide.ps file and print that)

If you have the LaTeX Graphics Compantion, look on page 322 ...


basically you need to specify a driver


\usepackage[dvipsone]{color}
           [dvips,etc)  ;-)

\definecolor{Light}{gray}{.80}
\definecolor{Dark{gray}{{.20}

you can define \textcolor and \colorbox

so your colorbox would be gray, and your text could be
red or any other color you like  ;-)

experiment and play....

you should already have the graphics files on your system,
but I really advise downloading the new files and installing
them over the old ones...


mimi




More information about the yandytex mailing list