{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

75
votes
2answers
15k 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 ...
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 ...
7
votes
1answer
555 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 ...
9
votes
1answer
1k 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 ...
16
votes
1answer
2k 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 ...
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 ...
25
votes
2answers
910 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 ...
14
votes
4answers
531 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? ...
10
votes
1answer
667 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: ...
14
votes
2answers
3k 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 ...
19
votes
2answers
661 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} ...
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 ...
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[->, ...
8
votes
1answer
1k 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 ...
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
4answers
467 views

How to plot a graph from its adjacency matrix and coordinates of vertices?

A similar question is here. If we give all the data of the vertices's coordinates and the graph's adjacency matrix, how to plot it with tikz, pstrick or other tool in tex? here are the data of ...
10
votes
3answers
561 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, ...
12
votes
2answers
448 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
2answers
634 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
3answers
888 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 ...
13
votes
2answers
847 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 ...
11
votes
1answer
419 views

How to plot a graph from its adjacency matrix (coordinates manually specified)?

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 ...
9
votes
2answers
280 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 ...
6
votes
2answers
433 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
3answers
374 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
1answer
765 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?
4
votes
1answer
456 views

How to modify just some nodes' styles in chemfig

In the following molecular drawing, I want to only circle the rightmost OH of the first molecule and the leftmost H of the second, to show that they are the ones that are involved in the formation of ...
7
votes
3answers
192 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} ...
3
votes
1answer
355 views

Commutative diagram using TeX Writer

I bought an ipad app TeX writer and I am wondering if I can draw a commutative diagram. It includes the packages amslatex revtex4-1 IEEEtran babel cyrillic graphicx color xcolr geometry algorithm2e ...
27
votes
1answer
11k 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 ...
19
votes
1answer
8k 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 ...
12
votes
2answers
2k 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 ...
18
votes
2answers
4k 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 ...
7
votes
1answer
766 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 ...
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
1answer
553 views

How to make a full equation with tikz?

I am using this solution here to make long dashes within a matrix, and it is working well. The code is: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} % possible to customize here ...
4
votes
1answer
268 views

Draw inside nodes to get BPMN gateway shapes

This question is a follow up to How to draw inside a TikZ node, using node style? I am trying to get the AND and XOR gateway from BPMN as seen here ...
14
votes
2answers
559 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
1answer
480 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] ...
9
votes
6answers
370 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
3answers
656 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 ...
6
votes
1answer
711 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 ...
5
votes
1answer
197 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} ...
4
votes
1answer
314 views

Changing the format to a plot ticks (using pgfplots)

Dera all: I'm using pgfplots to plot the data from the table below (forst vs. fourth column), 3000 1.2970e+00 0.198956 0.258046 3100 8.6050e-01 0.18747 0.161318 3200 ...
10
votes
2answers
411 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 ...
5
votes
1answer
190 views

How can I make Beamer overlays with TikZ node attributes?

As a follow-up question to Tikz animated figure in Beamer, how can I animate a particular attribute of a node? MWE \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{graphs} \tikzset{ node ...
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 ...
4
votes
1answer
277 views

Relationship diagram

So this is what I would like to have Diagram 1 Diagram 2 Diagram 3 with help of Nico i could draw it like that \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows} ...
4
votes
1answer
806 views

Arguments of tikzset inside a beamer document

I am trying to use tikzset with an argument in a beamer document, and I am having an error I do not understand. \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame}{My try} ...
3
votes
1answer
251 views

Beamer with Tikz graphs

Following this question of mine, I now need to make a presentation using Beamer. If you look at the plot below, it has some values on the arrows namely p1, 1-p1, ... I want to put the graph structure ...