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.