[Mac OS X TeX] Color and itexmac

Benji Fisher fisherbb at bc.edu
Tue Feb 19 22:11:37 CET 2002



On Wednesday, December 31, 1969, at 07:17 PM, Francis Dorra wrote:

> Hi
> I am trying to use color with itexmac and the standart pdf output.
> My usual latex macros for color don't seem to work.
> Is there a doc on using color with pdflatex or is there some body who
> tried it?
>
> Thanks

      It works for me.  I used (extracting only the relevant lines)

\documentclass[notitlepage,12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage{graphpap}
\usepackage[dvipsnames]{color}
\pagestyle{empty}
\begin{document}
\newcommand{\blankbox}[3]{\put(#1,#2){\colorbox#3{\framebox(1,1){}}}}
\newcommand{\hrect}[5]{\put(#1,#2){\colorbox#5{\framebox(#3,#4){$#3\times#
4$}}}}
\newcommand{\vrect}[5]{\put(#1,#2){\colorbox#5{\framebox(#3,#4)%
	{\shortstack{$#3$\\$\times$\\$#4$}}}}}

\begin{center}
\setlength{\unitlength}{1.0cm}
\begin{picture}(10,11)
   %\graphpaper[1](0,0)(10,11)
   \setlength{\fboxsep}{0pt}
   \hrect{0}{0}{10}{1}{[rgb]{1,0,0}}
   \hrect{1}{1}{8}{1}{[rgb]{1,0,0}}
   \hrect{2}{2}{6}{1}{[rgb]{1,0,0}}
   \hrect{3}{3}{4}{1}{[rgb]{1,0,0}}
   \hrect{4}{4}{2}{1}{[rgb]{1,0,0}}
   \hrect{5}{5}{1}{1}{[rgb]{1,0,0}}
   \vrect{6}{4}{1}{3}{[rgb]{1,0,0}}
   \vrect{7}{3}{1}{5}{[rgb]{1,0,0}}
   \vrect{8}{2}{1}{7}{[rgb]{1,0,0}}
   \vrect{9}{1}{1}{9}{[rgb]{1,0,0}}
   \hrect{4}{5}{1}{1}{[rgb]{0,0,1}}
   \hrect{4}{6}{2}{1}{[rgb]{0,0,1}}
   \hrect{3}{7}{4}{1}{[rgb]{0,0,1}}
   \hrect{2}{8}{6}{1}{[rgb]{0,0,1}}
   \hrect{1}{9}{8}{1}{[rgb]{0,0,1}}
   \hrect{0}{10}{10}{1}{[rgb]{0,0,1}}
   \vrect{3}{4}{1}{3}{[rgb]{0,0,1}}
   \vrect{2}{3}{1}{5}{[rgb]{0,0,1}}
   \vrect{1}{2}{1}{7}{[rgb]{0,0,1}}
   \vrect{0}{1}{1}{9}{[rgb]{0,0,1}}
\end{picture}
\end{center}
\end{document}

and you can see the results (of the full file) at
http://www2.bc.edu/~fisherbb/Classes/Fall00/MT103/pictureproof.pdf
If you want the full file, let me know.

HTH					--Benji Fisher


-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
This list is not moderated, and I am not responsible for
messages posted by third parties.
-----------------------------------------------------------------




More information about the macostex-archives mailing list