redsquare contd.
Asha G <[email protected]>
| Newsgroups | gmane.comp.tex.tugindia |
|---|---|
| Message-ID | <CADwK_pPipuw=0dTCXpthoQnRVVDxOGvvdWpxG1AgFbRxxQfr5Q@mail.gmail.com> |
> Content-Type: text/plain; charset="ISO-8859-1" > > On Wed, Sep 19, 2012 at 4:35 PM, Asha G <[email protected]> wrote: > > I would like to create colored squares : > > > > \blacksquare creates a filled black square > > > > but using the same logic > > > > \redsquare does not give a filled red square but an error message. > > > You can use tikz to do that. Here is a MWE : > > > \documentclass[11pt]{article} > % > \usepackage{tikz} > > \newcommand{\redsquare}{\tikz \path [fill=red,draw=black] (0,0) > rectangle (10pt,10pt) ;} > > \begin{document} > > This is a red square~\redsquare > > I am trying to mention \redsquare in my caption as different plots are of different colors - \redsquare, \greensquare and so on. It is a bit unwieldy to write this entire program in the caption.Is there some other way of going about it. I think I did try package xcolor to no effect. But will try again. Asha Gopinathan _______________________________________________ Home: http://www.tug.org.in/ TeX FAQ: http://www.tex.ac.uk/faq unsubscribe: http://tug.org/mailman/listinfo/tugindia