# Tag Info

Accepted

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

Version, which uses uninterrupted circles (without faint lines), where the gaps are created by clipping. This solution does not use any white background color. The measurements and colors are taken ...
• 262k
Accepted

### Anchoring TiKZ pics

Apparently, the idea of scoping the relevant code in pics works. Here is an example: \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{fit} \tikzset{pic shift/.store in=\shiftcoord, ...
• 61.7k
Accepted

### How to give a name to \pic

This is a work around rather than a solution. I wonder if this is a bug but my understanding of tikz is just not good enough to know for certain. Apparently, tikz no longer likes something about the ...
• 184k

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

This seems like a perfect problem to use the tikz library knots on! The current solution is improved from the original, which had some minor "clipping issues" (for more info, see here). I consider ...
• 938
Accepted

### TikZ Pics with optional/default parameters

Simply add a .default key at the end of the \tikzset call: \tikzset{ % House pics/house/.style args={#1/#2/#3}{ code={ Code of the pic } }, pics/house/.default=0.65/0.15/35 }
• 4,110

### How to give a name to \pic

I dig a little bit and this is what I found: When TikZ encounters \draw(A)to(B), this is what will happen \def\tikztostart{\tikz@pp@name{A}}; usually this is simply A; \def\tikztotarget{\tikz@pp@...
• 35.5k

### making a diagram like this picture

Please always read manuals first. That helps a lot, especially since you are asking for tikz basis knowledge. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} ...
• 32.2k

### How to give a name to \pic

This is indeed a bug, but for a different reason, I think this is happening at the same place when the parsing is done in \tikz@subpicture@handle@ but still I didn't understand perfectly how it goes ...
• 154k
Accepted

### Anchoring complex tikz pic

Here's a working example. I've reformatted it a fair bit and added some styles to help keep straight what's doing what. \documentclass[12pt,tikz,border=3mm]{standalone} \usetikzlibrary{arrows.meta,% ...
• 49k
Accepted

### Tikzpicture scope background image

You need to place the \includegraphics inside a \node, as in the code below. I added some comments, but it's quite straightforward, mostly just place the node at the correct location, and set the ...
• 198k
Accepted

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

This is a partial answer. It aims to do 2 things: demonstrate how to adjust the vertical and horizontal positioning of the second pic appropriately; clarify the issue concerning the distortion of the ...
• 184k
Accepted

### Crop an image in tikz using 2 points of reference and a height

Package adjustbox Your preamble already contains package adjustbox. It provides the features you need for trimming and clipping I am not sure, which spacing is needed around the image. The following ...
• 262k

• 261k
Accepted

### Node positioning relative to \pic

You can name internal objects and refer to them by using the pic name later. \documentclass[tikz]{standalone} \usetikzlibrary{positioning} \tikzset{ pics/mp3/.style={ code={ \node[...
• 154k

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

A version in Metapost, wrapped up in luamplib. Compile with lualatex. \RequirePackage{luatex85} \documentclass[border=5mm]{standalone} \usepackage{luamplib} \begin{document} \mplibtextextlabel{...
• 36.1k
Accepted

### TikZ: Bug (?) with .pic: misalignement of nodes

I don't know the cause for this problem, it's probably related to the path construction with .pic. But if you explicitly say that the node should be in the path midway it works normally: \...
• 7,527
Accepted

### How should I prevent a .pic definition inside a document environment, but outside a tikzpicture, from adding a space to the typeset output?

This is how .pic is defined in tikz.code.tex line 4636-4640 \pgfkeysdef{/handlers/.pic}{% \edef\pgf@temp{\pgfkeyscurrentpath}% \edef\pgf@temp{\expandafter\tikz@smuggle@pics@in\pgf@temp\pgf@stop}% ...
• 35.5k
Accepted

### How can I draw this figure about Hidden Markov Model?

For exercise (how to draw dashed line and use empty cells): \documentclass[margin=3mm]{standalone} \usepackage{tikz-cd} \usepackage{amsmath} \begin{document} \begin{tikzcd}[nodes in empty cells] ...
• 255k
Accepted

### A nice example with name prefix ..

As an extension of the example used in the PGF documentation about pics, I propose to draw coconuts, and attach them to seagulls (as we are lacking swallows). We will use the seagull pic defined in ...
• 4,110

### drawing a 2D-plane

Something like this? I used random steps decorator for the green path, and "manually" built the black path, using some key points and start/end angles. Also note the use of polar coordinates, which ...
• 54.5k
Accepted

### Various questions on the pic command from the Tikz angles library

It seems to me that you must use coordinate names. My guess is that the internals use \pgfpointanchor or some such, which requires a named node. It's probably good form to name your coordinates anyway!...
• 3,398