{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
12k 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 ...
3
votes
1answer
337 views

Using counter values as part of style name for plots

I figured I should be able to give a bunch of line styles and access them using counters. Sure enough, this works out fine; this document \documentclass{article} \usepackage{tikz,pgfplots} ...
4
votes
1answer
417 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 ...
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 ...
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={ ...
7
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 ...
6
votes
1answer
713 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?
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 ...
4
votes
1answer
182 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 ...
4
votes
1answer
2k views

why does latex report errors when using styles in a tikz pgf picture?

I get three errors when attempting to build the following example (with the tikzpicture taken from the tikz pgf manual). Why does this happen, and what am I doing wrong? \documentclass[12pt]{article} ...
7
votes
3answers
614 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 ...
12
votes
2answers
516 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 ...
2
votes
2answers
572 views

Tikz-timing: using an arrow for a vertical line like G (glitch) symbol?

I just asked this question: Does the program counter always have to change (upon an instruction tick)? - Stack Overflow, where I used the following code: % min-timing.tex % pdflatex min-timing.tex ...
5
votes
1answer
1k views

Define a color in a tikz style

How do I do a definecolor in a /.style? \pgfkeys{/IMMstyle/.style={ inputnode/.style={shape=ellipse,draw,inner sep=2pt,minimum size=5.0mm}, \definecolor{dpred}{rgb}{0.50,0.35,0} ...
3
votes
1answer
452 views

Arrow scaling problem. How can I zoom properly a very tiny part of a drawing?

Thanks to this solution, I can draw tangent line to a path. I'd like to zoom a very little part of my drawing. Here it is the code: \documentclass{standalone} \usepackage{tikz} ...
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 ...
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 ...
7
votes
1answer
520 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 ...
6
votes
2answers
597 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: ...
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 ...
4
votes
1answer
3k views

Styling the text placed on \path [line] using \tikzstyle.

I'm new to LaTeX and I'm trying to work out how I can configure TikZ to position the text ON the connecting lines (rather than beside it) in this flowchart and then give that text a filled white ...
5
votes
1answer
898 views

Styling tikz-timing signal lines

I'm using the tikz-timing package and would like to apply either snakes type of styling, or say the double for double lines to signal lines. Consider the example below: \documentclass{article} ...