{tikz-styles} are predefined sets of options that organize how graphics elements are drawn. It is thus possible to program specific styles and reuse the styles on different objects. The {tikz-styles} tag can be used in parallel with {tikz-pgf}.

learn more… | top users | synonyms

71
votes
2answers
13k views

Should \tikzset or \tikzstyle be used to define TikZ styles?

The PGF/TikZ manual states in section 12.4 Using Graphic Options, page 120 (v2.10), that TikZ styles can be set using: \tikzset{my style/.style={<tikz options>},...} However, in several ...
29
votes
1answer
967 views

Creating thicker Tikz mindmap connectors

I'm running MiKTeX 2.9, on a Windows 7 machine. My pdflatex compilation log lists: pgf 2008/01/15 v2.10 (rcs-revision 1.12) I am using TikZ's mindmap library to draw some graphics and I quite ...
24
votes
1answer
9k views

How to set default style for arrow tips in TikZ?

I am creating multiple TikZ pictures within one document and would like to set the default style of arrow heads for all the pictures to the latex style, i.e. like -latex does, so that I don't have to ...
24
votes
2answers
714 views

Arguments for TikZ style

Motivation To put arrows inside of a TikZ path I have defined myself a TikZ style arrow inside. To make it even more portable I want it to take arguments like this \draw[arrow inside={pos = 0.1, end ...
21
votes
1answer
2k views

TikZ picture shapes

I am very new to the TikZ package, and I need to draw some flow chars by using the following shapes. However I couldn't figure out how to draw the 4th and and 6th ones below. It would be very nice ...
19
votes
3answers
957 views

Can I mark ends of lines with a cross?

I have the following image: \documentclass{article} \usepackage[pdftex,active,tightpage]{preview} \setlength\PreviewBorder{2mm} \usepackage{tkz-fct} \usetikzlibrary{arrows, ...
19
votes
2answers
480 views

TikZ -The pretty boxes to frame the theorems-lemma-proposition-etc

I came across a website which provides examples of pretty boxes to frame theorems in LaTeX with extension bioboite and not with TikZ. Here is code with: \documentclass{article} ...
19
votes
1answer
5k views

Comprehensive list of TikZ style options?

I'm aware that one can use \tikzstyle{every label}=[...] to apply styles to every label within a tikzpicture; or \tikzset{mystyle/.style={...}} to apply style specs to a specific type of node mystyle ...
18
votes
1answer
8k views

Can we define maximum width for a node?

My question is almost opposite to: this question. I have defined a block: \begin{tikzpicture}[node distance = 2cm, auto,->=stealth,point/.style= {circle,fill=red,minimum ...
15
votes
2answers
3k views

Change style of labels of Tikz nodes of a given style

How can all labels of a given type of node be restyled in Tikz? Imagine that there are nodes of different styles, and that only the nodes of style X should have red labels. Is this possible without ...
15
votes
1answer
432 views

TikZ, arrow, looking for ++++++> style

I'm wondering if it's possible to draw, by \tikzstyle, this style of arrow : +++++>. Thanks, Simon
15
votes
1answer
1k views

How to create a ball shading and to customize 3D lighting manually?

TikZ shading=ball will create a perfect 3D ball perspective, but it has no option to change the lighting angle, the contract, radius of light, etc (or I am not aware of). I tried to create a 3D ball ...
14
votes
4answers
459 views

How to plot blurred curves with PGFPlots?

I'm trying to replicate the following plot with PGFPlots: In this answer, the author plays with opacity when drawing overlapping ellipses. Is it possible to use similar code with arbitrary curves? ...
14
votes
1answer
2k views

Tikz /.style with two parameters

How do I pass two parameters to a tikz style? I would like to do something like this: \begin{tikzpicture}[ transformer/.style={draw, cylinder, gray!80, rotate=90, minimum height=#1, minimum ...
14
votes
2answers
2k views

How to decrease the size of single node in mindmap?

In tikz's mindmap, I want to change the concept size for individual parents or children (not the entire system). It is simply possible to increase the size of a child node, by introducing minimum size ...
14
votes
1answer
968 views

Drawing shapes around Tikz Tree nodes

I have a Tikz tree in my Latex document as follows: % Set the overall layout of the tree \tikzstyle{level 1}=[level distance=4.5cm, sibling distance=6.5cm] \tikzstyle{level 2}=[level distance=4cm, ...
14
votes
1answer
2k views

tikzpicture in node of another tikzpicture: how to screen of from inheriting style?

I wish to create tikzpicture environments inside a node of another tikzpicture. The problem I encouter is that styles are inherited by the inner tikzpicture. How can I screen of the inner tikzpicture ...
13
votes
3answers
1k views

DIN conform arrowheads and hatching in TikZ?

I'm curious how the following simple figure can be recreated with all its characteristics, i.e the DIN correct arrow tips and the hatched areas. I'm very aware of various packages for tikz, where you ...
13
votes
2answers
693 views

TikZ: shade also the border of a node

I would like to shade a node and the border of the node. The following code works but I don't like it very much that I have to draw something after the node on the background layer. I would prefer a ...
12
votes
2answers
525 views

Triple lines in TikZ

I need to be able to draw tripled paths in TikZ. I guess this could be done by some clever style which draws a big doubled path to get the outer curves correct, then uses some clever post-action ...
12
votes
2answers
400 views

How to detect if option provided via \tikzset

I would like to be able to detect if a particular option has been provided via a \tikzset and issue a message based on that. The MWE yields: But once the conditional works (just a comment for ...
12
votes
1answer
457 views

Nested node class with pictogram decoration

I'm wondering how can I define custom TikZ node class mynode thats allows my to use following syntax: \node [mynode,fill=yellow!40] {component} \child{ \node [mynode,fill=yellow!40] ...
11
votes
1answer
168 views

TikZ: nodes with text, scale = or \large, \Large, \Huge?

If one needs to slightly increase the size of the text in a TikZ node. What are the pros and cons of using scale= in the style options instead of changing the font size with the usual LaTeX\TeX ...
11
votes
2answers
1k views

TikZ: Defining and reusing complex objects?

(How) Is it possible to save some complex TikZ objects for reusing them (in the same and in different pictures)? I know it's possible to define own styles, but I'm not sure if it's the right thing ...
10
votes
3answers
812 views

Choosing styles conditionally in TikZ

I want to create a series of images that visualise a recursion tree as walked on by an algorithm. That means that different styles are applied to nodes depending on the step the algorithm is in, such ...
10
votes
2answers
886 views

How to draw a point at a particular location along the curve in TikZ

I got a nice code to draw an arrow at the mid position of the curve. From Tikz: Arrowheads in the center \tikzset{->-/.style={decoration={ markings, mark=at position .5 with ...
10
votes
3answers
486 views

How to draw multiple lines inside the circle

I wish to draw the picture like below, however, I don't know how to add multiple lines in side the circle. This is my code: \documentclass[tikz]{standalone} \usetikzlibrary{ shapes.geometric, ...
10
votes
2answers
477 views

Jackson structured programming diagram (format a tree diagram)

I'm trying to create a Jackson structured programming diagram. This is basically a simple tree diagram with the exception that boxes can either have a circle (O) or a star (*) in the upper right ...
10
votes
2answers
2k views

Inserting text inside an arrow in Tikz

I want to draw an arrow between two nodes (a) and (b), and write text inside the arrow. How can I modify this command to control the size of the arrow head and insert the text? \draw[->, ...
10
votes
2answers
577 views

Hyperlinked nodes in TikZ mindmap

I am trying to make a small mindmap such that some of the child nodes are hyperlinked. I tried to follow the advice given here, about the new node style hyperlink node, but the following MWE compiles ...
10
votes
2answers
368 views

Tikz style conflicting with clip command

Below is my example. I'd like to use a global style for all my tikz pictures to set up the line width. It is working well until I use a clip. I guess that it is not possible to pass some style option ...
10
votes
1answer
590 views

Draw additional parallel paths in TikZ

How can parallel lines elegantly be added to an existing path? I am looking for a solution or hint to, how a general style can be made, that works with any path. Example path: ...
9
votes
6answers
336 views

How can “execute at begin node” be used with special characters like curly braces? (or: how to raise node content)

I'd like to define the following style: test/.style={ execute at begin node={\raisebox\{-0.2cm\}\{}, execute at end node={\}} } and use it like \documentclass{article} \usepackage{tikz} ...
9
votes
2answers
256 views

Notes on Sentences

I have a sentence like this "पठ् + अ + ति" and I want to add some notes like shown in the attached image. Is there a package for such things or I need to work with Tikz. Any reference material or ...
9
votes
3answers
210 views

Don't do any fills in TikZ

I have a macro that will draw several things in a TikZ picture using some styles I defined, which include fills: \documentclass{article} \usepackage{tikz} \tikzset{% ...
9
votes
2answers
480 views

How can I improve those voltage annotations

In France, we draw an arrow above or below a dipole to represent the potential difference between its two poles. I'm trying to automate this using the ideas of the tikz circuits library (not ...
9
votes
1answer
237 views

Setting weekend background color

I'm making a calendar in LaTeX with tikz-pgf and I would like to set to gray the background color for the weekend. In the examples I found on the Internet and in the documentation, I can see how to ...
8
votes
2answers
2k views

Is it possible to apply a style to all (tikz) rectangles?

I know that it's possible to apply styling to all tikz nodes or paths, as in the following example: \tikzset{ every node/.style={ text=red }, every path/.style={ ...
8
votes
2answers
205 views

Correct use of arguments pattern in pgfkeys/append after command in tikz?

I could not find many examples for the correct use of arguments patterns in pgfkes, but I was able to come up with the following: \documentclass{standalone} \usepackage{tikz} ...
8
votes
1answer
3k views

Different arrow line styes and different row sizes in tikzpicture

I am using tikzpicture environment, together with \matrix command to draw a diagram. I have two questions: Can I use different arrow line styles in the same matrix? For instance, the matrix called ...
8
votes
1answer
822 views

Dependent node size in TikZ

I'm producing some control theory flow sheets in TikZ where I have specified the node box size. Since I'm making a lot of these flow sheets, I have set global styles for them, for instance the box ...
8
votes
1answer
922 views

How to shade mindmap concepts?

I tried to add a shade on my mindmap's concepts with \begin{tikzpicture}[mindmap, text=white, every concept/.append style={circle,shading=ball, ball color=black!20!white!20}] but the problem is ...
8
votes
1answer
90 views

Double style and double colour line in tikz

in my document i have a lot of lines like this: I usually do this with a code like this: \begin{tikzpicture}[node distance = 5cm] \node (a) {}; \node (b) [right of=a] {}; \draw[red] (a) -- (b); ...
8
votes
1answer
114 views

Why doesn't “double” work in the options list of a scope?

An example document: \documentclass[convert={size=320}]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \begin{scope}[line width = 2pt, red] \foreach \x in {1, 2, 3, ...
8
votes
1answer
171 views

How can I add nodes through a TikZ style?

Consider a small example below. I'd like to automate the addition of the label-node along the edge through the use of styles. I've tried the naïve solution of just adding such a necessary node ...
8
votes
0answers
133 views

Is there a better way to display this information? [closed]

I have drawn this picture in tikz. Is there a more visually pleasing and intuitively appealing way of displaying this information? I feel what I have drawn is dull and boring. I have to include more ...
7
votes
5answers
1k views

How to create following block diagram structure in LaTeX

How can i create this kind of connected and cascading block diagram in Latex?
7
votes
3answers
618 views

Creating stacked shapes for tikzstyle with

I'm working on a diagram, and I'm exploring TikZ for doing it. I searched, and looks like there is no easy way of doing diagrams, like pgfplots for plotting. So, I need to create some special node ...
7
votes
3answers
194 views

To make one environment flow into another without empty space

I have this design at the moment. However, when you have many of those, they distract much. I propose to have Answer just on the same line with Question like Question 41 Lorem ipsun. Answer 38 ...
7
votes
3answers
181 views

In tikz is there a way to set a node style to center the center of each node within a given scope

In the following MWE, I know that the commented line works. What I want to know is why the every node/.style approach is not working. \documentclass{article} \usepackage{tikz} \begin{document} ...