1 Using the same color in PyX and in LaTeX
3 ! This example shows three different methods how to use a color defined in PyX
4 also in LaTeX.... In the example code, we first define a cmyk color `col`,
5 which is then used to define a color `COL` in LaTeX. The latter is then used in
8 ! The same behavior can be achieved by two different methods in `c.text`,
10 r"\textcolor[named]{PineGreen}{Text} and outline ..."
11 r"\textcolor[pyx]{color.cmyk.PineGreen}{Text} and outline ..."
13 They are not as elegant as the above shown, since we need to insert the color
14 definition `PineGreen` explicitly. The first alternative makes use of the
15 `named` color model of color.sty. All colors of this model are predefined also
16 in PyX. The other alternative allows to use Python expressions to specify the
19 !! Note the use of the graphics driver `pyx` as the optional argument for the
20 color.sty LaTeX package. If you do not explicitly use the pyx driver, then the
21 color.sty package uses its default driver `dvips`. PyX will then try to
22 override the driver, since it really needs the correct driver.