{tikz-styles} are predefined sets of options that organizes 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}.
42
votes
2answers
4k 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 ...
27
votes
1answer
612 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 ...
18
votes
3answers
425 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, ...
15
votes
1answer
479 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 ...
13
votes
1answer
496 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, ...
12
votes
3answers
727 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 ...
12
votes
2answers
350 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
901 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 ...
12
votes
1answer
364 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
966 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 ...
11
votes
1answer
3k 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 ...
10
votes
2answers
431 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 ...
10
votes
3answers
266 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
166 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
141 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 ...
10
votes
1answer
331 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 ...
10
votes
2answers
191 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 ...
9
votes
3answers
429 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 ...
9
votes
2answers
1k 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[->, ...
9
votes
2answers
236 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 ...
9
votes
1answer
649 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 ...
9
votes
1answer
123 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
216 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 ...
8
votes
1answer
541 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 ...
8
votes
2answers
239 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 ...
7
votes
6answers
217 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}
...
7
votes
5answers
240 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
2answers
452 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 ...
7
votes
2answers
723 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={
...
7
votes
2answers
197 views
Restoring previous value of PGF/TikZ key?
How does one restore the previous value of a PGF/TikZ key?
For example, I would like to set the inner sep of a matrix to 0em but set the inner sep of nodes within the matrix to be the value that ...
7
votes
1answer
494 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 ...
7
votes
1answer
783 views
Tikz: question about arrow tips color and width of paths
Why 4-6, 4-7, 7-5 get these colorings? More precisely, what is the difference between [draw=green, fill=green] to [color=green]?
Why the 4-5 arc has a slightly bigger width that 7-6? You can see a ...
7
votes
1answer
341 views
Is there something like \providetikzstyle similar to \providecommand?
I have standalone figures that I include in my document. These figures use statements like \providecommand{\HypotenuseLabel}{$h$} which allows the figure to have a default label, and which can be over ...
7
votes
1answer
165 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:
...
6
votes
4answers
114 views
How can I calculate within style values?
Is it possible to calculate (addition etc.) in style values? I wanted to do the following:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,fit,chains}
...
6
votes
3answers
152 views
Page numbering in the middle of a line
How can I set up a document to write the page numbering in the middle of a line?
Through fancy pagestyle I've got a situation like the following one:
--------------------- % this is a line after the ...
6
votes
4answers
497 views
Drawing a Zero Pole plot
I'm trying to draw a zero-pole plot for use with some filter design. Since i couldn't find any standard way to go about this, I tried using the polar library of PGFPlots. I'm having some trouble, ...
6
votes
1answer
343 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 ...
6
votes
1answer
227 views
How to draw the structure with rectangles inside
I wish to draw the flow like in the picture using the code below, however, I found it is very hard to locate the rectangles by using Coordinate. Is there any better way to do this?
Here is the code ...
6
votes
1answer
491 views
How do I make a path with a custom head in tikz?
I want to make a half circle border, as an arrow head in a tikz diagram.
Does anyone have an idea how to make this style?
6
votes
2answers
318 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 ...
6
votes
1answer
188 views
Tikz: Text along top and bottom of arrow path
How can I add text to both the top and bottom of a path? My commutative diagram below is 90% complete. I would, however, like text={${gKer({\varphi}){\mapsto}{\varphi(G)}}$} following the path below ...
6
votes
1answer
807 views
How to control text margin in TikZ shapes
When using different shapes from TikZ library, they have different inner padding for text. Thus, for similar text, we will have nodes (shapes) with different sizes. Then, the child nodes will not be ...
6
votes
1answer
345 views
What is the correct way to pass array elements to TikZ styles?
I'm trying to use styles to generate TikZ figures that have repeated, regularly spaced elements by looping through an array, but am perplexed by the results I'm getting.
For example, if I define the ...
6
votes
1answer
135 views
TikZ: posticipate execution of type /.code key
I'm trying to create some TikZ keys which allows to easily draw distributed loads on a mechanical structure (or truss). The code I wrote at the moment is:
\documentclass[a4paper]{article}
...
5
votes
3answers
489 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 ...
5
votes
2answers
198 views
how to draw the complex work flow using tikz 2.0
I wish to draw a complex work flow using tikz 2.0 because I tried to update the tikz to 2.1, there are many problems. The work work flow is described as follows:
I have tried to draw it by locating ...
5
votes
2answers
2k views
how to decrease the size of a node and a label - tikz package
i trying to draw an automata using tikz package, and i want to decrease the size of node and labels on each edge , im have trying to put the option [scale=0.5] but it doesn't work !
I have :
...
5
votes
2answers
266 views
Keeping the same style inside a scaled plot
I have a graph with three different curves, two of which are very small compared to the other. I therefore decided to add a magnification of such curves inside my graph, in the following way:
...
5
votes
1answer
743 views
How to globally tikzset styles
I would like to set a tikzstyle from within a tabular environment, and use it after the table. Adding the usual \global seems to have no effect. The MWE below produces:
but I want the last line ...
