# Tag Info

### How to draw parts of a line dotted with TikZ?

A solution using decorations which also works with curved paths: \documentclass[border=10mm]{standalone} \usepackage{tikz} \usetikzlibrary{decorations} \pgfdeclaremetadecoration{middle part dotted}{...
• 23.7k

### Drawing a loop with two different line types using TikZ-Feynman

A dirty (?) trick to use \pgfpathcurvebetweentime which I recently used in a different context but I don't want to mess with the to paths that handle the whole out and in stuff. \...
• 90.1k
Accepted

### Drawing a loop with two different line types using TikZ-Feynman

You can superimpose another dash pattern over the scalar option (which is equivalent to dashed. You need to adjust the pattern, however, in order to have exactly the left half of the loop drawn: \...
• 23.7k

### labeling edges in tikz

After eight years ... For labeling of edges I would use quotes library. Using it code for including labels is shorter as at use of nodes and by this less prone on errors. In drawing of pictures seems ...
• 261k
1 vote

### Ti*k*Z, automata: Change decoration of initial state?

Set every initial by arrow style and fix scale and line width options. \documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{automata, arrows.meta, positioning} \begin{document} \begin{...
• 11
1 vote
Accepted

### How to remove space between a vertex and an edge in TIKZ?

\documentclass[tikz, border=1cm]{standalone} \tikzset{ place/.style={circle, minimum size=1mm, inner sep=0pt, outer sep=0pt, fill }} \begin{document} \begin{tikzpicture} \node[place, label=above:$v_1$]...
• 25.5k
1 vote
Accepted

### Thicker margin line

If you want an option to affect a path (such as the line width), it should be placed after a \path, \draw, \fill or \filldraw macro directly. On the other hand, if the option is meant to affect (the ...
• 23.7k

### Crossing discontinuity with complex background

Yet an other solution. -you can make everything that is white transparent by using tikzfadingfrompicture like this: \documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{fadings, backgrounds, ...
• 25.5k

### path picture add custom anchor

We could name a coordinate that it is named antenna1.phase center but since the . is used by TikZ to detect a node-with-anchor specification we would need to use the explicit version, i.e. (node cs: ...
• 90.1k

### Crossing discontinuity with complex background

You could wrap the circuit before the colored background picture in a transparency group and add the option blend mode=multiply. This, however, will only look nice if the drawing in the front is ...
• 23.7k

### Crossing discontinuity with complex background

I find it a bit on the convoluted side, but... you can find the point by using paths instead of draws, do an inverse clip in a scope (adapted from here), re-draw the lines, exit the scope, and add the ...
• 31.2k

### Working with lengths in node shape definition

Your definition of \declarecombindedflow uses #2 as \pgf@x=#2 This means, #2 needs to be a length. So when you use your macro, you need to use: \declarecombindedflow{combindedtest}{2pt}{}{% i.e. 2pt...
• 90.1k

### How to prevent tikz custom node fill from covering the text when using node-families library

Is this due to update in tikz/pgf causing the library to fail? Yes it was. The inner workings of the node operation changed a lot between 2013 and 2019/2022. I have fixed this. However, I've also ...
• 90.1k

### Intersection of two extended lines in TikZ without having to draw them

TikZ has an by now undocumented intersection coordinate system that can implicitly used as (intersection of <c11>--<c12> and <c21>--<c22>) which finds the intersections of a ...
• 90.1k

### How to automatize to draw a broken line with intersections with two straight lines

Besides a mathematical solution by Symbol 1 in the comments you can of course let PGF/TikZ do the math. If you don't need the zig-zag lines to be on one path you can just use one loop that finds the ...
• 90.1k
1 vote

### Good way to make \textcircled numbers?

https://www.ctan.org/pkg/circledtext is another option for you, it's great! \documentclass{article} \usepackage{circledtext} \usepackage{pgffor} \begin{document} \begin{center} \foreach \x in {1,2,.....
• 1,001

### Good way to make \textcircled numbers?

\documentclass{standalone} \usepackage{pifont} %%% grab https://ctan.org/tex-archive/fonts/magic \DeclareFontFamily{U}{magic}{} \DeclareFontShape{U}{magic}{m}{n}{<-> magic}{} %\usepackage{...
• 1,535

### Dimension too large for a simple 3D picture

You can use 3dtools \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{3dtools}%https://github.com/marmotghost/tikz-3dtools \begin{document} \begin{tikzpicture}[3d/install view={phi=140,...
• 8,997
Accepted

### Dimension too large for a simple 3D picture

This is a strange thing. I suspect the following: Both your paths contain two segments: the one along the x axis and the one along the y axis. That means that each path contains segments that are ...
• 90.1k
Accepted

### Coloraddo cards defined as \pic

For free drawing, intentionally I don't use neither the library shapes.geometric, nor the library matrix. Here every card is just a pic. We can scale whole figure with [scale=.5,transform shape]. The ...
• 14.9k
1 vote
Accepted

### Having multiple horizontal sections in tikz

if I understood you correctly, you like to reproduce showed image that it can fir in one frame To do this, you need (significantly) reduce images size, which now you have in separate frames and ...
• 261k
Accepted

### Deleting a node from a subgraph while mantaining the position of the other nodes

A coordinate With this small fix to subgraph I_n from a recent answer of mine you could define \tikzgraphsset{ hide me/.style={ shape=coordinate, target edge style=move to, source edge ...
• 90.1k

### How do get Tikz arrows.meta working with Ubuntu and TexLive

You just need to install/update the texlive-pgf package. After that, you can always see the PGF/TikZ library source. For example, for RPM-based distros type rpm -ql texlive-pgf | grep arrows.meta /usr/...
• 11

### Add distance line into two points in latex-tikz

With a few changes in the hperkristiansen answer: \draw[|-|] ($(A)!.5cm!-90:(C)$) --node[fill=white, sloped]{d} ($(C)!.5cm!90:(A)$); \draw[|-|] ($(D)!.5cm!90:(C)$) --node[fill=white, sloped]{\itshape ...
• 3,203
Accepted

### Arrow from inner tcolorbox

Welcome to TeX.SX! I am unsure whether this complexity with placing tcolorboxes inside TikZ nodes is really needed, but I will keep your set up since I don't know what you want to achieve with this. ...
• 23.7k

### Add distance line into two points in latex-tikz

It is quite easy with pstricks: \documentclass[pstricks]{standalone} \usepackage{pst-eucl} \begin{document} \begin{pspicture}(-1,-1)(9,4) \psset{linejoin=1,PointSymbol=none, ...
• 264k
1 vote

### How to draw in latex an equilateral triangle on the x and yaxis with bottom left corner at (−1, −2) and side length 3

For a fan of the classics: \documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture} \begin{pgfinterruptboundingbox} \draw[blue, opacity=0.5, ...
• 71.3k
1 vote
Accepted

### Saving plots with a legend tikzplotlib gives an Error in latex

You try to add strings that contain an underscore (_) to the legend, and underscores lead TeX to think that the following is meant to be a subscript which has to be in math mode, which leads to an ...
• 23.7k

### Add distance line into two points in latex-tikz

\documentclass[tikz, border=1cm]{standalone} \usepackage{tikz-dimline} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (0,3); \coordinate (C) at (8,0); \coordinate (D)...
• 25.5k
Accepted

### How to draw in latex an equilateral triangle on the x and yaxis with bottom left corner at (−1, −2) and side length 3

Using polar coordinates (\ang:\dist) where \ang is the angle with respect to horizontal and \dist is the distance. \documentclass[tikz, border=1cm]{standalone} \begin{document} \begin{tikzpicture} \...
• 25.5k

### Cannot seem to force the caption to be on top of the table environement

As said in comments and answers, the {NiceTabular} should be put in the {table}. I post this answer to show how to simplify the Tikz code (a Tikz instruction with rectangle is enough). \documentclass{...
• 27.9k

### How to draw in latex an equilateral triangle on the x and yaxis with bottom left corner at (−1, −2) and side length 3

Welcome to TeX.SX! The height of an equilateral triangle is 0.5 * sqrt(3) * x where x is the side length. Or you can use trigonometrics using x * sin(60) (in degrees). Having this and since the bottom ...
• 23.7k
1 vote

### How to draw in latex an equilateral triangle on the x and yaxis with bottom left corner at (−1, −2) and side length 3

You can use TikZ with a rotation of B around A and you can use tkz-euclide \documentclass[margin=1cm]{standalone} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture}[scale=1] \tkzDefPoints{-...
1 vote

### The x axis is not shown correct xticklabels

I do not know why, but giving the positions of the x ticks helps \documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{siunitx} \begin{document} \...
• 25.5k
1 vote

### Using >=Stealth with double line seems to fail when the bending module is loaded

Using Qrrbrbirlbel's tip about using quick to disable the flex computation that is broken for double line, I'm now using the following workaround to have bent arrows everywhere except when I need a ...
• 1,228
Accepted

### Shape cards using tikz

The geometric shapes can be drawn with nodes contained in shapes.geometric tikzlibrary. The border con be draw with a fit node. And the complete card could be a unique tikzpicture. But here it's ...
• 130k

### \pause in tikzpicture breaks footline

No guarantees that this won't break something else, but you could try this patch: \documentclass{beamer} \usepackage{tikz} \usetheme{Madrid} \AtEndEnvironment{tikzpicture}{\onslide<1->} \begin{...

### How to plot x^(1/3)?

The arc of the curve of a polynomial of order 3 is a cubic Bézier spline. For example, the curve of x^(1/3) on [-8,8] is the cubic Bézier spline corresponding to the points (-8,-2), (8,-2/3), (-8,2/3) ...
• 27.9k
1 vote
Accepted

If you use decimals, you cannot use \ifnum anymore, because it does not accept decimals. There should actually be no need for precision=1. An easy solution would be to use \ifdim instead. You only ...
• 23.7k
Accepted

### "Dimension too large" error in "How to create a multiline timeline"

I suggest subtracting 2000 from every year and using the x key (initially x = 1cm) to scale the whole picture instead of using a \yearscale macro. I've also changed a few \xdefs to \let since they ...
• 90.1k
1 vote

### Undefined control sequence with chordbox (using xelatex)

\pdfmatch seems to be a pdfTeX primitive and hasn't been implemented in Xe(La)TeX for the last 13 years, it seems. Here's an etoolbox powered fix. The \pdfmatch simply tests whether the values x, 1:T, ...
• 90.1k
Accepted

### Trying to use multiple vertices with math mode names

The list of names you specify for the key V is used for the names of the nodes. These kind of names don't allow “special” macros like \mathbf. (Node names are used as macro names internally by PGF and ...
• 90.1k

### positioning transparent images as background in the title slide

You can add the images to the background canvas template and arrange them e.g. with tikz: \documentclass{beamer} \usepackage{tikz} \begin{document} { \setbeamertemplate{background canvas}{ \...

### Two x axes and two y axes

I am not sure whether this is what you're after, but you can use the option axis line shift to shift the axis lines away from the plot \documentclass[border=10mm]{standalone} \usepackage{pgfplots} \...
• 23.7k
1 vote

### How to calculate coordinates in TikZ without separating axes?

You need to protect the ) from the trigonometric functions otherwise the coordinate parser will do nasty things. Meaning it will think cos(\x is a coordinate specification and since it doesn't fit any ...
• 90.1k

(1) the \charge command allows you to place any symbol in any position around an atom. But it is possible to move the symbol to the side by inserting spaces, too. (2) Here I put the angle at 90 ...
• 1,883
1 vote

### perform calculations on values from csv

Welcome to TeX.SX! You can use the options x expr and y expr to perform calculations on the data that is read from a table (from a file or inline). If your data has no column names, you can use \...
• 23.7k

\documentclass[border=3mm]{standalone} \usepackage{chemfig} \begin{document} \setcharge{extra sep=6pt, macro charge=\scriptsize} \chemfig{ H- \charge{90=\hspace{12pt}$\delta^+$}...
• 3,939
1 vote

### Alignment of DIP chips in CircuiTikZ

To put out a warning, I modified your code pretty heavily. However, I think it's more versatile now. I changed the following aspects: The amount of rows is now a parameter The size of the middle gap ...
• 11