Re: [NTG-context] Color problem
On 5/21/2021 00:26, Wolfgang Schuster wrote: Aditya Mahajan schrieb am 21.05.2021 um 04:47: On Thu, 20 May 2021, Rik Kabel wrote: Consider the following example: \define \HighlightColor {red} Why not just use: \definecolor[HighlightColor][red] and then use color=HighlightColor, etc. This is the better way to create unique color names but the problem in the example was the use of \define instead of \defineexpandable. \defineexpandable\HighlightColor{red} Wolfgang Wolfgang and Aditya, Thank you both for the lesson. Is the difference between MkIV (--luatex) and LMTX due to stricter application of expandability in LMTX? -- Rik ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Color problem
Aditya Mahajan schrieb am 21.05.2021 um 04:47: On Thu, 20 May 2021, Rik Kabel wrote: Consider the following example: \define \HighlightColor {red} Why not just use: \definecolor[HighlightColor][red] and then use color=HighlightColor, etc. This is the better way to create unique color names but the problem in the example was the use of \define instead of \defineexpandable. \defineexpandable\HighlightColor{red} Wolfgang ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Color problem
On Thu, 20 May 2021, Rik Kabel wrote: > Consider the following example: > >\define \HighlightColor {red} Why not just use: \definecolor[HighlightColor][red] and then use color=HighlightColor, etc. >\definehighlight[RED][color=\HighlightColor] >\definelabel[AA][alternative=inright,headcolor=\HighlightColor,text=] >\definelabel[BB][alternative=inright,headcolor=red,text=] >\noheaderandfooterlines >\starttext >\hsize3cm >Is the label red?\AA > >Is the label red?\BB > >\RED{Is this line red?} >\stoptext Aditya ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] color problem
On 01/10/20, 20:55, Susanne G. Loeber wrote: > Dear Reader, > > I have a colored section, text in another color and a TikZ picture with a > differently colored node, following each other. However, either the node > gets the wrong color or the following paragraph, see example below. > > Is there something wrong with the section settings? How do I get all the > colors right without using a paragraph in between? From experience, this usually works: \prependvalue{starttikzpicture}{\dontleavehmode\forcecolorhack} Cheers, Henri > > \setuphead[chapter] > > [ > > style={\tfd}, > > color={A2plus}, > > ] > > \setuphead[section] > > [ > > style={\tfc}, > > color={A3plus}, > > ] > > > \definecolor[A1plus][h=5CAF00] > > \definecolor[A2plus][h=B6437E] > > \definecolor[A3plus][h=606ABD] > > \definecolor[A4plus][h=FFC700] > > \definecolor[A5plus][h=D0202B] > > \definecolor[A6plus][h=EF8600] > > \definecolor[A7plus][h=0082AA] > > > \setupcolors[textcolor=A1plus] > > > \usemodule[tikz] > > > > \starttext > > > \startchapter[title={Colour test}, ref=colourtest] > > > \startsection[title={Section}] > > \starttikzpicture > > \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text should be > orange}; > > \stoptikzpicture > > > \par This a paragraph which gets the colour of the section for no reason. > > > \stopsection > > > \stopchapter > > > \startchapter[title={Colour test 2}, ref=colourtest] > > > \startsection[title={Another section }] > > > \par This a paragraph in the appropriate text color (green). > > > > \starttikzpicture > > \draw[text=A6plus] (0,0) rectangle (2,1) node[right] {node text is orange}; > > \stoptikzpicture > > > \stopsection > > > \stopchapter > > \stoptext > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] color problem
Hi, > On 1 Oct 2020, at 20:55, Susanne G. Loeber wrote: > > Dear Reader, > > I have a colored section, text in another color and a TikZ picture with a > differently colored node, following each other. However, either the node gets > the wrong color or the following paragraph, see example below. > > Is there something wrong with the section settings? How do I get all the > colors right without using a paragraph in between? Some of the blackbox magic in the tikz module is confusing ConTeXt, it seems. This works: \draw (0,0) rectangle (2,1) node[right] {\color[A6plus]{node text should be orange}}; But that’s all I know. I do not understand the tikz module at all. Best wishes, Taco ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] color problem with columns
Am 27.03.10 21:34, schrieb Wolfgang Werners-Lucchini: Hallo, on Vers 38 at page 2 (see example) text is green. \setupcolors[state=start] \newcounter\V \def\Vers#1{\increment\V {\color[darkgreen]\rm\bi \V} #1} \def\Vers#1{\increment\V \dontleavehmode{\color[darkgreen]\rm\bi \V} #1} but i think this is better \setupcolors[state=start] \definelabel [Vers] [headstyle=bolditalic, headcolor=darkgreen, command=\groupedcommand\dontleavehmode\space] \starttext \startcolumns text\par\dorecurse{50}{\Vers Dies ist ein Testsatz der gerade lange genug ist, um zu zeigen was zu zeigen ist.\par} \stopcolumns \stoptext Wolfgang ___ 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 ___
Re: [NTG-context] color problem with columns
\setupcolors[state=start] \newcounter\V \def\Vers#1{\increment\V {\color[darkgreen]\rm\bi \V} #1} \def\Vers#1{\increment\V \dontleavehmode{\color[darkgreen]\rm\bi \V} #1} but i think this is better \setupcolors[state=start] \definelabel [Vers] [headstyle=bolditalic, headcolor=darkgreen, command=\groupedcommand\dontleavehmode\space] \starttext \startcolumns text\par\dorecurse{50}{\Vers Dies ist ein Testsatz der gerade lange genug ist, um zu zeigen was zu zeigen ist.\par} \stopcolumns \stoptext Thank you very much! Wolfgang ___ 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 ___