Questions tagged [tikz-pic]

A “pic” is a “short picture” that can be inserted anywhere in TikZ picture where you could also insert a node.

Filter by
Sorted by
Tagged with
21
votes
3answers
2k views

How to give a name to \pic

I read instruction how to use \pic in PGF 3.0.0 manual, but description how to give names to \pic are not clear to me and given example generate error: "No shape named EmmaEmma-left is known." ...
23
votes
2answers
3k views

Anchoring TiKZ pics

Is it possible to anchor a TiKZ-pic on an internal anchor? I know (more or less) how to use TiKZ pics and know that they are draw arround their origin. What I would like to be sure is that it's not ...
2
votes
2answers
695 views

Nested pics in TikZ 3.0

TiKz 3.0 introduce pics and I like them, but it seems that they are not as powerfull as I wish. For example I'm not able to use nested pics like this : \tikzset{ one/.pic = {\draw[pic actions] (0,...
7
votes
1answer
711 views

Anchoring complex tikz pic

In my illustration I need a sketch of clock. For it I use pic capability of TikZ. It works fine with quit annoying exception: positioning of clocks in picture. If I put a clock at some absolute ...
1
vote
2answers
150 views

Behavior of coordinates when using TikZ

I am trying to position node(2) in a page in coordinates related to the page (origin at upper left corner of the body of the page). My code is: \documentclass[border=10pt,a4paper]{memoir} \usepackage[...
12
votes
1answer
229 views

In tikz, why does a pic with a tree get distorted upon positioning with e.g. `right=of`

I'm trying to connect with edges tikz pics. I thought of using (sub)graphs like subgraph I_n and specifying the nodes with the V key, but I get an error: Undefined control sequence. \tikz@lib@graph@...
7
votes
1answer
157 views

How to give a name to \pic (part II)

When I was looking for the solutions of How to give a name to \pic, I discovored that it looks like that the problem is only with the code of \tikztostart in the to path and not with the \tikztotarget....
2
votes
2answers
510 views

Multiple object instances represented by two slightly shifted rectangles

In a software diagram, I'd like to be able to represent multiple instances of an object by two rectangles with one of them slightly shifted. I recently learned about the pic style so I'm using it with ...
8
votes
1answer
473 views

Problems combining clip, layer and pic when multiple instances are included in the same tikzpicture

I'm having trouble figuring out how I am supposed to combine (or if I am supposed not to combine) pics, clipping and layering when more than one instance of a pic is included in a single tikzpicture ...
3
votes
1answer
9k views

Tikzpictures side by side [duplicate]

I have used the following code: \begin{figure}[h] \begin{tikzpicture} \draw[->] (-0.5,0) -- (4,0) node[right] {$x$}; \draw[->] (0,-0.5) -- (0,4) node[above] {$y$}; ...
32
votes
3answers
3k views

How to get rid of the almost invisible faint lines in the Olympic rings?

I want to draw Olympic rings and used the code from here, which is, % Olympic rings % Author: Paul Gaborit \documentclass[a4paper]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \...
6
votes
1answer
2k views

Understanding TikZ anchors using pics

With the MWE below, I get the following figure: Could someone explain me why in the right figure, the red circle is not "inside" the square? I guess it has to do with the square being a node, and not ...
5
votes
1answer
592 views

tikz - Curved cloud shape

So here is my code that produces a circle with text inside and three clouds, also with text, around it. I would like the clouds to curve in an arc around the circle, if that is possible. There is this ...
9
votes
1answer
1k views

TikZ Pics with optional/default parameters

I am trying to set up a small TikZ library or package with pics I can reuse. Thus, I create a file called "tikzlibraryBES.code.tex" with the following content: \tikzset{ % House pics/house/....
3
votes
2answers
348 views

Parametric Pics : Pic Actions at Infinity

This question tries to expand upon the another both of which aim at providing a "Best" practices for tikz-pics or atleast a couple of how to examples clarifying some of the more advanced trickery that ...
3
votes
2answers
410 views

How to make properly macro with the use of pic?

I'd like do make a picture that consists of few blocks. One of these blocks I called \elementsymbol (in MWE below) - it consists of an arrow surrounded by a circle. I have the problem with scaling of ...
-1
votes
1answer
102 views

Drawing a mountain look figure in latex

I am not sure where I can start from and is it easy to draw a figure below using latex?
6
votes
1answer
443 views

A nice example with `name prefix ..`

TiKZ pics include a new key called name prefix ... TiKZ documentation defines it with /tikz/name prefix .. This key is available only inside the code of a pic. There, it (locally) ...
3
votes
1answer
175 views

How to use a \pic in a node's text area {}?

How can I achieve that the \pic "lightning" will appear in the node's text area? I cannot use it there, so I have commented it out. I know or think it's a completely different "environment" (a text ...
3
votes
4answers
213 views

Triangle. Changing vertices. Draw the height of the triangle

1) I'm a drawing triangles in latex, but I want the vertices A and B to be horizontal. In the code below vertices A and C are horizontal. I have problem changing the code. 2) I want to add a ...
3
votes
2answers
2k views

Positioning '\pic' in tikz

With the code \documentclass[tikz,convert={size=640}]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{calc} \usetikzlibrary{quotes} \begin{document} \begin{tikzpicture}[ rect/.style={...
2
votes
2answers
392 views

Adding symbols wherever I want in a commutative diagram

So far I have: \documentclass{article} \usepackage{tikz-cd} \usepackage{stmaryrd} \usetikzlibrary{arrows} % \begin{document} \begin{center} \begin{tikzcd}[column sep=large] {\begin{tikzpicture}\draw[...
2
votes
1answer
97 views

Applying transforms to tikz pics defined with named nodes

I have a tikz pic that I wish to rotate and move around. If I define the pic with number coordinates, this works fine. If I define the pic with named coordinates (handy reference points I use for many ...
2
votes
1answer
170 views

Parametric Pics : Sans infinity

Previously I have asked about passing options to pics to manipulate the way in which they are drawn. With this one may create pics with optional components and user controlled dimensions. I haven't ...
1
vote
2answers
1k views

Tikz pic angle around circle

I am trying do draw an angle around an existing circle. For example, I can draw 10 degree angle: % Drawing circle \draw (0,0) circle [radius=1]; % Drawing 10 degree angle sides \foreach ...
1
vote
2answers
244 views

To draw a graph like this, what code do I need?

\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[scale=5] \coordinate[label=above left:$A$] (A) at (95:1);...
1
vote
0answers
85 views

Superimpose content to a movie in beamer [duplicate]

When using the command \movie in beamer, from the package multimedia, it appears that the movie itself appears on top of every other content, so that it seems impossible to display any content over it....
1
vote
2answers
572 views

How can I draw this figure about Hidden Markov Model?

How can I draw this figure about Hidden Markov Model?
1
vote
3answers
70 views

looking for Efficient alternative to my tikzpic code

I have a tikzpicture that has repeated elements. Right now I am defining them individually. But I would like to have a code that defines one template-triangle whose dimensions I control (like I do in ...
0
votes
1answer
154 views

How can I put picture in a table!

I can put a picture in a table (cheer!), but I want to put a picture with a caption in my table and it's caption will disappear. My table includes both a picture and a tikz. how can I do it? This is ...
0
votes
1answer
136 views

Is it possible to make such an image with Tikz? How?

I'm wondering what's the best way to render this image width the dashed line and with angles between normal lines and dashed lines. And also Is there a way to quickly rotate the tikz resulting image ...