From: Gavin via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Gavin <gavinpublic@icloud.com>
Subject: [NTG-context] TikZ \shade broken
Date: Sat, 17 Jun 2023 11:28:12 -0600 [thread overview]
Message-ID: <391EB921-D584-4D96-BBF5-BBD0D7C5B509@icloud.com> (raw)
Hi List,
First, a big thanks to Aditya for solving the missing pgfsys-luatex.def! That was a show-stopper on my Mac.
Now that I can use TikZ again, I am running into a problem with the \shade command. Below is a small working example from the TikZ manual [pp.39-41]. The first tikzpicture is the example. The second TikZ picture is similar, but without any shading.
\usemodule[tikz]
\starttext
\starttikzpicture
\shade[top color=yellow,bottom color=black] (0,0) rectangle +(2,1);
\shade[left color=yellow,right color=black] (3,0) rectangle +(2,1);
\shadedraw[inner color=yellow,outer color=black,draw=yellow] (6,0) rectangle +(2,1);
\shade[ball color=green] (9,.5) circle (.5cm);
\stoptikzpicture
\starttikzpicture
\draw[color=black] (0,0) rectangle +(2,1);
\fill[color=yellow] (3,0) rectangle +(2,1);
\filldraw[fill=black,draw =yellow] (6,0) rectangle +(2,1);
\fill[fill=green] (9,.5) circle (.5cm);
\stoptikzpicture
\stoptext
\stoptext
The second picture works. The first picture produces quite an error message (below). I’m using
ConTeXt ver: 2023.06.01 09:42 LMTX fmt: 2023.6.2
on an M1 Mac with Ventura 13.4
Any help would be greatly appreciated!
Gavin
tex error > tex error on line 8 in file ./TikZtest.tex: Valid keyword expected, likely 'direction'
<macro> \pgfsys@vertshading
#1#2#3->{\pgf@parsefunc {#3}\pgfmathparse {#2}\setbox \pgfutil@tempboxa =\hbox dir
TLT to\pgfmathresult pt{\vbox to\pgf@max {\vfil \pgfsys@invoke {/Sh sh}}\hfil }\pgf@process {\pgfpoint {#2}{\pgf@max }}\immediate \saveboxresource resources {/Shading
<argument>
...dafter \expandafter \def \expandafter \expandafter \expandafter \@@args \expandafter \expandafter \expandafter {\csname pgf@args\pgf@shadingname \endcsname }\expandafter \expandafter \expandafter \@temp \expandafter \@args \@@args
\expandafter ...
<macro> \pgfutil@firstoftwo
#1#2->#1
<argument>
...r \expandafter \expandafter {\csname pgf@args\pgf@shadingname \endcsname }\expandafter \expandafter \expandafter \@temp \expandafter \@args \@@args \expandafter \pgfmath@smuggleone \csname \pgf@shadingxname \endcsname \endgroup }{}
\pgf@invokesh ...
<macro> \pgfutil@secondoftwo
#1#2->#2
<macro> \pgfshadepath
...e@cos }{0pt}{0pt}\pgfsys@transformcm {\pgf@sys@tonumber {\pgf@xc }}{0}{0}{\pgf@sys@tonumber {\pgf@yc }}{0pt}{0pt}\ifx \pgf@shade@extra@transform \pgfutil@empty \else \pgflowlevel {\pgf@shade@extra@transform }\fi \pgfuseshading {#1}
\pgfsys@endsc ...
...
<line 3.8>
\shade[top color=yellow,bottom color=black] (0,0) rectangle +(2,1);
1 % !TEX useAlternatePath
2 % !TEX useConTeXtSyncParser
3
4 \usemodule[tikz]
5
6 \starttext
7 \starttikzpicture
8 >> \shade[top color=yellow,bottom color=black] (0,0) rectangle +(2,1);
9 \shade[left color=yellow,right color=black] (3,0) rectangle +(2,1);
10 \shadedraw[inner color=yellow,outer color=black,draw=yellow] (6,0) rectangle +(2,1);
11 \shade[ball color=green] (9,.5) circle (.5cm);
12 \stoptikzpicture
13 \starttikzpicture
14 \draw[color=black] (0,0) rectangle +(2,1);
15 \fill[color=yellow] (3,0) rectangle +(2,1);
16 \filldraw[fill=black,draw =yellow] (6,0) rectangle +(2,1);
17 \fill[fill=green] (9,.5) circle (.5cm);
18 \stoptikzpicture
You started a keyword but it seems to be an invalid one. The first character(s)
might give you a clue. You might want to quit unwanted lookahead with \relax.
mtx-context | fatal error: return code: 1
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2023-06-17 17:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-17 17:28 Gavin via ntg-context [this message]
2023-06-17 18:11 ` Hans Hagen via ntg-context
2023-06-19 11:57 ` Gavin via ntg-context
2023-06-26 12:26 ` Gavin via ntg-context
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=391EB921-D584-4D96-BBF5-BBD0D7C5B509@icloud.com \
--to=ntg-context@ntg.nl \
--cc=gavinpublic@icloud.com \
/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).