Questions tagged [tikz-pgf]

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.

Filter by
Sorted by
Tagged with
30 votes
3 answers
8k views

Placing nodes along an ellipse in TikZ

Is anybody aware of a simple way to place nodes at arbitrary positions along an ellipse? Ideally I would want to mimic notation like \draw (0,0) ellipse [ x radius=2, y radius = 1] node[pos=.3] {...
user avatar
  • 526
4 votes
2 answers
827 views

Source specials for PDF?

Normally I write my LaTeX with Emacs/AUCTeX viewing in xdvi, which has the very nice "source specials" feature that I can hit a key command in Emacs to jump to the current location in the output dvi ...
user avatar
  • 1,485
7 votes
2 answers
3k views

Subdividing and Filling a Tikz Rectangle

I have two nodes (drawn as rectangles) in my picture, one filled in green, the other red. I wish to produce a third 'rectangle' which shows the effect of splicing these two rectangles and stitching ...
user avatar
11 votes
3 answers
4k views

How to horizontally draw a line passing through a point A until it reaches the border of a node B using TikZ?

Given point A and a node B with an ellipse shape, how to draw a line from A horizontally until it reaches the border of B?
user avatar
  • 5,287
20 votes
3 answers
13k views

Why yshift doesn't work in this TikZ example?

Any idea why yshift doesn't work in the following TikZ example? \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (2.5,0)...
user avatar
  • 5,287
61 votes
5 answers
28k views

Script to automate externalizing TikZ graphics

Is there a script to automate externalizing TikZ graphics? (As suggested by Scott here)
user avatar
  • 16.6k
31 votes
4 answers
10k views

How can/should I include annotated images?

It's often the case that I'd like to include some graphic in a LaTeX document and overlay it with some text or other annotation, maybe including arrows or other simple graphics. The annotations can be ...
user avatar
  • 11.5k
38 votes
4 answers
12k views

Multirow/multicolumn cells in TikZ matrices?

Is it possible to make TikZ matrix cells span multiple rows/columns, like they can in LaTeX tables using \multirow or \multicolumn? Specifically, I'd like to typeset something like the following in a ...
user avatar
  • 1,231
26 votes
3 answers
5k views

Rounded corners in TikZ trees.

When I use TikZ tree with nodes with rounded corners, the connecting lines do not touch the nodes (near corners) but end where would rectangle end. Is there an easy way around it? \documentclass{...
user avatar
  • 8,113
8 votes
3 answers
5k views

How to create custom Tikz nodes?

I don't want to change style only. I want to create node that takes 3 numbers and display them with appropriate decorations. For instance: \mynode{5,6,7} Should display node with "a=5", "b=6" and "...
user avatar
  • 8,113
53 votes
2 answers
26k views

Aligned equations inside of TikZ node.

How can I create a tree node with an aligned math equations inside? \begin{align} \end{align} doesn't work \begin{minipage}{100} \begin{align} ... \end{align} \end{minipage} Gives a lot of ...
user avatar
  • 8,113
17 votes
5 answers
7k views

Drawing arrow heads without the tails in TikZ?

I have an ellipse in a TikZ diagram and I would like to indicate a direction using an arrow head, but do not wish to draw the path leading up to the arrow head. I currently have \draw[->] (0,2) ...
user avatar
  • 9,754
14 votes
5 answers
13k views

Better way to calculate coordinates in Tikz?

I am great fan of pgf and tikz in general to produce great looking figures. But I don't like the amount of time I have to put in to draw a complicated picture, because I have to provide all the ...
user avatar
  • 303
15 votes
2 answers
6k views

How does TiKZ calculate positioning of picture on page?

I'm trying to use \beginpgfgraphicnamed to externalise some complex figures in a large document, using the latest released version of TiKZ (2.00). This produces standalone PDF images but for me the ...
user avatar
25 votes
4 answers
4k views

Problem with defining shortcuts for TikZ matrices

For answering a question yesterday I wanted to define a shortcut for creating a matrix inside a tikzpicture. As a minimal example, consider \newcommand\mymatrix[1]{ \begin{tikzpicture} \...
user avatar
  • 85.1k
25 votes
5 answers
12k views

In TikZ, is it possible to nest nodes?

My use case: I am drawing chemical schemes. Each molecule contains several nodes. However, I also want to put each molecule into a "wrapper" node, so that I can use the usual anchors in combining ...
user avatar
  • 1,547
2 votes
2 answers
529 views

Meaningful error messages when using LaTeX instead of PDFLaTeX

When I have TikZ images or I include .png graphics, I need to use PDFLaTeX instead of plain vanilla LaTeX. (That is, I need to use PDFLaTeX all the time, rather than just when I want to produce the ...
user avatar
  • 70.2k
90 votes
5 answers
31k views

How can I create a pdf document exactly as big as my tikz picture?

I often create pictures in tikz that I want to either send to someone, or include in an email. The problem with that is that there is a big white space around and and especially below my pictures. To ...
user avatar
  • 25.6k
20 votes
4 answers
11k views

What is a good way to draw Dynkin diagrams in LaTeX?

I'm about to start writing something up which includes a fair number of Dynkin diagrams, and I can think of several ways of going about it: Just draw the darn things in, e.g., InkScape, and include ...
user avatar
  • 1,380
65 votes
11 answers
24k views

How to draw a torus

Is there an easy way to draw a contour image of torus below with tikz? Or for that matter with any other graphics package.
user avatar
  • 85.1k
8 votes
1 answer
2k views

Automagically externalising PSTricks and TikZ pictures [duplicate]

My thesis currently has a few PSTricks and TikZ pictures. It takes a while to compile over here Scott says he has some scripts to automate externalising TikZ pictures. I'm looking ideally for ...
user avatar
  • 12k
8 votes
3 answers
2k views

How do I create pasting diagrams in TikZ?

I've been toying with the idea of switching over from Xy-pic to TikZ for all of my diagramming needs, but one feature that's very important to me is the ability to create 2-categorical pasting ...
user avatar
102 votes
11 answers
42k views

How to speed up LaTeX compilation with several TikZ pictures?

The slowest part is a dozen of diagrams in TikZ.
user avatar
  • 8,113
6 votes
3 answers
2k views

How do I set the minimum width of a subfigure?

I have: \subfigure[blah blah blah.] { \begin{tikzpicture}[/MyStyle] ... some stuff... \end{tikzpicture} } But "some stuff" is not that wide and the text in the subfigure produces a lot of ...
user avatar
  • 16.6k
135 votes
5 answers
82k views

How can I use \linebreak inside a node, in tikz? [duplicate]

This is my code, which doesn't work: \documentclass{article} \usepackage{tikz} \begin{document} \tikz \node {start\linebreak{}stop}; \end{document} The \linebreak command doesn't work. In order to ...
user avatar
  • 10.1k
10 votes
3 answers
2k views

Why \linebreak doesn't work when text width is not set? [duplicate]

This is the code I have: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \tikz \node[rectangle split, rectangle split parts=2] {first\nodepart{second}second\...
user avatar
  • 10.1k
13 votes
1 answer
5k views

Aligning matrix nodes in tikz

Another question about aligning nodes using matrices in tikz. Consider the following: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (...
user avatar
  • 535
49 votes
3 answers
93k views

What is the correct way to caption a `tikzpicture`?

I have some trees drawn with tikz and I'd like to have some text associated with them. I can use \caption within figure, but not tikzpicture. UPDATE: Thanks for your advice. figure seems to put my ...
user avatar
  • 591
128 votes
3 answers
143k views

What is the correct way to center a \tikzpicture? [duplicate]

Possible Duplicate: Should I use center or centering for figures and tables? What is the correct way to cause a \tikzpicture to be centered? By default it appears to be aligned with the left ...
user avatar

1
623 624 625 626
627