Re: tugindia Digest, Vol 117, Issue 8

Sebastian Vattamattam <[email protected]>
Newsgroups gmane.comp.tex.tugindia
Message-ID <CAMbek0J27C-FrhELNg=joqoboZNpp-qquXmHnH28Ju68mDJNYg@mail.gmail.com>
Thank you, Asha, It works well.

On 21 September 2012 15:30, <[email protected]> wrote:

> Send tugindia mailing list submissions to
>         [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://tug.org/mailman/listinfo/tugindia
> or, via email, send a message with subject or body 'help' to
>         [email protected]
>
> You can reach the person managing the list at
>         [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of tugindia digest..."
>
>
> Today's Topics:
>
>    1. redsquare contd. (Asha G)
>    2. Re: redsquare contd. (Umesh Mohan)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 20 Sep 2012 15:37:54 +0530
> From: Asha G <[email protected]>
> To: <[email protected]>
> Subject: [Tugindia] redsquare contd.
> Message-ID:
>         <CADwK_pPipuw=
> 0dTCXpthoQnRVVDxOGvvdWpxG1AgFbRxxQfr5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
> Content-Type: text/plain; charset="ISO-8859-1"
>
> > 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
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 20 Sep 2012 17:35:33 +0530
> From: Umesh Mohan <[email protected]>
> To: TUGIndia Mailing List <[email protected]>
> Subject: Re: [Tugindia] redsquare contd.
> Message-ID:
>         <
> CAKVFB5VU449DDe3MwreRhiPtFkG3NB39xFFchiHVNSfLu9RO-w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
> Content-Type: text/plain; charset="UTF-8"
>
> You could use the solution suggested by Sridhar with a modification to
> give colour as a parameter to the command:
>
> \documentclass[11pt]{article}
> \usepackage{tikz}
>
> \newcommand{\coloursquare}[1]{\tikz \path
> [fill=#1,draw=black]  (0,0) rectangle (10pt,10pt) ;}
>
> \begin{document}
>
> This is a red square~\coloursquare{red}\\
> This is a blue square~\coloursquare{blue}
>
> \end{document}
>
>
> On 20 September 2012 15:37, Asha G <[email protected]> wrote:
> >
> > > 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
>
>
>
>
> --
> ????? ?????
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> tugindia mailing list
> [email protected]
> http://tug.org/mailman/listinfo/tugindia
>
>
> ------------------------------
>
> End of tugindia Digest, Vol 117, Issue 8
> ****************************************
>



-- 
Sebastian Vattamattam
_______________________________________________
Home:        http://www.tug.org.in/
TeX FAQ:     http://www.tex.ac.uk/faq
unsubscribe: http://tug.org/mailman/listinfo/tugindia
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.