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
30 votes
4 answers
4k 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 ...
user avatar
  • 127k
22 votes
3 answers
3k 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." ...
user avatar
  • 250k
14 votes
1 answer
300 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@...
user avatar
2 votes
2 answers
795 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,...
user avatar
  • 22.3k
3 votes
2 answers
631 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 ...
user avatar
  • 377
8 votes
1 answer
850 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 ...
user avatar
  • 250k
1 vote
2 answers
247 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[...
user avatar
  • 183
7 votes
1 answer
215 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....
user avatar
  • 22.3k
0 votes
1 answer
58 views

Can't connect pics to a node

Unfortunately I am not able to connect node Client1 to port 13. My unsuccessful attempt is shown below. I know that unlike nodes, pics cannot be referenced later. Can someone help me convert port/.pic ...
user avatar
  • 49
8 votes
1 answer
564 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 ...
user avatar
  • 183k
7 votes
1 answer
12k 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$}; ...
user avatar
0 votes
2 answers
82 views

Tikz standalone the border is not working

I'm currently developing an LFSR drawing library that the latex is output from Python code. One main issue that has been left is the border. \documentclass[convert={density=300,size=1080x800,outext=....
user avatar
  • 333
32 votes
3 answers
4k 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} \...
user avatar
  • 1,095
8 votes
1 answer
4k 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 ...
user avatar
  • 371
5 votes
1 answer
871 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 ...
user avatar
5 votes
4 answers
2k views

Arrow Between Equations

Is there a better way to put arrows between equations? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node at (-4,0)...
user avatar
  • 51
4 votes
2 answers
2k views

Generating adjacency matrices from isomorphic graphs

Here are some isomorphic graphs and their corresponding adjacency matrices. I can draw the graphs with tikz. But I'm not sure the best way to draw the matrices. Is it possible to generate one from ...
user avatar
  • 1,969
11 votes
1 answer
2k 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/....
user avatar
  • 113
3 votes
2 answers
3k 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={...
user avatar
  • 1,738
3 votes
2 answers
468 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 ...
user avatar
  • 936
3 votes
2 answers
447 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 ...
user avatar
  • 918
1 vote
2 answers
248 views

Drawing a block diagram in Latex

I am a new user to Latex. Recently I have decided to use latex for preparing my project instead of using MS word. Can any one please help me to draw this block diagram for my project. Thanks in ...
user avatar
-1 votes
1 answer
197 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?
user avatar
  • 2,423
6 votes
1 answer
515 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) ...
user avatar
  • 127k
4 votes
1 answer
541 views

How can I make scaling affect TikZ-pics within a tikzpicture?

I want to have "global scaling" in a TikZ picture, which also affects all pics defined within a tikzpicture environment. MWE: \documentclass[tikz, border=2mm]{standalone} \begin{document} \begin{...
user avatar
  • 145
3 votes
4 answers
464 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 ...
user avatar
  • 145
3 votes
1 answer
267 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 ...
user avatar
  • 579
3 votes
2 answers
115 views

Transform working tikzpicture into \newcommand with arguments

I am trying to transform the solution of THIS question \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \usepackage{leadsheets} \setchords{ major-seven = \textsuperscript{$\Delta$}...
user avatar
  • 185
3 votes
1 answer
392 views

Tikz standalone the background is transparent make it white

I'm using the below Latex code to draw a tikzpicture \documentclass[convert={density=300,size=1080x800,outext=.png},tikz, border=1cm]{standalone} \usepackage{{xcolor}} \usetikzlibrary{arrows.meta} \...
user avatar
  • 333
2 votes
2 answers
203 views

Printing an element of a non-numeric array as the node label

I want to retrieve a member of a non-numeric array passed to a TikZ pic as an argument, to use it as a node label. \foreach easily does it while iterating over the array, but I cannot do it for the ...
user avatar
2 votes
2 answers
424 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[...
user avatar
2 votes
1 answer
160 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 ...
user avatar
2 votes
1 answer
178 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 ...
user avatar
  • 918
1 vote
1 answer
78 views

Positioning relative to page in XeLaTeX with package background and 'nested' tikzpictures 'dimension too large'

Context For a personal project I would like to have a tikzpicture on every page that borders the text and all that is on there. I started with LuaLaTeX and wanted to add only a few Chinese characters, ...
user avatar
  • 137
1 vote
1 answer
181 views

How to enhance the background of a Tikzpicture or a Tcolorbox

I would like to produce either a tcolorbox or a tikzpicture that closely resembles the following image: The following code produces as reasonable facsimile, but not great: \documentclass[12pt]{book} \...
user avatar
  • 4,875
1 vote
1 answer
164 views

Using tikz to generate some figures

Is it possible to use tikz to make the following figure: \documentclass{article} \usepackage{tikz} \begin{document} % Radius of regular polygons \newdimen\R \R=5cm \begin{tikzpicture} \draw [...
user avatar
  • 501
1 vote
2 answers
90 views

How to mirror and position the analog clock dials

I am trying the create analog clock dial with roman or standard numbers on display and at the same time create another one but the mirror image of it. I managed to do that but for some reason a third ...
user avatar
  • 135
1 vote
1 answer
106 views

Looking to Insert a Figure and Wrap It Within a Customized Tikzpicture

This question inquires as to an extension of Daniel N.'s answer found in How to enhance the background of a Tikzpicture or a Tcolorbox Consider the slightly modified code: \documentclass[border=1cm]{...
user avatar
  • 4,875
1 vote
3 answers
74 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 ...
user avatar
  • 2,659
1 vote
0 answers
110 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....
user avatar
1 vote
2 answers
2k 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 ...
user avatar
  • 199
1 vote
2 answers
252 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);...
user avatar
1 vote
2 answers
856 views

How can I draw this figure about Hidden Markov Model?

How can I draw this figure about Hidden Markov Model?
user avatar
0 votes
1 answer
188 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 ...
user avatar
  • 237
0 votes
2 answers
96 views

How to Draw Inline Symbol List with Rotation using Tikz?

Let's say I have the following string list of symbol: {a,b,+,9,3}. Is there a way to print each element of this list with the possibility - EDIT 1: to control the space between each symbol and - to ...
user avatar
0 votes
1 answer
141 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 ...
user avatar
0 votes
2 answers
342 views

Setting background color in flowchart

I've a flowchart created in the following manner \tikzstyle{steps} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=gray!50] \...
user avatar
  • 457