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)

2
votes
2answers
273 views

Ghostscript questions [related: preview package to print standalone PDFs]

Using the preview package to generate individual PDFs of images within your document has been covered, for example, in this thread. However, I am trying to understand how you can use Ghostscript to ...
10
votes
2answers
283 views

Place TikZ coordinate or \zlabel at every (base)line

I'm currently adjusting the code shown in Test if a paragraph has a page break in it? to support underlining and highlighting using TikZ similar as shown in Cool Text Highlighting in LaTeX, but ...
6
votes
1answer
239 views

How do I create a loop based on a series of points in TikZ as in the Graph style?

I am currently working on a project to create a translator from Frank Drewes' graph style into TikZ. As an example, I am trying to recreate the following diagram from the graph style manual into a ...
1
vote
0answers
413 views

Question regarding add node with text within TkiZ package? [closed]

I followed an example from TikZ manual, and modify mine to add an extra node with text below a given node. This is the example from TiKZ manual, And here is the code, So I modified my code to fit ...
5
votes
3answers
3k views

How to draw two Tikz pictures that are parallel to each other?

I want to draw two automaton figures next to each other; however I can't put them in one \begin{} \end{} tag because the node distance can be changed, further the distance between two pictures is also ...
26
votes
2answers
30k views

How to add caption for a TikZ picture?

I'm drawing a automaton figure, and I want to name it says 'M1' below the figure? A minimal example would be greatly appreciated. Thank you. \begin{tikzpicture}[shorten >=1pt,node distance=2cm,on ...
2
votes
1answer
523 views

I do not know the key '/tikz/insert path'

Trying to compile this example: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[remember picture,overlay] % A path that follows the edges of the current page ...
4
votes
1answer
323 views

More: Generalised: Accessing the logic values of a TikZ coordinate

This is a follow-up question to: Generalised: Accessing the logic values of a TikZ coordinate. In that question a PGFplot answer was suggested by jake. I took that answer and modified it to the ...
5
votes
3answers
2k views

A problem with “Tikz + Gnuplot”, set terminal table

When I use Tikz to plot a function. I followed the instruction to use gnuplot to do so. I did that half year before. But now when I recompile, the gnuplot has problem with the first line of its ...
3
votes
3answers
688 views

How to add a tikz/pgf command to section command

I need to draw a simple symbol with tikz/pgf to a chapter command, for example: \documentclass{book} \usepackage{tikz} \begin{document} \chapter{hello tikz\tikz\node{pgf};} \end{document} but ...
2
votes
1answer
1k views

How to correct for a xshift in the pgfplot legend?

Using the following example code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$x$, ...
7
votes
4answers
553 views

How to create a triangle of dots in TikZ using the foreach command?

How to create a triangle of dots in TikZ using the foreach command? I need this.
4
votes
1answer
2k views

Log color bar/meta data in PGFPLOT

I'm trying to create a 2D plot with a color map using pgfplots. I've managed to get the overall behaviour that I want, but I would like the color map to be logarithmic, rather than linear. The best ...
1
vote
1answer
719 views

Labelling and drawing at rotated/shifted objects

I'm trying to draw an image from a mathematical publication (see the crop at the end of my post). You can find a recent version of the drawing at page 37 of my script (PDF). The complete source is ...
10
votes
1answer
2k views

How to vertical align a text and an tikzpicture?

I am using a TikZ picture followed by a text. How do I create a picture that aligns with the top of the text? \begin{minipage}[t]{0.45\textwidth} \tikz[baseline=(current bounding box.north)] { ...
6
votes
1answer
622 views

Generalised: Accessing the logic values of a TikZ coordinate

In another question concerning Access to logic coordinates on Accessing the logic values of a TikZ coordinate I used these functions, until I came to a scaled tikzpicture and then it was off. I now ...
5
votes
1answer
849 views

Why does tikz neither draw nor externalize my picture?

I'm trying to generate a gif from a tikz picture, using tikz's external library. Ultimately, my plan is to Convert a picture to gif write a node style that converts the nodes' coordinates to pixel ...
4
votes
1answer
1k views

Why is TeX ignoring texmf.cnf?

I got the following error: TeX capacity exceeded, sorry [main memory size=3000000] while compiling a TikZ path containing ~10,000 points. So i decided to increase this memory limit of TeX. I edited ...
1
vote
2answers
385 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
4k 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
759 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
772 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
776 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
2k 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
3k 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
10k 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
297 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
3k 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
929 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
612 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 ...