[Tikzdevice-bugs] Context and tikz?

Charlie Sharpsteen chuck at sharpsteen.net
Fri Apr 15 19:10:34 CEST 2011


On Fri, Apr 15, 2011 at 3:10 AM, Matthieu Stigler <
matthieu.stigler at gmail.com> wrote:

> Hi
>
> The reason I am actually very interested in tikzDevice is that I need to
> produce plots with "spotcolors", i.e. printing won't be done with a three
> (RGB) or four (CMYK) but only two colors (one black, the other one a pantone
> color). Unfortunately, both pdf() and ps() in R do not have the spotcolor
> model...
>
> I had found this page:
>
> http://wiki.contextgarden.net/Colors#In_TikZ
>
> which gave me some hope I would be able to use spotcolors, but actually I
> think it concerns only conText? I must say I just discovered tikz, so no
> clear idea on what is compatibility of the code for context? I see a mention
> of context in the tikzDevice guide... has been any work on this direction?
> Which step would you recommend me to do get the generated tikz code runing
> on context?
>

TikZ does support ConTeXt, and plain TeX as well!  Adding support for TeX
dialects other than LaTeX is actually part of the roadmap for the 0.7
release:

  https://github.com/Sharpie/RTikZDevice/wiki/Roadmap

There is some work that needs to be done first though. We need to add
support for the LuaTeX engine (Issue
28<https://github.com/Sharpie/RTikZDevice/issues/28>)
as recent versions of ConTeXt are closely tied to that engine as Hans Hagen
is part of the development team of both projects. Then, a few changes would
have to be made to the device structure:


   - A `dialect` parameter would have to be added to tikz() that would work
   similar to the `engine` parameter by specifying if the device was producing
   LaTeX code, ConTeXt code, or possibly just plain TeX code.


   - The device internals and font metric calculator would have to be
   extended to deal with the syntax differences between different
   TeX dialectics.

This would  involve changing some parts of the C code, which has become a
little disorganized because it is hidden from users which makes it easier
for us to let it get messy since no one else sees it (Issue
27<https://github.com/Sharpie/RTikZDevice/issues/27>
).

Even if support is added for ConTeXt, I'm not sure if TikZ would be able to
make use of the spot color feature as it uses a version of the xcolor
package <http://www.ukern.de/tex/xcolor.html> which has been slightly
extended to fading of colors. It should be possible fo us to define colors
using the CMYK color space instead of RGB, but I don't know if that will
translate all the way down to a Pantone specification at the PDF level.

Graphic design is an amateur hobby of mine though---so I would be interested
to find out if this is possible!

-Charlie



> Thanks so much!
>
> Matthieu
>
>


More information about the Tikzdevice-bugs mailing list