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

Draw two circles with line connecting them as in attachment

Would you please help me in drawing two circles with a line (middle arrow) connecting them. O-->--O Sorry I could not post the image. Edit* Thank you so much. Can you help me more? Here is my code....
26
votes
2answers
4k views

Tikz: purely vertical arrow from nodeA.south to nodeB.north

I have the following tikz code % compilation command: pdflatex --jobname=Diag-f1 Diag.tex \documentclass{book} \usepackage{tikz} \pgfrealjobname{Diag} \begin{document} \beginpgfgraphicnamed{Diag-f1} \...
6
votes
1answer
856 views

tikzscale and \tikzsetnextfilename do not work together

\tikzsetnextfilename does not work with tikzscale package. In the MWE, included file is A.tikz which should produce A.pdf. MWE works if tikzscale is not used. MWE: \documentclass{report} \usepackage{...
6
votes
1answer
369 views

How to draw visual representation of relations with TikZ

My included graphics are too blurry so I decided to find out, how to draw the following four graphics in TikZ. I never really worked with TikZ, so can someone explain how to draw such graphics?
3
votes
1answer
530 views

Footnote on graph title

I'd like to add a footnote to the graph title. After adding the footnote, it disappears! Here is my MWE: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pagestyle{empty} \...
10
votes
2answers
4k views

pgfplots with percentage on the axis

I am trying to draw a graph with percentage in x-axis and categories on y-axis. I cannot make the graph to show % sign. Here is my MWE: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{...
2
votes
0answers
83 views

Embossed and debossed text [duplicate]

Possible Duplicate: Letterpress effect through PSTricks or Tikz Can one produce embossed and debossed text in LaTeX? (E.g. using Tikz.)
7
votes
0answers
2k views

Getting snakes to work (latex+tikz) [closed]

A Latex+tikz question for you: I can't seem to get snakes to work (scientific linux 6.3). I've been looking at the tikz manual; sure would like to know how to get those snakes! \documentclass[12pt]{...
5
votes
1answer
417 views

array and line how to draw?

I want to know how can I draw the line that appears in the right of the image below, and also how can I write this array that appears in the left of the picture.
5
votes
1answer
802 views

Tikz: Styling a node to display text on the right of a dot

I am trying to create a LaTeX document using the Tikz library, more particularly an E/R Diagram. I have downloaded the tikz-er2 additional library, but I am having an issue with the display of ...
6
votes
1answer
504 views

Division by 0 when combining tikzpicture and resizebox

To draw a larger tree, I tried to use \documentclass[11pt]{article} \usepackage{tikz-qtree, tikz-qtree-compat} \tikzset{every tree node/.style={align=center, anchor=north}} \usetikzlibrary{...
7
votes
1answer
1k views

Help with installing gnuplot in MacTex and using it with LaTeX

I have to draw a lot of PDF and CDF graphs in my document/presentation and in order to do that I installed gnuplot. In order to install gnuplot I took the following steps: 1- Download the sources ...
6
votes
3answers
1k views

Use circuitikz voltage source icon as a node

I'm using circuitikz to draw a single line diagram: But I have no idea how to get rid of the line on top of the voltage source. Is there a simple way to do it? Here's my current code: \...
5
votes
2answers
1k views

Define a (real valued) variable in TikZ/LaTeX

I want to generate a TikZ image from a foreach loop, where some coordinates change within this loop. How can I do something as simple as float x = 0.5; x += 0.1; in TikZ/LaTeX? I searched on tex....
5
votes
2answers
571 views

Big diagram in LaTeX with the help of PGF/TikZ

I managed to make this big diagram in Inkscape adding the codes in LaTeX using the plugin textext. See this question for more. I wish I knew how to draw the big diagram about dual linear spaces ...
15
votes
2answers
529 views

Layer between a node and its text

My question is similar to Transparent node with opaque text? . The difference is that i want the red circle to be above the green rectangle and below the word "Node". And also I do not want to draw ...
3
votes
0answers
499 views

TikZ arrows do not draw with pdflatex [closed]

I am using the answer from Arrow between parts of equation in LaTeX. \documentclass{article} \usepackage{tikz} \newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};} \begin{...
7
votes
2answers
549 views

Add label to right-angled connector -

I'm try to add a label to a right-angled connector in a TikZ figure. Below is the code I'm using: \begin{tikzpicture}[every node/.style={minimum height={1.5cm},thick,align=center},node distance=2.5cm,...
11
votes
2answers
472 views

Wrong place for hyperref link in scaled tikz picture

I have a TikZ picture with a node containing a minipage with an itemize environment; each item is a hyperref to other sections of the document. When scaling the image (for example with \begin{...
9
votes
1answer
708 views

TikZ shadings and printing incompatibility

I would like to use some effects provided by the shadings library of tikz. More specifically, I am trying to use the ball and radial shadings (tikz 2.10 manual, p. 412-). The resulting pdf looks ok ...
2
votes
0answers
1k views

“Fatal error” when using TikZ externalize [closed]

So I'm having problems with TikzExternalize. I have a paper with a large amount of dynamically built graphs. I get to a certain point in my files and I can't build anymore. Once I get to this point I ...
3
votes
2answers
2k views

Tikz, Tree without overlaps

I'm trying to get a nice tree without the overlaps, can anyone help me to improve my code? \documentclass{standalone} \usepackage{amssymb} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage[...
7
votes
1answer
247 views

Recover scaling factor in TikZ

Does it exist some tikz register (let say \zoomfactor) that provides the curent scale factor. For example can I do something like : \begin{tikzpicture}[scale=2] \begin{scope}[scale=1.5] \...
5
votes
1answer
1k views

How to fix a certain distance between a TikZ matrix border and its nodes?

I want to draw a TikZ matrix with its border and I would like to define the distance between most external matrix nodes and matrix border. Something like a matrix inner sep. If I change inner sep in ...
12
votes
1answer
1k views

How could I draw the projection of a three-dimensional domain of integration onto the xy-plane by TIKZ/PGF

I want to draw the following picture by using TIKZ: But I do not know how to hatch the projection, that is the two-dimensional domain: ${(x,y,z} \mid z=0, x^2+y^2\leq 4}.$ And I do not know how to ...
14
votes
1answer
607 views

Different image in every page's footer

I found Using fancyhdr to create an image based header and footer which is helpful and gave some ideas but I want to basically put in the bottom right or center of the footer a different image file (...
2
votes
1answer
2k views

circuit schematic symbol for buffer with control input

circuitikz has an op amp component type with two inputs, output, and up and down ports, usually used for power supply rails. There's also a buffer component type (which I think is provided by tikz ...
11
votes
2answers
432 views

Clipping using the folding library of tikz

I have the following minimal example: \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{folding} \begin{document} \begin{tikzpicture} \tikzfoldingdodecahedron[folding line length=2cm,face ...
3
votes
0answers
1k views

Bode plot : any good alternative to bodegraph [closed]

I'm wondering if there is any alternative to "bodegraph" for plotting bode graph with latex. Especially I would ideally be looking for something easy to run (avoid external computation like with ...
0
votes
0answers
56 views

Array of linked list [duplicate]

Possible Duplicate: array of linked lists I want to implement an array of linked lists in latex: the array elements are the numbers{1,2,3} and every number in the array is ahead of linked ...
8
votes
1answer
223 views

Aligning relatively positioned nodes in TikZ

\documentclass{standalone} \usepackage{standalone} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz} \usetikzlibrary{shapes, positioning} \begin{document} \begin{tikzpicture} \...
9
votes
2answers
544 views

TikZ Scaling: Cannot scale a tikzpicture

Please take a look at the picture below. scale pgfkey works for the inner tikzpicture but not for the outer one. MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \...
2
votes
1answer
526 views

TikZ `positioning`: Extra white space between arrow and node

Using positioning TikZ library, I am getting spurious white space between the arrow and the tikz node as shown in the figure below. It works fine with simple rectangles. MWE: \documentclass{...
25
votes
1answer
4k views

Is it possible to use tikz to draw a background on the printed page?

Imagine I want to draw a filled shape behind something already typeset in the page. The usual approach is to define a \tikzmark command which simply remembers a coordinate using remember picture and ...
34
votes
2answers
9k views

Package for typesetting Feynman diagrams (efficiency of `feynmp` and `tikz`)

This question led to a new package: TikZ-Feynman Is there any good package for typesetting lots of Feynman diagrams? My question arise because Feynmp: Circle with three vertices lead me take a ...
9
votes
1answer
3k views

tikz draw circle segment

How can I use tikz to draw a circle segment if I have the center of the circle and two points on it? Please see the following example Update: I try to accomplish something like this. This can be ...
14
votes
1answer
732 views

TikZ - Placing several numbers in one cell of a Sudoku grid

I've put at the end of this post one code coming from this page which is a pretty easy way to display Sudoku grid. I would like to have help so as to add the possibility to indicate several entries ...
6
votes
2answers
1k views

Separating edges starting from same node

I have following code - \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,automata,calc,shapes, positioning} \begin{document} \begin{tikzpicture}[->,>=stealth',shorten >=1pt,...
5
votes
1answer
2k views

generate simple cylindrical shape with text in latex (tikz)

I am attempting to generate the following diagram in latex: I've been using the tikz package, which although its capabilities seem to be endless, it does have a rather steep learning curve. I am ...
15
votes
2answers
756 views

TikZ External: Figure gets cropped

Arrow heads from the following MWE are cropped when externalized. What am I doing wrong? MWE: \documentclass{report} \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize \begin{document} \...
5
votes
1answer
681 views

Tikz randomly placed groups of objects

I would like to place several groups of three objects (two circle paths and one node) in a triangular area. I came up with the following code, which is based on a subdivision of the triangle in ...
1
vote
1answer
183 views

\onehalfspacing destroys tikz in listing

It's a never-ending story I have to tell. I want to make some code annotations. Finally, I got my macro, but now... The tikz drawings in listings break in certain circumstances (near page break): ...
8
votes
2answers
653 views

Giving a `matrix` node an `alias`

This TeX.sx question asks if is it possible to use a TikZ matrix along a chain. The error that occurs when one tries to do so is Package pgf Error: No shape named chain-3 is known., and a way to ...
11
votes
3answers
1k views

Anchors/coordinates inside a node's text

The plot Using tikz, I have a main node containing several (three) lines of text, and three "legend" nodes that point to them. If I use a rectangle node, then I can't access the positions of the ...
7
votes
2answers
251 views

Want nodes to have linked heights based on which input is larger

So I'm trying to make a worksheet template for students to create pdfs for student markup. The inputs create what is going to go in the question box as well as the hints box. I want to create the ...
4
votes
1answer
96 views

Macro shifts to the right

Every time I'm using this macro it shifts to the right. Why? \newcommand*{\addLine}[1]{ \begin{tikzpicture}[overlay, remember picture] \coordinate (x) at (#1,0); \draw [open ...
10
votes
1answer
4k views

Edge nodes, auto and node distance

Consider the following MWE \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0)--(1,1) node[auto,midway] {$A$} -- (2,0) node[auto,midway] {$B$}; \end{...
4
votes
2answers
683 views

Title picture misplaced in Beamer when using 'show notes on second screen' and absolute 'pgf' positioning

When I try to do something like the following, everything works fine and dandy; The title graphic (here represented by the LaTeX logo with the reddish background) is shown just fine. \documentclass{...
58
votes
2answers
3k views

Torn paper: matching up the torn edges

I recently asked a question on creating a torn paper effect. JLdiaz provided an absolutely beautiful answer, which I have used (with a very minor modification) to indicate the way in which a document ...
6
votes
2answers
872 views

Where in the world is tikzlibraryhobby.code.tex?

I was trying to reproduce Claudio Fiandrino's answer to How can we draw a Hannukah Menorah with decorations, using TikZ?. However, I do not have the hobby package by Andrew Stacey in my local ...