Double lines in TikZ

5,289 views
Skip to first unread message

Alex

unread,
Jun 7, 2010, 9:56:37 AM6/7/10
to Sketch Users
Hello,

I'm trying to use double lines, like the ones in pgfmanual.pdf from
page 136:

In PGF manual, the example is:

\draw[draw=white,double=red,very thick] (0,1) -- (1,0);

In the Sketch manual (3.1.5.2 TikZ/PGF options), "draw" and "double"
should be recognized. So I've written in Sketch:

line[draw=white,double=red,style=very thick](x)(o)(y)

When compiling, I get this warning:

warning, unknown line option double=red will be ignored

And of course, in the output, the line is white.

Am I missing something? I'm using sketch 0.2 build 161d.

Alex
Message has been deleted

Gene

unread,
Jun 9, 2010, 12:21:44 AM6/9/10
to Sketch Users
TikZ syntax for double lines seems to have changed or at least to have
been augmnented. This will require a change to Sketch. You might try

line[draw=red,style=double,style=very thick] (0,1)(1,0);

I think this is what would have drawn a double red line when Sketch
was implemented.

Sorry I don't have hands on a TikZ installation right now so can't try
it myself.

Alex

unread,
Jun 9, 2010, 1:38:16 PM6/9/10
to Sketch Users
Thanks. This did the trick:

line (0,0,0)(1,1,0)
line[draw=white, style=double=red, style=very thick](1,0,0)(0,1,0)

global {language tikz}

The red line was a bit thicker than the white one, so I added this to
get them at the same thickness:

line[draw=white, style=double=red, double distance=0.5pt,
style=very thick](1,0,0)(0,1,0)

So... style=ABCD is copied unmodified into TikZ (i.e. ABCD) ?

Alex

Gene

unread,
Jun 10, 2010, 9:03:46 PM6/10/10
to Sketch Users
On Jun 9, 1:38 pm, Alex <broscutama...@gmail.com> wrote:
> Thanks. This did the trick:
>
>    line (0,0,0)(1,1,0)
>    line[draw=white, style=double=red, style=very thick](1,0,0)(0,1,0)
>
>    global {language tikz}
>
> The red line was a bit thicker than the white one, so I added this to
> get them at the same thickness:
>
>    line[draw=white, style=double=red, double distance=0.5pt,
> style=very thick](1,0,0)(0,1,0)
>
> So... style=ABCD is copied unmodified into TikZ (i.e. ABCD) ?
>
> Alex
>

Not exactly. The manual talks about this:

"The style option can contain both face and edge information, so
sketch must check the style value. Values known to sketch include
dashed, densely dashed, densely dotted, dotted, double, loosely
dashed, loosely dotted, nearly opaque, nearly transparent, semithick,
semitransparent, solid, thick, thin, transparent, ultra nearly
transparent, ultra thick, ultra thin, very nearly transparent, very
thick, and very thin."

These options are split appropriately into line and polygon options
and applied to the correct primitives. Anything else causes a warning
and is copied to both.

The style option used to be covered in the TikZ manual. It does not
seem to be any more. Anyway, the next maintenance release will have
double=<color> as an allowed tikz option.





Reply all
Reply to author
Forward
0 new messages