[NTG-context] Re: how to include an an svg file?

2024-03-15 Thread seyal zavira
Thanks you and harban for all your thorough explanation.

On Fri, 15 Mar 2024, 23:11 Hans Hagen via ntg-context, 
wrote:

> On 3/13/2024 9:16 AM, Henning Hraban Ramm wrote:
> > Am 12.03.24 um 23:59 schrieb seyal zavira:
> >> You are correct. when i convert this svg to pdf via inkscape it works
> >> like a charm.
> >>
> >> But what is standard way of including an svg file with context if we
> >> want to inkscape render the images?
> >
> > \externalfigure[smile]
> >
> > without any other settings, but inkscape must be callable on the command
> > line (which doesn’t work for me on MacOS any more, must investigate…).
>  \startMPcode
>  draw lmt_svg [ filename = "smile.svg"]
>  \stopMPcode
>
> Now gives the attached but it took me a while to figure out what works.
> An inkscape export adds for instance something (globally applied) that
> is not in the svg file (which actually derived from tiger.svg as
> mentioned in the file).
>
> To be honest this is a horrible file and a good example of making things
> more complex than needed (probably common in wysiwyg applications),
> although we already had the machinery in the mp/pdf converter.
>
> The biggest issue here is that one has to put some constrants in place
> order to make it work in e.g. sumatra (mypdf) and acrobat (which here
> actually does weird erratic things when I play with another test).
>
> As with much complex svg, browsers also differ in interpretation o fsome
> features so it's hard to figure out what to do when there are
> conflicting demands. (Pointing to something that works tomorrow doesn't
> mean it worked when we tried to implement something yesterday.)
>
> For Hraben - who mentioned it - i also added support for group opacity
> and transformed shades.
>
> In the process I tried a few inkscape options (pdf export) but some
> produce faulty files (with missing stuff) so i guess we have a complex
> situation in general. That said, as long as one sticks to reliable and
> clean code (plain svg) it should mostly work out.
>
> Text is another matter because svg dropped glyph support so now
> everything has to go through font features which in turn means that if
> one uses svg as output format one has to specify every character with
> possible abuse of a substitution feature that accesses it. So that is no
> longer a real interesting option, unless of course one exports all text
> as curves, just to be sure.
>
> (I will extend general text suport but it will always be suboptimal but
> then, svg is not a long term archival format anyway.)
>
> No upload yet as i also want to do some cleanup,
>
> ps. For metapost lovers, here is some of the trickery used:
>
> \startMPpage[offset=1ts]
>
>  draw image (
>  fill (unitsquare xscaled 10cm yscaled 4cm)
>  withcolor svgcolor(0.5,0,0)
>  ;
>
>  registerluminositygroup ("test") (
>  fill (unitsquare scaled 2cm) shifted (1cm,1cm)
>  withshademethod "circular"
>  withshadecolors (.6,.1)
>  ) ;
>
>  applyluminositygroup ("test") (
>  fill (unitsquare scaled 2cm) shifted (1cm,1cm)
>  withshademethod "circular"
>  ) ;
>
>  draw luminositygroup (
>  fill (unitsquare scaled 2cm) shifted (4cm,1cm)
>  withshademethod "circular"
>  withshadecolors (.6,.1)
>  ) (
>  fill (unitsquare scaled 2cm) shifted (4cm,1cm)
>  withshademethod "circular"
>  ) ;
>
>  draw luminosityshade (
>  (unitsquare scaled 2cm) shifted (7cm,1cm)
>  ) (
>  withshademethod "circular"
>  withshadecolors (.6,.1)
>  ) (
>  withshademethod "circular"
>  ) ;
>  ) ;
>
> \stopMPpage
>
> Not that intuitive and a bit ugly deep down but it works (there was no
> need to extend mp btw as we already have graphic grouping in the engine).
>
> Hans
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
>
> ___
> 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
>
> ___
>
___
If your question is of 

[NTG-context] Re: Why aren't cross-references working in tabulate?

2024-03-15 Thread Joel via ntg-context
 Thank you! The solution worked!

On Friday, March 15, 2024 at 02:30:40 PM MDT, Wolfgang Schuster 
 wrote:  
 
 Joel via ntg-context schrieb am 15.03.2024 um 20:50:
> When I run this code, \at{page}[xyz] is unable to find the cross reference:
> 
> \starttext
> %\reference[xyz]{}
> \starttabulate[|lp(.3\textwidth)|lp(.\textwidth)|]
> \NC    \reference[xyz]{} \NC \NC\NR

\NC \doifnotmode{*trialtypesetting}{\pagereference[xyz]} \NC \NC\NR

> \stoptabulate
> 
> 
> \pagebreak
> 
> \at{page}[xyz]
> 
> \stoptext
> 
> The code does work when I uncomment line #2, revealing the 
> cross-references work find when outside of a table.
> 
> I also tried using a TABLE environment instead and the result was 
> similar, it wouldn't show the page number.
> 
> What am I doing wrong?

Tabulate and natural tables process the table content multiple times and 
therefore you're setting the reference multiple times, to avoid this 
check for trialtypesetting mode and set the reference only when you're 
out of the mode.

@Hans: Can we add the check trialtypesetting check to \reference etc.?

\protected\def\strc_references_set_named_reference
- {\ifreferencing
+ {\iftrialtypesetting
+    \expandafter\gobblefourarguments
+  \orelse\ifreferencing
      \expandafter\strc_references_set_named_reference_indeed
    \else
      \expandafter\gobblefourarguments
    \fi}

Wolfgang
___
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
___
  ___
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
___


[NTG-context] Re: Why aren't cross-references working in tabulate?

2024-03-15 Thread Wolfgang Schuster

Joel via ntg-context schrieb am 15.03.2024 um 20:50:

When I run this code, \at{page}[xyz] is unable to find the cross reference:

\starttext
%\reference[xyz]{}
\starttabulate[|lp(.3\textwidth)|lp(.\textwidth)|]
\NC    \reference[xyz]{} \NC \NC\NR


\NC \doifnotmode{*trialtypesetting}{\pagereference[xyz]} \NC \NC\NR


\stoptabulate


\pagebreak

\at{page}[xyz]

\stoptext

The code does work when I uncomment line #2, revealing the 
cross-references work find when outside of a table.


I also tried using a TABLE environment instead and the result was 
similar, it wouldn't show the page number.


What am I doing wrong?


Tabulate and natural tables process the table content multiple times and 
therefore you're setting the reference multiple times, to avoid this 
check for trialtypesetting mode and set the reference only when you're 
out of the mode.


@Hans: Can we add the check trialtypesetting check to \reference etc.?

\protected\def\strc_references_set_named_reference
- {\ifreferencing
+ {\iftrialtypesetting
+\expandafter\gobblefourarguments
+  \orelse\ifreferencing
 \expandafter\strc_references_set_named_reference_indeed
   \else
 \expandafter\gobblefourarguments
   \fi}

Wolfgang
___
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
___


[NTG-context] Why aren't cross-references working in tabulate?

2024-03-15 Thread Joel via ntg-context
When I run this code, \at{page}[xyz] is unable to find the cross reference:
\starttext%\reference[xyz]{}
\starttabulate[|lp(.3\textwidth)|lp(.\textwidth)|]
\NC    \reference[xyz]{} \NC \NC\NR
\stoptabulate


\pagebreak

\at{page}[xyz]

\stoptext

The code does work when I uncomment line #2, revealing the cross-references 
work find when outside of a table.
I also tried using a TABLE environment instead and the result was similar, it 
wouldn't show the page number.
What am I doing wrong?
--Joel
___
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
___


[NTG-context] Re: how to include an an svg file?

2024-03-15 Thread Hans Hagen via ntg-context

On 3/13/2024 9:16 AM, Henning Hraban Ramm wrote:

Am 12.03.24 um 23:59 schrieb seyal zavira:
You are correct. when i convert this svg to pdf via inkscape it works 
like a charm.


But what is standard way of including an svg file with context if we 
want to inkscape render the images?


\externalfigure[smile]

without any other settings, but inkscape must be callable on the command 
line (which doesn’t work for me on MacOS any more, must investigate…).

\startMPcode
draw lmt_svg [ filename = "smile.svg"]
\stopMPcode

Now gives the attached but it took me a while to figure out what works. 
An inkscape export adds for instance something (globally applied) that 
is not in the svg file (which actually derived from tiger.svg as 
mentioned in the file).


To be honest this is a horrible file and a good example of making things 
more complex than needed (probably common in wysiwyg applications), 
although we already had the machinery in the mp/pdf converter.


The biggest issue here is that one has to put some constrants in place 
order to make it work in e.g. sumatra (mypdf) and acrobat (which here 
actually does weird erratic things when I play with another test).


As with much complex svg, browsers also differ in interpretation o fsome 
features so it's hard to figure out what to do when there are 
conflicting demands. (Pointing to something that works tomorrow doesn't 
mean it worked when we tried to implement something yesterday.)


For Hraben - who mentioned it - i also added support for group opacity 
and transformed shades.


In the process I tried a few inkscape options (pdf export) but some 
produce faulty files (with missing stuff) so i guess we have a complex 
situation in general. That said, as long as one sticks to reliable and 
clean code (plain svg) it should mostly work out.


Text is another matter because svg dropped glyph support so now 
everything has to go through font features which in turn means that if 
one uses svg as output format one has to specify every character with 
possible abuse of a substitution feature that accesses it. So that is no 
longer a real interesting option, unless of course one exports all text 
as curves, just to be sure.


(I will extend general text suport but it will always be suboptimal but 
then, svg is not a long term archival format anyway.)


No upload yet as i also want to do some cleanup,

ps. For metapost lovers, here is some of the trickery used:

\startMPpage[offset=1ts]

draw image (
fill (unitsquare xscaled 10cm yscaled 4cm)
withcolor svgcolor(0.5,0,0)
;

registerluminositygroup ("test") (
fill (unitsquare scaled 2cm) shifted (1cm,1cm)
withshademethod "circular"
withshadecolors (.6,.1)
) ;

applyluminositygroup ("test") (
fill (unitsquare scaled 2cm) shifted (1cm,1cm)
withshademethod "circular"
) ;

draw luminositygroup (
fill (unitsquare scaled 2cm) shifted (4cm,1cm)
withshademethod "circular"
withshadecolors (.6,.1)
) (
fill (unitsquare scaled 2cm) shifted (4cm,1cm)
withshademethod "circular"
) ;

draw luminosityshade (
(unitsquare scaled 2cm) shifted (7cm,1cm)
) (
withshademethod "circular"
withshadecolors (.6,.1)
) (
withshademethod "circular"
) ;
) ;

\stopMPpage

Not that intuitive and a bit ugly deep down but it works (there was no 
need to extend mp btw as we already have graphic grouping in the engine).


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-


smile-test.pdf
Description: Adobe PDF document


luminosity.pdf
Description: Adobe PDF document
___
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
___


[NTG-context] Re: Struggling with the distance and right margin text

2024-03-15 Thread Pablo Rodriguez via ntg-context
On 3/15/24 14:06, Ursula Hermann wrote:
> Dear List, 

Dear Ursula,

this might help you (it isn’t perfect, but you just seem to copy and
paste fragments from your source files):

  %\showframe\showstruts
  \mainlanguage[de-at]
  \setuppagenumbering[alternative=doublesided]
  \definemargindata  [MyInMargin][ininner]
  \definemarginframed[MyInMargin]
[topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
  \defineframed[topruletitle]
[width=max,
 frame=off,
 topframe=on,
 rulethickness=1pt,
 align={justify},
 extras=\dontleavehmode]
  \starttext
  \topruletitle{\MyInMargin {1.1.1}\bf
  Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par
  \input knuth\page

  \topruletitle{\MyInMargin{3.2.22}{\bf
  Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und
\input zapf b}
  \stoptext

Sorry for saying that again, but please elaborate both your minimal
samples and your descriptions of the issues you are experiencing.

Some comments on the code fragments you sent.

First of all, please include always code that can be compiled simply
after being copied and pasted.

This requires \starttext (most of the time) and \stoptext (mandatory to
avoid stupid errors).

> \definepapersize[MyBook][width=19cm,height=29.7cm]
> \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook
> %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
> \setupbodyfont[modern, 12.50pt]

If these lines are irrelevant for the issue you are experiencing, please
don’t include them.

> \definemargindata  [MyInMargin][inleft]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]

You define this margin framed, but your sample makes no use of it.

Sorry, but I don’t get it.

> \defineenumeration
>   [theorem]
>   [
>     text=Theorem,
>     title=yes,
>     width=fit,
>     distance=0.2em,
>     alternative=serried,
>   ]
> \definetextbackground[GrayBackground][
>   location=paragraph,
>   background=color,
>   backgroundcolor=lightgray,
>   leftoffset=.5\bodyfontsize,
>   rightoffset=.5\bodyfontsize,
>   topoffset=.5\bodyfontsize,
>   bottomoffset=.5\bodyfontsize,
>   frame=off,]
>   \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
>   \blackrule[color=black, height=0.10ex, width=13.50cm]

If your sample includes no theorem or text background, please remove
these definitions when sending code.

BTW, avoid include text content (such as margin and body rules [but not
their definitions]) before \starttext.

Also, use \clrf instead of \\ (since the mailing list displays the
relevant line as ("\" instead of "\\"):

>   \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\}

Here starts your text:

> \starttext
> \margintext {1.1.1}
> {\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par

Your margin text is undefined. Your code has a defined margin text
command, but it isn’t used.

> So  I have here an example from the second page: 

Sorry, but I’m having the impression you are using ConTeXt as a kind of
command-based DTP software (which I think it isn’t at all).

Or, do you define commands for each page?

I think it is better to define a single margin text command and use a
doublesided page setup.

> \definemargindata[inrightmargin][right][margin=margin,width=.50em\rightmarginwidth,style=,color=]
> \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt, 
> width=.90cm]

Again, margin text commands defined, but never used.

> \blackrule[color=black, height=0.10ex, width=13.40cm]
> {\blackrule[color=black, height=0.10ex, width=1cm, distance=.90cm]\par

Here you open a brace that is not closed at all.

At least, consider that this won’t be extremely readable for other
people (this is only a sample).

It also may be problematic for you, if you leave the source untouched
for some weeks.

> \defineenumeration
>   [theorem]
>   [
>     text=Theorem,
>     title=yes,
>     width=fit,
>     distance=0.2em,
>     alternative=serried,
>   ]

At least, it would be better not to include a definition inside content
that seems to (or may) be grouped with braces.

BTW, it is exactly the same definition as the one included before.

It isn’t just to be removed in minimal samples, your final code doesn’t
need the duplicated command definition.

> \inright{3.2.22}
> {\bf Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und 
>
> My problem here is that there is not the same distance between the  the
> text and the  margintext .

Please, always compile the minimal samples that you send to the list.

This is simply to ensure other list subscribers will get the same
results as you.

After adding a final \stoptext command, I had to run:

  mtxrun --script check source-sample.tex

This allowed me to spot the problem with the unclosed brace (mentioned
before).

> And now the margintext should be on the right side. 

I get the second margin text on the right side (after all, 

[NTG-context] Struggling with the distance and right margin text

2024-03-15 Thread Ursula Hermann
Dear List,



On the first page I had this example:
\definepapersize[MyBook][width=19cm,height=29.7cm]
\setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook 
%\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper
\setupbodyfont[modern, 12.50pt]
\definemargindata  [MyInMargin][inleft]
\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm]
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\definetextbackground[GrayBackground][
  location=paragraph,
  background=color,
  backgroundcolor=lightgray,
  leftoffset=.5\bodyfontsize,
  rightoffset=.5\bodyfontsize,
  topoffset=.5\bodyfontsize,
  bottomoffset=.5\bodyfontsize,
  frame=off,]
  \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\}
  \blackrule[color=black, height=0.10ex, width=13.50cm]
\starttext
\margintext {1.1.1}
{\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par


So  I have here an example from the second page:


\definemargindata[inrightmargin][right][margin=margin,width=.50em\rightmarginwidth,style=,color=]

\definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt, 
width=.90cm]
\blackrule[color=black, height=0.10ex, width=13.40cm]
{\blackrule[color=black, height=0.10ex, width=1cm, distance=.90cm]\par
\defineenumeration
  [theorem]
  [
text=Theorem,
title=yes,
width=fit,
distance=0.2em,
alternative=serried,
  ]
\inright{3.2.22}
{\bf Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und

My problem here is that there is not the same distance between the  the text 
and the  margintext .

And now the margintext should be on the right side.

So maybe someone could help me please.
Many thanks.



___
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
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-15 Thread Hans Hagen

On 3/15/2024 12:53 AM, Jim wrote:

Max (et al),

were you hoping the ConTeXt distribution would ship its own
pgfutil-context.def, or were you hoping that someone could convince Henri
to put the RGB change in?

And, if anyone has the will to push this (or add it in to a ConTeXt
distribution version), I'd still like the cmyk support, even if there is no
ability to specify colour profiles:

\def\pgfutil@emu@cmyk#1#2,#3,#4,#5\@nil
{
 \pgfmathsetmacro{\@red@}{(1 - #2) * (1 - #5)}%
 \pgfmathsetmacro{\@green@}{(1 - #3) * (1 - #5)}%
 \pgfmathsetmacro{\@blue@}{(1 - #4) * (1 - #5)}%
 \expandafter\edef\csname\string\color@#1\endcsname
 {\noexpand\xcolor@ {}{}{rgb}{\@red@,\@green@,\@blue@}}
}

I don't see that it would hurt anything, even if it doesn't give complete
cmyk support.

We provide

\pgf@context@registercolor
\pgf@context@registergray
\pgf@context@registerrgb
\pgf@context@registercmyk

in colo-ini that hook into the context color mechanism so be careful 
with patches. I'm not going to spend time on other solutions that can 
interfere with internals.


(I wonder when the moment comes that we have to take a snapshot of tikz 
and stay with that.)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

___
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
___


[NTG-context] Re: Japanese

2024-03-15 Thread luigi scarso
[probably off-topic , my apologies ]
For a project in my spare time (i.e. no deadlines)
I am collecting all kind of info I can find on the net (so free/non free
fonts, books , specs, images raster /vectorial..whatever)   on the
Kaiti (楷体) or “Regular style”
https://fonts.google.com/knowledge/type_in_china_japan_and_korea/type_classification_in_cjk_chinese

Any help would be greatly appreciated; there are no secrets, so we can use
this ml or write to me privately, as you prefer.

--
luigi
___
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
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-15 Thread Hans Hagen

On 3/15/2024 12:18 AM, Max Chernoff wrote:

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".


ok, changed, i assume you tested it


  * 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".


i trust you on that (never run piped on linux, only on windows)


  * 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 .


see mail by others

Thanks,

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-

___
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
___


[NTG-context] Re: PDF, runner, and TikZ patches

2024-03-15 Thread Max Chernoff
Hi Aditya, Jim,

On Fri, 2024-03-15 at 01:53 +0100, Aditya Mahajan wrote:
> On Thu, 14 Mar 2024, Jim wrote:
> > were you hoping the ConTeXt distribution would ship its own
> > pgfutil-context.def, or were you hoping that someone could convince Henri
> > to put the RGB change in?
>
> We can patch some of the definitions of pgfutil-context.def in m-tikz
> if really needed, but it would be preferable to first check if tikz
> maintainers are willing to merge them upstream.

Ah, okay. I was under the impression that the LMTX standalone
distribution carried a ton of TikZ patches and that ConTeXt patches
weren't really merged upstream, but it sounds like there are only a
couple small patches and upstream does merge ConTeXt patches. I'll
rebase my PR and check with upstream again. Thanks!

On Thu, 2024-03-14 at 20:53 -0300, Jim wrote:
> were you hoping the ConTeXt distribution would ship its own
> pgfutil-context.def, or were you hoping that someone could convince Henri
> to put the RGB change in?

I've seen a few TikZ bugs/patches resolved on this list, and I know that
the LMTX standalone distribution carries patches for TikZ (although
fewer than I thought?), so this seemed like the right place to start.

> And, if anyone has the will to push this (or add it in to a ConTeXt
> distribution version), I'd still like the cmyk support, even if there is no
> ability to specify colour profiles:
>
> \def\pgfutil(a)emu@cmyk#1#2,#3,#4,#5\@nil
> {
> \pgfmathsetmacro{\@red@}{(1 - #2) * (1 - #5)}%
> \pgfmathsetmacro{\@green@}{(1 - #3) * (1 - #5)}%
> \pgfmathsetmacro{\@blue@}{(1 - #4) * (1 - #5)}%
> \expandafter\edef\csname\string\color@#1\endcsname
> {\noexpand\xcolor@ {}{}{rgb}{\@red@,\@green@,\@blue@}}
> }
>
> I don't see that it would hurt anything, even if it doesn't give complete
> cmyk support.

I need to rebase my current PGF PR anyways, so I'll add this in with it.

Thanks,
-- Max

___
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
___