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)

3
votes
2answers
1k views

How can I do this diagram with tikz?

How can I do this diagram with tikz?
12
votes
1answer
950 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
1k 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
772 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
181 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
312 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
433 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
157 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
1k 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 ...
8
votes
1answer
744 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
2k 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} ...
11
votes
2answers
4k 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 ...
12
votes
1answer
3k 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
537 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 ...
10
votes
2answers
5k 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
4k 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
2k 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
998 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
1k 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
2k 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
3k 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
2k 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 ...
10
votes
2answers
2k 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
4k 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
900 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 ...
38
votes
3answers
9k 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 ...
13
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
463 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
6k 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 ...
7
votes
1answer
620 views

Wedged/tapering paths in TikZ

Initial question Is there an easy way to vary the thickness of a path along its length to create a wedge (for instance, to create a stereochemical cue)? e.g. cis-cyclohexane-1,2-diol, drawn in ...
8
votes
4answers
2k views

Hexagonal diagrams

I would like to draw a hexagonal diagram made up of many small equilateral triangles, and be able to label specific vertices in the diagram. In particular, something like this: But ideally rotated ...
2
votes
1answer
2k views

Drawing Vertical Arrows in Coordinate System Using Pgfplot

I have a series of data plots, an example of which is depicted below, and I would like to draw a vertical line through a particular x-coordinate on each plot, so that the head of the arrow is is ...
7
votes
1answer
866 views

Defining a TikZ style to scale the content of a node

I am trying to define a scale content=<factor> style to be applied to node objects in TikZ pictures. It's purpose is to scale the content of the node without changing the node's outer ...
2
votes
1answer
290 views

Continuously-sizable brackets?

It often frustrates me that TeX only supplies a small set of bracket sizes to choose from (or rather, the default fonts do.) Has anybody written a package that provides continuously-sizable brackets, ...
2
votes
1answer
135 views

PGF_2.10-CVS I lost the blue links when I compile the doc

My method to build the pgfmanual.pdf is : $ cvs -z3 -d:pserver:anonymous@pgf.cvs.sourceforge.net:/cvsroot/pgf co -P pgf $ cd ~/pgf/doc/generic/pgf/version-for-pdftex/en $ mkdir plots $ ...
4
votes
1answer
2k views

TikZ: Background rectangles with equal width but 'fitting' height

I'm trying to make sort of a flow chart for a series of steps, but these steps are also grouped, and I'd like my diagram to reflect that. So I'm using the pgfonlayer/background environment to draw ...
3
votes
2answers
2k views

TikZ: position a node depending on width of text?

I need to use TikZ to draw two horizontally-spaced nodes, and an arrow between them, labelled by some text. But the arrow has to be exactly the right length to fit the text, and this will be part of a ...
13
votes
2answers
5k views

Insertion of perpendicular symbol at intersection of two perpendicular lines

This provides good details on How to draw a line passing through a point and perpendicular to another?. What I would like to do is to extend this somehow to add the usual geometry symbol to indicate ...
4
votes
1answer
862 views

How to specify a name path for the axis in PGFplots

When I use the {axis} environment, the axis are drawn automatically so I am not able to specify a name for them? I would like to be able to compute intersections with the axis as in Intersections in ...
6
votes
1answer
378 views

Drawing full nodes whose center is not clipped by some path

Goal I would like to draw full nodes whose center is not clipped by some path. How the solution would possibly work? To be better understood I would describe it in two steps: clip before drawing ...
1
vote
1answer
385 views

Typesetting BiBTeX in TikZ

I am wondering if there is a way to print a BiBTeX bibliography in a TikZ node. I am making a huge poster, created as a large TikZ image. I want to include a small bibliography list. Is there a way to ...
6
votes
3answers
2k views

Center text in TikZ according to the text baseline, not the object itself

As a follow up to Adding TikZ code to TOC, I have a TikZ code added to each index entry. That code may contain these specific letters: A, N, C, P and Q. See the following example: ...
4
votes
1answer
426 views

Scalefnt and tkz

I am trying to scale the font in a tikz picture using the scalefnt (compare this question) package. However for tkz obejects it doesn't work, for example: \documentclass{minimal} ...
7
votes
1answer
989 views

About TikZ and decoration (accent in text)

I use the command: \path [shift={(-2.75,0)},decorate, decoration={text along path, text={Plan meridien}}] (165:2.8) arc (165:90:2.8) ; to draw a text on the circular arc path. This work well. ...
3
votes
1answer
615 views

Node diagram with encompassing circles

I'm attempting to draw an image similar to this one: However, I only want to draw three nodes as text ("A", "B", "C") with double headed arrows and the larger overlapping circles.... I've had ...
15
votes
1answer
4k views

Using double for-loop in tikz

In the manual one can find the ... option to obtain a range in the for-loop. For example: \foreach \x in {0,0.1,...,6} {\x, } On the other hand, one can have a for-loop which runs over two ...
12
votes
3answers
766 views

Macro to access a specific member of a list

I want to be able to have a macro access a specific element of a list. The following code works, however requires me to have two separate macros: one that accepts a list, and the other that accepts ...
19
votes
1answer
3k views

what is the [count=\i] in \foreach for?

Can someone explain what does [count=\i] in a foreach mean? Antal S-Z's answer to Fitting a list of points with TikZ and it's \foreach use this. It is also mentioned in Increment loop variable in ...