{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

7
votes
2answers
181 views

comma in node name [TikZ]

In my database some objects have name in A,B format, i.e there is comma in between. I wanted to do something like this \node (A,B) {Comma}; \node (x) {normal}; \draw (A,B) -- (x); However, this is ...
7
votes
1answer
1k 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
2answers
287 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
168 views

exam class : question with circles of same size

Using code mentioned below : i'm able to circle question numbers : \documentclass{exam} \usepackage{tikz} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ ...
7
votes
2answers
66 views

Pgfplots - ugly marks when using dotted or dashed line [duplicate]

Recently I spotted that applying the option dashed or dotted to a plot results in having ugly / distorted marks or marks with dots (when applying dotted) around them. Here is a MWE: ...
7
votes
2answers
121 views

how can I create keys such as “column … to …” for a TikZ matrix

I have a node style I would like to apply to many (but not all) the cells/columns/rows of a matrix of nodes. Currently, for every column or cell that I want the style to apply to, I declare the style ...
7
votes
1answer
2k 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 ...
7
votes
1answer
526 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
161 views

Create a coordinate node at each point of a path

How can I create a TikZ/pgf-style that will put a coordinate, which should be named automatically, at each point of a path? So the following code \draw[put coordinates](0,0)--(3,2)--(4,7)--(-2,1); ...
7
votes
1answer
2k 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 ...
7
votes
1answer
161 views

tikz complex mindmap of all disciplines and subdisciplines of knowledge

just started using LaTex yesterday and I am stuck on my very ambitious diagram of all disciplines of knowledge. Problems (some simple, some probably more complicated): change the page size to even ...
7
votes
1answer
143 views

Snake line with an arrowhead in the middle

in my code i need to draw some Feynmann diagrams with several lines like this one: To draw this image, i usually use this code: \tikzset{White/.style={ draw=white, postaction={decorate}, ...
7
votes
1answer
105 views

Is it possible to derive a new style from an existing style?

Is there a convention in TikZ for defining a new style as an extension of an existing style? As it stands, I can do: a/.style = { black, very thin } Then I could extend this style locally ...
6
votes
4answers
181 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
2answers
149 views

TiKZ and color filling with word spacing on multiple lines

I am attempting to make a figure in TikZ which I want to look like this: I have been able to come up with something close in TikZ, but I would really like to have the above figure instead of my ...
6
votes
3answers
327 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
2answers
4k 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 : ...
6
votes
2answers
412 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: ...
6
votes
4answers
671 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
2answers
304 views

Tikz Nodes Positions and Shapes with a General Number of Nodes

My purpose is rather simple: use tikzpictures to draw tables of numbers, where the numbers are drawn inside colored boxes with fancy shapes, with different shapes and colors for different numbers. ...
6
votes
2answers
602 views

Nested styles in TikZ

I have: \pgfkeys{/TransformerNetwork/.style={ transformer/.style 2 args={draw, cylinder, gray!80, rotate=90, minimum height=#1, minimum width=#2}, }} And then: ...
6
votes
1answer
131 views

Can't find the documentation for \tikzstyle or `+=` operator in tikz

I've noticed in a number of examples that the following is occasionally used when working with tikz: \tikzstyle{every picture}+=[remember picture] When I search the documentation I can't find ...
6
votes
1answer
633 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
975 views

Custom sibling angle for child nodes

As I explored the TikZ manual and available examples; the position of child nodes are defined within the parent node. This means that all child nodes spread on the same radius from the parent with ...
6
votes
1answer
719 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
1answer
91 views

Scale dash pattern with line width

I would like to have dash patterns which scale proportionally to the active line width like shown in the following example: \documentclass[tikz]{standalone} \newdimen\gpdashlength \begin{document} ...
6
votes
1answer
486 views

TikZ Self Loops Style Question

I have a question on how to "style" the self loops in my diagram. Here is my preamble: \documentclass[letterpaper]{tufte-handout} % Additional LaTeX Packages \usepackage{amsmath} ...
6
votes
1answer
170 views

Change filling of TikZ nodes in repeated picture

A diagram drawn with TikZ is used a couple of times and I defined a command for it. In the first picture I want to mark a subset of the nodes by filling them with light gray, and another subset of ...
6
votes
2answers
254 views

How to share selected options between different nodes in TikZ?

(I didn't find a better title for the question. Suggestions are welcomed.) I have created some new shapes in TikZ and I would like to put one of them below another one when a certain key is passed to ...
6
votes
1answer
648 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
74 views

Cross-reference of custom environments created with environ and TikZ package

Problem: I want to create an environment named Example, and the environment has a counter (number within chapter). I want to refer to the counter for illustration just as the table, figure and ...
6
votes
1answer
199 views

Determining tikz drawing style, depending on the values of two nested loop iterators

So the question is a tikz one! Assume that you are drawing things inside two nested foreach loops in tikz, and the iterator variables are \x and \y. What I'd like to obtain is to be able to specify a ...
6
votes
1answer
174 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} ...
6
votes
1answer
2k views

Overlay LaTeX/TeX coding easily on PDF with 300 pages

I've been looking for a way to overlay TeX/LaTeX i.e maths language etc (everything LaTeX is designed for) onto a background document containing 310 pages combined together in a PDF file. So far I ...
6
votes
1answer
267 views

How to plot a graph from its adjacency matrix?

For example, I want to plot a graph whose adjacency matrix is [0,1,0;1,0,1;0,1,0]. I first plot three points labeled by p1,p2,p3, and link the points p1,p2, p2,p3. For a general case, how to link the ...
5
votes
3answers
268 views

How can I complete this graph?

I am trying to draw a histogram graph using simple tikz codes. Here is my code \documentclass{article} \usepackage{tikz} \usepackage{pgfplots, pgfplotstable} ...
5
votes
2answers
297 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
1answer
2k 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 ...
5
votes
1answer
138 views

tikz: Better raised text effect

If you look carefully at the raised text in this image, you can see that it has two drop shadows: as well as the black one to the southeast of the text, there is a white one to the northwest. I know ...
5
votes
2answers
98 views

How to decorate a node with additional paths?

I want to add styles to my nodes that draw additional paths inside of the node. For example (without proper placement of nodes) \node[draw,circle,lVert] {}; \node[draw,circle,lHor] {}; ...
5
votes
2answers
401 views

Off page connector using Tikz

I'm creating a flowchart using TikZ. You can see my code so far below. But now I want to create an off page connector: I don't have a clue how to implement this in my \tikzset. Furthermore I ...
5
votes
2answers
481 views

How do you draw this prism in tikz/pstricks

The numbers are in Persian (side SB=6 and angle SBA=60 degrees).
5
votes
1answer
1k views

Extract x, y coordinate of an arbitrary point on curve in TikZ

We have very nice Extract x, y coordinate of an arbitrary point in TikZ \documentclass{article} %\url{http://tex.stackexchange.com/q/33703/86} \usepackage{tikz} \usetikzlibrary{decorations.markings} ...
5
votes
2answers
106 views

Fault tree : problem with anchoring gates

I am trying to modify the Fault tree e.g. from Tikz where the nodes are the objects like gates instead of text boxes, and would even elimiate text boxes from few paths if possible. This is my code so ...
5
votes
1answer
418 views

When to use TikZ styles?

I planned to illustrate how a quadtree data structure I'm using is implemented, showing all internal pointers and arrays. The image will look something like this: (Here, if a pointer points at the ...
5
votes
1answer
147 views

Still some of the flows missing in the flowchart

I have posted this question few days back but still I can't complete the algortihm. This is the uncompleted work done so far \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} ...
5
votes
1answer
195 views

How to change the color scheme to make this figure more elegant?

Here different colors means different weight of the edge, and the color of the points is arbitrary. The tex code: \documentclass[aps,prl,superscriptaddress]{revtex4} \usepackage{subfigure} ...
5
votes
2answers
316 views

Split circle in tikz unevenly

How can split circle (tikz shape circle) in two parts. However, I would like the split to be uneven i.e. the top part occupy lets say 30% of the area and lower part the rest 70%. Thanks
5
votes
1answer
108 views

What's going on with this syntax “somename/.style={…}”

I'm finding the following preference loading syntax popping up a lot in the newer packages: From tikz \tikzset{help lines/.style=very thin} From tcolorbox \tcbset{noparskip/.style={before....}} ...
5
votes
1answer
70 views

setting tikz styles

How do I set labeling styles associated with each style type? For example: (source below) I have an "input" style (medium circle) and a "junction" style (small dot) which I would like to have the ...