ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Looks like a bug in \typefile[option=LANG]
@ 2008-12-31 13:09 Andrey Riabushenko
  0 siblings, 0 replies; only message in thread
From: Andrey Riabushenko @ 2008-12-31 13:09 UTC (permalink / raw)
  To: ntg-context

I have defined a new float environment for source file listings. 

\definefloat [listing] [listings]

\definetyping[listing][numbering=file]

\placelisting[lst:set]{Example of set tree} {
   \typefile[listing][option=C]{set.cpp}
}

It works just as expected.


Then I have tried to change standard color palet with my own palet.

\definepalet[corp-pretty][prettyone=corp-color-darkblue, 
prettytwo=corp-color-blue, prettythree=corp-color-lightblue, 
prettytwoone=corp-color-grey, prettyfour=corp-color-green,
prettyfourone=corp-color-green, prettyfourtwo=corp-color-green, 
prettyfourthree=corp-color-green,
prettyfourfour=corp-color-orange, prettysixone=corp-color-orange, 
prettysixtwo=corp-color-orange
prettyeight=corp-color-orange, prettynine=corp-color-orange]


\definefloat [listing] [listings]

\definetyping[listing][numbering=file, palet=corp-pretty]

\placelisting[lst:set]{Example of set tree} {
   \typefile[listing][option=C]{set.cpp}
}

The colors did not appear, in the texexec output I got lots of errors like

color           : TEXcorp-pretty:prettythree is not defined
color           : TEXcorp-pretty:prettythree is not defined
color           : TEXcorp-pretty:prettyone is not defined
color           : TEXcorp-pretty:prettytwo is not defined
color           : TEXcorp-pretty:prettythree is not defined
color           : TEXcorp-pretty:prettyfour is not defined


NOTICE \typefile LOOKS FOR PALET  "TEXcorp-pretty" and not "corp-pretty" as I 
have defined. There is some bug or "feature" that makes an implicit 
assumption of the palet prefix name - TEX.



I have managed to make it work by definition a palet with name TEXcorp-pretty 
and still passing as palet option of \definetyping the name corp-pretty, but 
it is a ugly hack.
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-12-31 13:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-31 13:09 Looks like a bug in \typefile[option=LANG] Andrey Riabushenko

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