ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jesse Alama <alama@stanford.edu>
To: Aditya Mahajan <adityam@umich.edu>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: colors in pgf within context
Date: Tue, 19 Feb 2008 10:54:31 -0800	[thread overview]
Message-ID: <m2ablwu68o.fsf@DNab422469.Stanford.EDU> (raw)
In-Reply-To: <m2ejb8u7cp.fsf@DNab422469.Stanford.EDU> (Jesse Alama's message of "Tue, 19 Feb 2008 10:30:30 -0800")

Jesse Alama <alama@stanford.edu> writes:

> Aditya Mahajan <adityam@umich.edu> writes:
>
>> On Tue, 19 Feb 2008, Jesse Alama wrote:
>>
>>> Aditya Mahajan <adityam@umich.edu> writes:
>>>
>>>>> The example features some \definecolor's which I just did away with
>>>>> (sadly) by simply substituting their defining values for their
>>>>> occurences.  (This is unfortunate, but perhaps necessary until some
>>>>> other mechanism is produced.)  The problem is that the text box to the
>>>>> right of the picture is supposed to be colored, and with rounded
>>>>> corners.  But the box is missing.  Look at p. 20 of
>>>>
>>>> The TikZ manual make a lot of uses of the xcolor syntax
>>>> (e.g. \color{red!20}). There is no equivalent ConTeXt syntax. You need
>>>> to define a color, say lightred, as follows
>>>>
>>>> \definecolor[lightred][r=0.2]
>>>>
>>>> For tikz key-value options, pgf works behind the scene to define
>>>> appropriate colors, so xcolor syntax works for them. So
>>>> \fill[fillcolor=red!20] will work as expected. However, when using
>>>> \color inside any box, you need to follow ConTeXt syntax. So
>>>> \color[red!20] will not work, you need to define a context color and
>>>> then use that.
>>>
>>> I'm still not able to get fillcolor to work with the information box:
>>>
>>>  \starttikzpicture[scale=4,information text/.style={fill=red}]
>>>  \draw[xshift=1.85cm] node[right,text width=6cm,information text]
>>>  {
>>>  The \color[green]{angle $\alpha$} is
>>>    $30^\circ$ in the example ($\pi/6$ in radians). The \color[red]{sine
>>>      of $\alpha$}, which is the height of the red line, is
>>>  \startformula
>>>  \color[red]{\sin \alpha} = 1/2.
>>>  \stopformula
>>>  By the Theorem of Pythagoras ...
>>>  };
>>>
>>> Is ConTeXt correctly parsing the key "information tex/.style"?
>>
>> Works fine here. The text/.style syntax is new in Tikz. Are you using
>> the cvs version of tikz?
>
> No, I'm using the module from the garden, corresponding to the 1.18
> release.  I just installed the CVS version, and, after recompiling, I
> see that the backgrounds are still missing.  One possible explanation:
> I'm using the old TPM file that's on the modules page.  That should be
> updated to reflect the file structure of the new CVS version, right?

I spoke too soon -- it looks like things work just fine.  Thanks for
your help!

Jesse

-- 
Jesse Alama (alama@stanford.edu)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  reply	other threads:[~2008-02-19 18:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2bq6dvj38.fsf@DNab422469.Stanford.EDU>
2008-02-19  2:43 ` Aditya Mahajan
2008-02-19  3:33   ` Jesse Alama
2008-02-19  3:47     ` Aditya Mahajan
     [not found]       ` <alpine.DEB.1.00.0802182252560.21564@nqv-yncgbc>
2008-02-19  4:56         ` Jesse Alama
2008-02-19  8:20       ` Alan BRASLAU
2008-02-19 16:33         ` Aditya Mahajan
2008-02-19 17:36       ` Jesse Alama
2008-02-19 17:57         ` Aditya Mahajan
2008-02-19 18:30           ` Jesse Alama
2008-02-19 18:54             ` Jesse Alama [this message]
2008-02-19  8:50     ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2ablwu68o.fsf@DNab422469.Stanford.EDU \
    --to=alama@stanford.edu \
    --cc=adityam@umich.edu \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).