TikZ is a higher-level drawing language built on top of the PGF graphics framework. For questions specifically about the PGF layer use {pgf-core} instead. Both tags are possible on the same question. The tag {diagrams} is also compatible with this tag.

learn more… | top users | synonyms (3)

1
vote
2answers
386 views

Why can't I do this diagram?

I use this code in beamer: \[ \begin{tikzpicture}[>=angle 90] \matrix(a)[matrix of math nodes, row sep=2.5em, column sep=2.5em, text height=1.5ex, text depth=0.20ex, ampersand replacement=\&] ...
16
votes
3answers
7k views

Fitting page size to a tikz figure

Sometimes I'm using tikz as a plotting tool, without embedding the figure in a document. In this case, I normally, want to include the resulting PDF in a different TeX file (yes I know I could include ...
24
votes
4answers
4k views

Highlighting specific parts of a TikZ drawing

Friends, sometimes during an automata keynote, I have to present a string recognition step-by-step example. Please consider the following TikZ code: \begin{tikzpicture}[shorten >=1pt,node ...
5
votes
3answers
3k views

How can you position a node relatively to another in TikZ

I would like to place a node 'B' 60 degrees of an arbitrary node 'A' between which there is a distance of 2cm. I can do this if node 'A' is at (0, 0), so 'B' would just be (60 : 2) from 'A', but what ...
16
votes
5answers
2k views

Creating a node fitting the horizontal width of two other nodes

I have the two PGF nodes foo and bar positioned in a row. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[node ...
15
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 ...
1
vote
1answer
760 views

Problem with “shapes arrow” in TikZ+LaTeX [closed]

When I used the following example to print a shape arrow \documentclass{article} \usepackage{tikz} \usepgflibrary{shapes.arrows} \begin{document} \begin{tikzpicture} \node [single arrow,minimum ...
4
votes
1answer
776 views

Problem with vertical space and tikz pictures

I need to include the next tikzpicture into a latex document. The final result gives me extra vertical space before and after the picture. Therefore the caption is far from the picture itself. I do ...
1
vote
1answer
88 views

Equivalent of \providecoordinate?

I am looking for something that is the equivalent of \providecoordinate in TikZ/PGFplots. This would be easy if I knew how to test if a coordinate is already defined. There are similar questions ...
2
votes
1answer
298 views

A few problems using longtable

I am quite new to LaTeX but I love its typographic clearness and I'm using it to create pdf for some geometric drawings, nothing involved with scientific writing. Now I'm working with some Lissajous ...
2
votes
1answer
114 views

Preserve alphabetical order in index when the entry has a TikZ code

Friends, as a follow up to Overlapping TikZ nodes to look as a tape strip, I added a TikZ code to an index entry using the splitidxpackage. Consider this code: \documentclass{article} ...
14
votes
3answers
780 views

Overlapping TikZ nodes to look as a tape strip

Friends, I need to highlight specific letters. My set contains only A, N, C, Q and P, so I decided to make them look as a tape strip (ressembles a good old Turing Machine tape). The following code ...
3
votes
1answer
781 views

How to constrain text to a rectangle in tikzpicture?

I have a list of rectangular blocks that have a text, color, and size (y start, y size, x start, and x size). I want the text to be in the center of the rectangle, such that it does not go outside of ...
2
votes
1answer
1k views

TikZ/PGF bounding box too large

I have a pdf graphic that needs to be inserted into a TikZ environment (where I can annotate it). However, the bounding box that is placed around the image includes unnecessary whitespace. The command ...
6
votes
1answer
438 views

How do you pass unknown keys as options to a TikZ picture?

I try to write a command that accepts options, using pgfkeys. Unknown keys are collected in a style, that I try to use as global options for a tikzpicture environement. A minimal example would be: ...
1
vote
2answers
333 views

Changing thinness and form of a vertical line in a table

I am trying to create a cover page, where in the middle of the page i use tabularx (tabular could have been just as well) to split the width of the page in to two parts. I would like to know how ...
14
votes
2answers
1k views

Tikzpicture with overlay takes up space

Consider this MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[remember picture,overlay] \node [circle, fill=red!90!black, minimum width=15em] at (current ...
16
votes
2answers
2k views

Breaking pictures across multiple pages

I am a relative TeX newbie trying to write a new package to generate timelines that can span multiple pages (the existing timeline solutions are not suitable for me, and I would like to write ...
3
votes
3answers
9k views

TikZ: How to connect nodes and specify line direction?

When drawing a line between two nodes in TikZ, you can specify the anchors on the beginning and end nodes in order to control how the line is drawn. I would like to specify the anchor on the ...
3
votes
2answers
1k views

How can I do this diagram with tikz?

How can I do this diagram with tikz?
12
votes
1answer
822 views

Correct delimiter height in TikZ

When using the left delimiter and right delimiter options, I am having the problem that their height is not equal to the node they are surrounding. Here is an example: \documentclass{article} ...
3
votes
1answer
959 views

Drawing electromagnetic tetrahedron diagram having text within node connections

Any idea how to draw this beautiful electromagnetic tetrahedron (due to F.W. Hehl and Y.N. Obukhov) using LaTeX code?
1
vote
1answer
736 views

Tweaking behaviour of tikz trees for Feynman diagrams

I am working with tikz to draw Feynman diagrams, and I have a few questions about tweaking the behavior of the following code. \documentclass[a4paper,12pt]{article} \usepackage{tikz} ...
2
votes
2answers
121 views

x-Scaling of node without caption

Im using xscale to reduce the width of a node. This not only scales the shape but also the text. How can I x-scale the shape without the text? \node[mynode] (foo) [right=of ocr,fit={(ocr) ...
2
votes
2answers
298 views

What is the TikZ equivalent for the following PSTricks code?

I have learnt TikZ several months ago and I almost forgot because I seldom use it. I have a simple and easy object to draw as follows. % incm.tex \documentclass{minimal} ...
0
votes
1answer
408 views

Symbols for EAI diagrams in TikZ/PGF?

I would like to produce some diagrams (preferably using TikZ/PGF) using the visual notation given in Enterprise Integration Patterns by Hohpe & Woolf. I'm aware of stencils from the above site, ...
3
votes
1answer
156 views

Naming a package built on TikZ

I am working on a package which builds on TikZ. How should I name it — tkz-foo or tikz-foo (foo is a placeholder). In CTAN both styles can be found: tikz- as well as tkz-. There are more tkz-named ...
3
votes
1answer
2k views

multirow in tikz matrix

I am trying to insert a multirow in a tikz matrix with a grid, so: \documentclass{amsart} \usepackage{tikz} \usetikzlibrary{matrix,fit} \begin{document} \begin{tikzpicture} \matrix (table) [% ...
4
votes
1answer
935 views

How to indent a paragraph inside a TikZ node?

How do I get paragraphs inside a node to indent? \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[draw,text width=9cm] { indent in paragraph long text long ...
7
votes
1answer
614 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 ...
3
votes
2answers
1k views

Problem with beamer and tikz

For some reason this code doesn't work and I don't know why: \documentclass[pdf]{beamer} \usepackage{amsmath} \usepackage{enumerate} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{arrows} ...
8
votes
2answers
3k views

Feynman Diagrams with tikz

I am trying to find some example code for some very simple Feynman diagrams. Something similar to any or all of the pictures below I was able to find some example code on texample.net, but being ...
11
votes
1answer
2k views

What “smooth” plot interpolation algorithm does pgfplots use?

In the pgfplots manual it says: \addplot+[smooth] Smooth plots interpolate smoothly between successive points. In order to choose the right sampling of points from a function evaluation for ...
10
votes
1answer
487 views

How to highlight specific entries in a tocloft-formatted ToC

I am writing a document using the book class, and I use tocloft in order to customize the appearance of my ToC. So far, the package did a great job for most customizations, except for one thing: I am ...
8
votes
2answers
3k views

Is is possible to rotate text using nodes near coords?

I'm plotting a ybar, and nodes near coords is ugly. Is it possible to rotate the text above the bars by 90? \begin{tikzpicture} \begin{axis}[area legend, legend pos=north west, legend columns=4, ...
10
votes
2answers
3k views

How to position text on top of a node?

How to position text on top of a node? \documentclass{report} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \tikzset{every node/.style={rounded corners,minimum height=5cm}} ...
2
votes
1answer
1k views

overlapping nodes

How to solve the problem of overlapping nodes? I want the below of n1. \usetikzlibrary{positioning} \tikzset{every node/.style={blue,rounded corners}} \begin{tikzpicture} \node[draw,fill=yellow] (n1) ...
4
votes
1answer
897 views

Framing two-column listings with a tikz node : “missing \item” error ?

I'm trying to use this answer to put my lstlistings environments inside a tikz node. So I want to define a new listings environment, with \lstnewenvironment. My final goal, to be precise, is to ...
6
votes
2answers
831 views

Tikz: How to move a footnote in a node out of that group?

Apologies for the slightly strange title, I struggled to come up with something else. I have defined my own quote environment with brackets around the quote. In order to do that I use tikz and the ...
17
votes
1answer
1k views

How can I draw a chart in the economist style with pgfplots?

I am trying to draw a chart with "The Economist" style. With tikz, I draw this chart clumsily, so I would like to know is that possible to draw this chart elegantly with pgfplots. ...
5
votes
2answers
2k views

How to make a textbox with this TikZ code ?

I made this with TikZ : \usetikzlibrary{calc} \def\banlen{3} \xdefinecolor{mycolor}{RGB}{62,96,111} % Neutral Blue \def\bancolor{mycolor} \begin{tikzpicture} \draw (0.25,0.25) rectangle (5,-2); % ...
6
votes
1answer
1k views

How do I name a plot in tikz and use it for intersections?

I want to create a figure with 3 plots, a vertical reference line, and marks at the intersections of each plot with the reference line. The plots come from an external table. Plotting works, but ...
7
votes
2answers
1k views

TikZ - How to draw an interrupted line?

Please tell me of an (as simple as possible) solution to draw an interrupted line. I don't know how this is technically called; interrupted line, interleaved line, broken line, discontinuous line? ...
4
votes
1answer
2k views

Drawing mechanical systems using TikZ

This is a follow-up question to Drawing Mechanical Systems in LaTeX. I have tried to do similar things, i.e. to model simple mechanical systems. For example: ...
3
votes
1answer
768 views

Good workaround for pgfmath/tikz definition of inverse cosine?

I wanted to draw a graph of y = arccosine(x) and saw in the Tikz documentation the function acos which claims to do this but returns a result in the range [-90,90] (degrees). I was surprised by this ...
36
votes
3answers
6k views

TikZ: Bend text so that it follows a line

I have two arrows going from a node on the left to a node on the right. Both arrows are slightly bent. I want to label the arrows with text that is bent just like the arrows. This is as far as I've ...
11
votes
1answer
1k views

Foreach inside a TikZ matrix

Consider this MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix [matrix of nodes] { a \\ b \\ c \\ }; \end{tikzpicture} ...
2
votes
1answer
406 views

How to resize a line with the text height with TikZ?

I made a new style of quoting. But I have to put the line height and width of the quote manually. Someone have a solution for make a environment with just 2 or 3 parameters? The quote, the author ...
5
votes
1answer
4k views

What are all the options for the “edge” part of the TikZ \path command?

I am drawing edges in a graph using a command like \path (nodeName1) edge [->] (nodeName2) The only way I have learned what options can go into the square brackets after "edge" is by looking at ...
1
vote
1answer
1k views

How do I draw Extendible Hashing/Skip List diagrams using Tikz Library?

I need to draw Extendible hashing(directory and block diagrams;like this) and skip list(and like this diagrams using Tikz library. I tried to find some examples on the internet, but couldn't find ...