From: Max Chernoff <mseven@telus.net>
To: ntg-context <ntg-context@ntg.nl>
Subject: [NTG-context] PDF, runner, and TikZ patches
Date: Thu, 14 Mar 2024 17:18:43 -0600 [thread overview]
Message-ID: <a08d6aa167e687abf89a2d637282f655ecd95ca0.camel@telus.net> (raw)
In-Reply-To: <5b3c436565692c3da7b76aa4666d9d0c22eeb46b.camel@telus.net>
Hi all,
I've had a few patches applied to my installation for a little while
now, so I figured that I should send them in. There's a diff at the end
of the email, and the modified files are attached [but rejected by the
mailing list, so sent separately to Hans]
* In the definition of "featurecreep()" in "lpdf-mis.lmt",
"structures.pages.tobesaved[i].status" should be "[...].state" to
match the definition of "pages.save" in "strc-pag.lua".
* For the "resultof" runner in "util-sbx.lmt", the current io.popen
mode only works with Windows. See the definition of "l_checkmodep" in
"liolib.c".
* Some of the pgfplots 3D shaders appear to be broken,
see https://tex.stackexchange.com/a/708121 .
* The TikZ "RGB" colour model does not currently work properly. This is
internally used by "\usepgfplotslibrary[colorbrewer]" among others.
See https://github.com/pgf-tikz/pgf/pull/1130 .
Thanks,
-- Max
diff --git a/tex/generic/pgf/utilities/pgfutil-context.def b/tex/generic/pgf/utilities/pgfutil-context.def
index eddab09ab..66edb0980 100644
--- a/tex/generic/pgf/utilities/pgfutil-context.def
+++ b/tex/generic/pgf/utilities/pgfutil-context.def
@@ -26,8 +26,17 @@
\def\pgfutil@definecolor#1#2#3{\csname pgfutil@emu@#2\endcsname{#1}#3\@nil}
\def\pgfutil@emu@rgb#1#2,#3,#4\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#3,#4}}}
-\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{rgb}{#2,#2,#2}}}
+\def\pgfutil@emu@gray#1#2\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{gray}{#2}}}
\def\pgfutil@emu@cmyk#1#2,#3,#4,#5\@nil{\expandafter\def\csname\string\color@#1\endcsname{\xcolor@{}{}{cmyk}{#2,#3,#4,#5}}}
+\def\pgfutil@emu@RGB#1#2,#3,#4\@nil{%
+ \begingroup
+ \pgfmathdivide@{#2}{255}\let\pgfutil@emu@RGB@r\pgfmathresult
+ \pgfmathdivide@{#3}{255}\let\pgfutil@emu@RGB@g\pgfmathresult
+ \pgfmathdivide@{#4}{255}\let\pgfutil@emu@RGB@b\pgfmathresult
+ \edef\pgf@marshal{\def\expandafter\noexpand\csname\string\color@#1\endcsname{%
+ \noexpand\xcolor@{}{}{rgb}{\pgfutil@emu@RGB@r,\pgfutil@emu@RGB@g,\pgfutil@emu@RGB@b}}}%
+ \expandafter\endgroup\pgf@marshal
+}
% no need for x colors (users can load it if needed)
diff --git a/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex b/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
index 60d6274..106c490 100644
--- a/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
+++ b/tex/generic/pgfplots/pgfplotsmeshplothandler.code.tex
@@ -2804,6 +2804,9 @@
\def\pgfplotsretval{4}%
\fi
\fi
+ \if0\pgfplotsretval
+ \def\pgfplotsretval{5}
+ \fi
\pgfkeyslet{/pgfplots/surf shading/shading type}\pgfplotsretval%
%
\pgfplotsplothandlermesh@set@shader@colormap
diff --git a/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def b/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
index 0046daa..b563732 100644
--- a/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
+++ b/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-luatex.def
@@ -61,7 +61,7 @@
\pgfplotslibrarysurfusepath
\endpgfpicture
}%
- \immediate\saveboxresource resources{
+ \saveboxresource resources{
/Pattern << \pgfplots@glob@TMPa >> % write the pattern resource dictionary
}\pgfutil@tempboxa
\leavevmode
diff --git a/tex/context/base/mkxl/util-sbx.lmt b/tex/context/base/mkxl/util-sbx.lmt
index b48d4a9..0ee8a16 100644
--- a/tex/context/base/mkxl/util-sbx.lmt
+++ b/tex/context/base/mkxl/util-sbx.lmt
@@ -393,7 +393,7 @@ local runners = {
if trace then
report("resultof: %s",command)
end
- local handle = iopopen(command,"rb") -- already has flush
+ local handle = iopopen(command,"r") -- already has flush
if handle then
local result = handle:read("*all") or ""
handle:close()
diff --git a/tex/context/base/mkxl/lpdf-mis.lmt b/tex/context/base/mkxl/lpdf-mis.lmt
index 0f21cf9..a9cfe02 100644
--- a/tex/context/base/mkxl/lpdf-mis.lmt
+++ b/tex/context/base/mkxl/lpdf-mis.lmt
@@ -510,7 +510,7 @@ local function featurecreep()
return -- fatal error
end
local label = p.viewerprefix or ""
- if p.status == v_stop then
+ if p.state == v_stop then
if not stopped then
list[#list+1] = i - 1 -- pdf starts numbering at 0
list[#list+1] = pdfdictionary {
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next parent reply other threads:[~2024-03-14 23:21 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5b3c436565692c3da7b76aa4666d9d0c22eeb46b.camel@telus.net>
2024-03-14 23:18 ` Max Chernoff [this message]
2024-03-14 23:53 ` [NTG-context] " Jim
2024-03-15 0:53 ` Aditya Mahajan
2024-03-15 7:30 ` Max Chernoff
2024-03-16 13:13 ` Jim
2024-03-16 13:10 ` Jim
2024-03-16 14:20 ` Hans Hagen
2024-03-18 0:31 ` Jim
2024-03-18 8:23 ` Hans Hagen
2024-03-15 8:44 ` Hans Hagen
2024-03-16 13:21 ` Jim
2024-03-16 14:49 ` Hans Hagen
2024-03-15 8:38 ` 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=a08d6aa167e687abf89a2d637282f655ecd95ca0.camel@telus.net \
--to=mseven@telus.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).