Re: [NTG-context] How to customize the default verbatim colors
Taco Hoekwater wrote: %% allows XML tag names to continue after colons (namespaces) \input verb-xml % TRICK \appended\gdef\XMLsetspecials{\setpretty`\:=10 } thanks, patched Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] How to customize the default verbatim colors
Eugene Toporov wrote: Thanks a lot, Taco! I knew there should be a good way! Maybe it would be useful to add it to http://contextgarden.net/Verbatim_text ? Be my guest ;-) I also noticed that XML verbatim does not correctly handle tags with namespace. In the xml like ns:tag attribute=somevalue the ns gets colored with tag-color, the tag with attr-color. I think the whole ns:tag should be of tag-color. How about this? %% allows XML tag names to continue after colons (namespaces) \input verb-xml % TRICK \appended\gdef\XMLsetspecials{\setpretty`\:=10 } \starttext \startXML ns:tag attribute=somevalue / \stopXML \stoptext %% You can use \setpretty`\:=17 instead, if you want the colon to be indistinguisable from the rest of the tag. The line I've marked 'TRICK' is needed to make sure that the original definition of \XMLsetspecials is loaded before the new addition takes place (verbatim definitions are loaded runtime). Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] How to customize the default verbatim colors
Thanks a lot, Taco! I knew there should be a good way! Maybe it would be useful to add it to http://contextgarden.net/Verbatim_text ? I also noticed that XML verbatim does not correctly handle tags with namespace. In the xml like ns:tag attribute=somevalue the ns gets colored with tag-color, the tag with attr-color. I think the whole ns:tag should be of tag-color. Best wishes, EugeneOn 8/25/05, Taco Hoekwater [EMAIL PROTECTED] wrote: Hi!Eugene Toporov wrote: I expect there is a way to redefine whole palette or something.Yes, sure (you need to define an XXXcolorpretty palet for each typeyou want to change): ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] How to customize the default verbatim colors
Hi! Eugene Toporov wrote: I expect there is a way to redefine whole palette or something. Yes, sure (you need to define an XXXcolorpretty palet for each type you want to change): \definecolor[MYcolorone] [r=.8,g=.5,b=.5] \definecolor[MYcolortwo] [r=.8,g=.5,b=.2] \definecolor[MYcolorthree][r=.8,g=.5,b=.8] \definecolor[MYcolorfour] [r=.8,g=.2,b=.5] \definepalet[MYcolors] [ prettyone=MYcolorone, prettytwo=MYcolortwo, prettythree=MYcolorthree, prettyfour=MYcolorfour] \definepalet[XMLcolorpretty] [MYcolors] % the name is magic ! \setupcolors[state=start] \setuptyping[option=color] \starttext \startXML ... \stopXML \stoptext Cheers, Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] How to customize the default verbatim colors
Hi all! I recently started using Verbatim Macroses to make source code pieces look prettier in my docs. I use things like \setuptyping[JV] and then \startJV - \stopJV But I'd like to change the default colors in the macroses to my own. I only found that redefining some colors like this \definecolor [colorprettyone] [green] \definecolor [colorprettytwo] [navy] \definecolor [colorprettythree] [r=0,g=0,b=.9] makes effect, but that seems not very effective and affects all verbatims. 1) I could not find all colors. 2) I need several different schemes (palettes) for different verbatims (XML, Java, SQL). I expect there is a way to redefine whole palette or something. What's the easiest and the right way to do it? Thanks in advance!-- Eugene ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context