Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[tikz] changing standard line width globally

3,143 views
Skip to first unread message

Erik Quaeghebeur

unread,
Jun 29, 2010, 11:17:23 PM6/29/10
to
Hi,


I can't seem to redefine the global line width globally. I set
\tikzstyle{thin}=[line width=.6pt], which as far as I know is the standard
line width, but I need to mention 'thin' explicitly in every tikzpicture,
so my assumption must be false. Trying to set the line width using tikzset
also doesn't work.

Anybody know what the right incantation is?


TIA,

Erik

Christoph Frings

unread,
Jun 30, 2010, 7:37:33 AM6/30/10
to
Le Wed, 30 Jun 2010 05:17:23 +0200, Erik Quaeghebeur
<use...@equaeghe.nospammail.net> a écrit:

> Hi,
>
>
> I can't seem to redefine the global line width globally. I set
> \tikzstyle{thin}=[line width=.6pt], which as far as I know is the
> standard line width, but I need to mention 'thin' explicitly in every
> tikzpicture, so my assumption must be false. Trying to set the line
> width using tikzset also doesn't work.

The correct syntax is
\tikzset{thin/.style={line width=.6pt}}

But tikz doesn't apply the "thin" style to lines with no style .

\tikzset{every path/.append style={line width=1 cm}}

or

\tikzset{every path/.style={line width=1 cm}}

work as long as this style isn't modified by subsequent styles.


--
CF

Christoph Frings

unread,
Jun 30, 2010, 9:04:39 AM6/30/10
to
Le Wed, 30 Jun 2010 05:17:23 +0200, Erik Quaeghebeur
<use...@equaeghe.nospammail.net> a écrit:

> Hi,


>
>
> I can't seem to redefine the global line width globally.

Finally found : pgf manual, p. 98

"/tikz/every picture (style, initially empty)

This style is installed at the beginning of each picture.

\tikzset{every picture/.style=semithick}

Note that you should not use \tikzset to set options directly. For
instance, if you want to use a
line width of 1pt by default, do not try to say \tikzset{line width=1pt}
at the beginning of your
document. This will not work since the line width is changed in many
places. Instead, say

\tikzset{every picture/.style={line width=1pt}}

This will have the desired effect."

--
CF

Erik Quaeghebeur

unread,
Jun 30, 2010, 12:08:53 PM6/30/10
to
> Le Wed, 30 Jun 2010 05:17:23 +0200, Erik Quaeghebeur
> <use...@equaeghe.nospammail.net> a écrit:
>>
>> I can't seem to redefine the global line width globally.

On Wed, 30 Jun 2010, Christoph Frings wrote:
>
> Finally found : pgf manual, p. 98
>
> "/tikz/every picture (style, initially empty)
>
> This style is installed at the beginning of each picture.
>
> \tikzset{every picture/.style=semithick}
>
> Note that you should not use \tikzset to set options directly. For instance,
> if you want to use a
> line width of 1pt by default, do not try to say \tikzset{line width=1pt} at
> the beginning of your
> document. This will not work since the line width is changed in many places.
> Instead, say
>
> \tikzset{every picture/.style={line width=1pt}}
>
> This will have the desired effect."

Perfect, thanks. I'll have to search the manual better still in the
future.

Erik

0 new messages