ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Christian Feuersaenger <ludewich@users.sourceforge.net>
Subject: Re: TikZ and wrong drawing order
Date: Thu, 11 Jun 2015 22:58:11 +0200	[thread overview]
Message-ID: <CALBOmsb74Fz0NMXHrrKuvd7onsKrtDbGaP_iKxFc6=An-CJVwA@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.03.1506111639090.25635@hzvpu.rqh>

On Thu, Jun 11, 2015 at 10:43 PM, Aditya Mahajan wrote:
> On Thu, 11 Jun 2015, Mojca Miklavec wrote:
>> On Thu, Jun 11, 2015 at 7:59 PM, Aditya Mahajan wrote:
>>> On Thu, 11 Jun 2015, Mojca Miklavec wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to ask for help for either finding a fix or some clever
>>>> workaround for the following problem.
>>>>
>>>> If I use a TikZ picture as item symbol and additionally use background
>>>> text, then the first symbol in itemize environment gets covered by the
>>>> background. Here's an example:
>>>>
>>>
>>> Workaround (though I have no idea why this should work).
>>
>>
>>>    background={foreground,color}
>>
>>
>> While it works in the sense that it gives a consistent look, it
>> doesn't really lead to the desired result, at least not for me. The
>> reason for using background colour in my case was to make text
>> "visible" on a dark background photo. It doesn't really help if the
>> main text gets hidden behind the semi-transparent layer.
>
>
> I have no idea what tikz is doing:
>
> \usemodule[tikz]
>
> \definecolor[light][s=1,a=1,t=0.1]
> \definecolor[dark] [s=1,a=1,t=0.95]
>
> \defineframedtext[normal] [width=4cm, background=color]
> \defineframedtext[reverse][width=4cm, background={foreground,color}]
>
> \startbuffer
> \tikz\fill[color=blue] (0,0) circle (.2cm);
> \startMPcode fill fullcircle scaled (.4cm) withcolor \MPcolor{blue};
> \stopMPcode
> \stopbuffer
>
> \starttext
>
> \startnormal[backgroundcolor=light] \getbuffer \stopnormal
> \startnormal[backgroundcolor=dark] \getbuffer  \stopnormal
>
> \blank[3*line]
>
> \startreverse[backgroundcolor=light] \getbuffer \stopreverse
> \startreverse[backgroundcolor=dark] \getbuffer  \stopreverse
> \stoptext

It's even more weird than that. The colour of the first item behind
the "dark" depends on the colour of "light":

\usemodule[tikz]

\definecolor[extralight][s=1,a=1,t=0.1]
\definecolor[light][s=1,a=1,t=0.6]
\definecolor[dark] [s=1,a=1,t=0.95]

\defineframedtext[normal] [width=6cm, background=color]
\defineframedtext[reverse][width=6cm, background={foreground,color}]

\startbuffer
\tikz\fill[color=blue] (0,0) circle (.2cm);%
\startMPcode fill fullcircle scaled (.4cm) withcolor \MPcolor{blue}; \stopMPcode
\tikz\fill[color=blue] (0,0) circle (.2cm);
\stopbuffer

\starttext

\startnormal[backgroundcolor=light] \getbuffer \stopnormal
\startnormal[backgroundcolor=dark] \getbuffer  \stopnormal

\blank[2*line]

\startreverse[backgroundcolor=light] \getbuffer \stopreverse
\startreverse[backgroundcolor=dark] \getbuffer different \stopreverse

\blank[2*line]

\startreverse[backgroundcolor=extralight] \getbuffer \stopreverse
\startreverse[backgroundcolor=dark] \getbuffer from this one \stopreverse
\stoptext

Mojca
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2015-06-11 20:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 17:27 Mojca Miklavec
2015-06-11 17:59 ` Aditya Mahajan
2015-06-11 20:14   ` Mojca Miklavec
2015-06-11 20:43     ` Aditya Mahajan
2015-06-11 20:58       ` Mojca Miklavec [this message]
2015-06-11 21:26     ` Hans Hagen
2015-06-14 21:09       ` Mojca Miklavec
2015-06-11 21:12 ` Hans Hagen
2015-06-11 22:28   ` Mojca Miklavec
2015-06-11 22:45     ` Hans Hagen
2015-06-14 21:26       ` Mojca Miklavec
2015-06-14 21:38         ` Mojca Miklavec
2015-06-15  7:43         ` Hans Hagen
2015-06-15  8:02           ` Mojca Miklavec
2015-06-15 13:02             ` Hans Hagen
2015-06-15 13:36               ` Mojca Miklavec
2015-06-15  9:48           ` Alan BRASLAU
2015-06-15 11:47         ` Hans Hagen
2015-06-12  7:11     ` Alan BRASLAU

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='CALBOmsb74Fz0NMXHrrKuvd7onsKrtDbGaP_iKxFc6=An-CJVwA@mail.gmail.com' \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ludewich@users.sourceforge.net \
    --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).