Questions tagged [tikz-shape]

For questions concerning node shapes in PGF/TikZ.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Unspected behaviour using Shape geometric library inside axis environment

I want to draw this inverted triangle. For this, I used the library shades. \documentclass{standalone} \standaloneconfig{border=5mm 5mm 5mm 5mm} % Left bottom right top \usepackage{units} \...
user avatar
1 vote
1 answer
43 views

Crop ellipse to fit in between other shapes in Tikz

Assuming I have two shapes and I want to add a circular shape (like an ellipse). How can I crop this ellipse so that it fits in between the other shapes like sketched below? I don't want to add white ...
user avatar
  • 749
1 vote
1 answer
98 views

Superellipse filled with a color

I would like to create a superellipse shape. I found the following question "How do I make a superellipse node shape in tikz?" with @Jake's answer that does indeed produce a superellipse. ...
user avatar
  • 92
2 votes
0 answers
40 views

Rotate part of custom multipart shape

I want to create a custom node shape that eventually looks like this: It’s easy to draw a TikZ picture that renders the above, using multiple nodes. However, I want it to be a single node, so that I ...
user avatar
  • 283
4 votes
2 answers
127 views

Fit text in a circular shape

I'm trying to fit a text within the arrows but in a circular shape, however, the text doesn't bend nicely. \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \begin{...
user avatar
  • 973
10 votes
1 answer
161 views

Put text in shape with TikZ

Explanations I try to put a text in shape to follow a figure’s edge to get someting like this: (the red field is just given to explain) Current situation For the moment, this is my MWE \documentclass[...
user avatar
  • 2,080
1 vote
1 answer
51 views

Custom pgf shape: how to always stoke, sometimes fill?

I'm designing a collection of custom PGF shapes which will nearly always need to be stroked but only very occasionally filled. The experience I'd like the user to have is With no other keys provided ...
user avatar
  • 45
1 vote
0 answers
77 views

Tikz's custom shape fails when groupplots library is loaded

I am using a book documentclass to write a report where I draw some circuit/block schematics using a custom tikz shape called dff that I originally found here and then slightly customised. Everything ...
user avatar
  • 171
1 vote
1 answer
43 views

Set PGF anchor position in custom pgfshape with pgfkey as string?

How can I go about using a pgfkey to place an anchor if the key is a string? Previous answers imply that setting anchors based on keys is possible using numerical keys (like this question on Creating ...
user avatar
  • 45
0 votes
0 answers
83 views

How can I draw this using TikZ?

I want to make these boxes. Thank you in advance.
user avatar
  • 35
2 votes
1 answer
111 views

Specify Radius for a cylinder, or draw edge for two 3d circles

I want to plot an optical fiber as in the picture below: As you can see, the drawing is composed of three concentric cylinders of different radii. This question is about drawing just one of those, ...
user avatar
  • 298
1 vote
1 answer
83 views

TikZ node changes size based on text length even after setting minimum width and height

I have a trapezium node in TikZ that I would like to maintain consistent dimensions no matter how many times it is called in the \tikzpicture. \documentclass[10pt]{article} \usepackage{tikz} \...
user avatar
  • 195
3 votes
1 answer
89 views

Tikz: Setting an anchor in a pic for relative positioning

I have created a pic of a simple polygon which I want to use and reuse to create tikzpictures containing copies of it positioned relative to each other. How do I do that? If I did not have the pic, I ...
user avatar
  • 2,654
2 votes
1 answer
94 views

tikz: fit text exactly into the node (trapezium shape)

This LaTeX source: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \begin{document} \begin{tikzpicture} \node[trapezium, draw, trapezium left angle=120, trapezium ...
user avatar
1 vote
1 answer
57 views

Tikz node for representing range on one dimensional axis

Consider a specific example of representing the range of a parameter value on one dimensional axis. Blocks corresponding to specific solutes in a multi-solute solution are stacked on top of one ...
user avatar
0 votes
1 answer
93 views

How to draw shapes around text in TikZ?

Please look at the following figure. The right arrow consists of an &. I want to highlight only that & by drawing a circle or square or other shapes around it. The shape will be filled with ...
user avatar
  • 167
0 votes
2 answers
130 views

Creating an ellipse-rectangle shaped node in tikz

I would like to create a new node shape. The left half of the node is shaped like a rectangle and the right half is shaped like an ellipse. I should be able to insert text in my node and the ...
user avatar
  • 533
1 vote
0 answers
43 views

path picture add custom anchor

I would like to create an antenna shape in TikZ with custom anchors. Since I am struggling with \pgfdeclareshape, I am using path picture instead. Is it possible to make the coordinates created inside ...
user avatar
  • 139
1 vote
3 answers
62 views

How can I place a calculated value in a split shape using a macro and pgfmath?

I have a complicated split shape, with multiple nodeparts. I'd like to enter calculated values in the node parts. When I try to do it using \pgfmathsetmacro I get an error Undefined control sequence. ...
user avatar
0 votes
0 answers
83 views

parallel lines in tikz

I have this code of two lines and I want to plot two parallel lines to those lines and then connet the opposite corners together .. is there a simple way to do it \documentclass{article} \usepackage{...
user avatar
  • 973
0 votes
1 answer
62 views

Align enumerate/itemize in tabular with rect text

How can I get the list to align vertically with the preceding text? In the middle cell, I want 1. to align vertically with "Inputs." In the bottom cell, "Goals" should be in the ...
user avatar
  • 115
4 votes
1 answer
124 views

Why does [rounded rectangle] cause random "divide by zero" PGF Math Error?

I was using tikzmark to insert tikz drawings inside an equation when I encountered a weird bug, which I reduced to the following minimal (non-)working example: The following file bug.tex, \...
user avatar
1 vote
1 answer
67 views

How to edit this code to get these two variants?

I have the following code \documentclass[12pt]{article} \usepackage{geometry} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing,calligraphy} \begin{document} \begin{tikzpicture}[yscale=...
user avatar
  • 811
3 votes
1 answer
232 views

How to draw brackets along the edges of a rectangle?

I have the following code to draw the rectangle with diagonal \documentclass[12pt]{article} \usepackage{geometry} \usepackage{tikz} \begin{document} \begin{tikzpicture}[yscale=0.7] \draw (0,0) ...
user avatar
  • 811
0 votes
3 answers
95 views

How to draw this rectangle with numbers along its edge?

I'm trying to draw this picture, which is created from MS Excel. I'm only able to draw a simple rectangle \documentclass[12pt]{article} \usepackage{geometry} \usepackage{tikz} \begin{document} \...
user avatar
  • 811
0 votes
1 answer
49 views

How to positioning background's text?

I have two questions. How can I enlarge the background and change the position of the text? and, Why is the last trapezoid larger than the other figures? This is my WE: \documentclass[12pt,a4paper]{...
user avatar
0 votes
1 answer
53 views

Rectangle with multiple outgoing/incoming triangles

I would like to create boxes with arbitrary combinations of incoming/outgoing triangles as in the following picture: I thought about using a signal from the TikZ library shapes.symbols, but signal ...
user avatar
3 votes
0 answers
58 views

Good practice in defining multipart shapes for TikZ

I have created a multipart shape for use in TikZ. The shape has three levels, with five text entries. The top level is a rectangle whose dimensions are only based on the text in that rectangle. The ...
user avatar
0 votes
0 answers
249 views

\usetikzlibrary{shapes} : shapes library not available: mac

I am trying to figure out tikz with the help of various video tutorials and help pages. They all tell me to use \usetikzlibrary{shapes}. But texstudio tells me that there is an "unrecognized key in ...
user avatar
  • 1
1 vote
1 answer
43 views

How to eliminate the offset for a continued shape?

I wanted to add a little extra to the last shape in a chain (see image for a better understanding). However, i ran into an unexpected problem, because i thought the (black&red) lines would connect ...
user avatar
  • 551
4 votes
1 answer
356 views

Drawing a cut cylinder with Tikz

I'm trying to use tikz to create the attached image, but I'm not sure this is possible. I know I can use the package to draw cylinders, as shown here and here. But I don't think I can use the \...
user avatar
  • 2,793
2 votes
1 answer
154 views

Tikz: Define custom shape conditionally drawn

I am trying to create a custom shape in Tikz in a way that would allow me to use the node's options to determine how such a shape should be drawn. With the example Rectangle node with diagonal fill ...
user avatar
  • 171
3 votes
1 answer
106 views

How do I create very small shapes?

I'd like to draw multiple very small shapes. But there seems to be a minimum size of approx. 3mm (for circles) if I use minimum width to change the size. Is there a simple way to create smaller ...
user avatar
  • 165
4 votes
1 answer
157 views

Tikz: error when using beamer-class but not when using article-class

I'm using Overleaf to build a beamer presentation and wanted to add rectangles around cells in table (as described in this other question/answer by barbara beeton). Unfortunately, I get error messages ...
user avatar
  • 173
0 votes
3 answers
116 views

Multiple Color PGF Shape

I have a Two shapes I use as a nodes. Currently I have Two styles, which overlap, which limits the number of nodes I can have by half. What I am trying to do is create a pgf shape so that both shapes ...
user avatar
2 votes
0 answers
232 views

Changing the current direction arrow in TikZ' circuits.ee library

I want to change the arrow tip used for indicating the current directions in TikZ' circuits.ee library (first path in the MWE below) to something else, say the Stealth tip (second path in the MWE). In ...
user avatar
  • 12.5k
4 votes
3 answers
389 views

Add builder hat to other people with tikzpeople

I'm using the tikzpeople package to draw some scenarios. Now I would like to give the hat, that the builder is wearing to alice, charlie, and dave. As it is not attribute like the monitor or the ...
user avatar
  • 1,961
5 votes
2 answers
769 views

Custom "computer" resp. "server" shape for tikz [duplicate]

Similar to the custom "human" shape resp. the tikzpeople package I'm now looking for nice computer shapes. I'm drawing some diagram showing the collaboration and communication of humans through some ...
user avatar
  • 1,961
4 votes
1 answer
112 views

Adding introspection to TikZ/pgf shapes

After digging into the output of \tracingmacros=1 during a while, I'll ask here... I am trying to add a bit of introspection to pgf shapes. The idea is to be able to "extract" a \savedmacro of a shape....
user avatar
  • 28.9k
7 votes
1 answer
1k views

How to adjust arrow head size of arrow-node?

I am trying to use single arrow node from shapes.arrows TikZ library. The problem is with the proper adjustment of the arrow tip span - with the argument single arrow head extend. MWE: \documentclass{...
user avatar
  • 936
3 votes
1 answer
168 views

Custom tikz shapes: High level alternative to \pgfdeclareshape

So I've been researching making own shapes in TikZ. As most things in LaTeX, I've come to learn, it seems to have an extremely deep rabbit hole. So I was wondering - is there an easy way out? Is it ...
user avatar
2 votes
1 answer
420 views

Tikz style for rectangle with text in border

I'm trying to create a reusable style (let's call it titlerect) for a tikz node which is supposed to look something like the following figure I quickly whipped up in Inkscape: I imagine it should be ...
user avatar
  • 69
4 votes
2 answers
336 views

How do I draw and define two right triangles next to each other?

My goal is to draw a figure exactly like this The best I could do coding this was: \documentclass{article} \usepackage{amsmath,amsfonts,amssymb} \usepackage{tikz} \usepackage{float} \begin{document}...
user avatar
  • 173
7 votes
1 answer
314 views

TikZ node shape depends on inside text

In one of my previous answers, my first proposal \documentclass[tikz]{standalone} \usetikzlibrary{quotes,angles} \begin{document} \begin{tikzpicture} \draw (0,-4)--(0,4) node[above] {$Im$} (-4,0)--(...
user avatar
2 votes
2 answers
261 views

Ellipses aligned on the same boundary point

I want to create a cascade of ellipses in TikZ. However, with my code, I get the ellipses to have the same center. But what I instead want, is that the ellipses have a common point on their boundary (...
user avatar
  • 293
5 votes
2 answers
539 views

hrule into tikz circle node

I am struggling with inner node layout with Tikz. Basically, I want to add a line under the first text line inside a node, splitting it unevenly. Here is a try: \documentclass{standalone} \...
user avatar
2 votes
1 answer
68 views

How to indicate radius (or size) of circle when it's defined as `\path node[shape=circle]at(x,y){}`?

I need to change the size of the circle but using radius doesn't work here. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path node(ID1)[draw,shape=rectangle]{ID1}...
user avatar
  • 3,616
2 votes
1 answer
124 views

"unrotate" part of a \pgfdeclareshape

I was trying to work on a very nice question about building chips for circuitikz, and I have a problem. I reduced it to this MWE: \documentclass[tikz, border=2mm]{standalone} \pgfdeclareshape{chip}{...
user avatar
  • 28.9k
2 votes
1 answer
792 views

Arrangement of triangles via tikz

Task: I am trying to arrange four triangles via TikZ. Below, you see the output: As you can see, I face two problems with my solution: A) It seems hand-made since the borders do not fit perfectly ...
user avatar
  • 1,381
4 votes
2 answers
604 views

TikZ: Coordinate on shape vertices

I know that I can draw a rectangle with tikz using \draw (0.0,0.0) rectangle (1.0,1.0);. Is there a possibility to determine all 4 edge coordinates directly from the shape? I do can save the lower ...
user avatar
  • 1,714