Skip to main content

Questions tagged [shapes]

This tag is about shapes, geometric or otherwise, that can be drawn directly with LaTeX commands or with a related package.

Filter by
Sorted by
Tagged with
7 votes
2 answers
206 views

How to create a curved cylinder in TikZ with a custom base shape?

I’m trying to create a curved cylinder in TikZ with a specific base shape. Here is the base shape I want to use: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} %...
mori's user avatar
  • 81
0 votes
2 answers
50 views

Parallel Lines arrow indicators not following line direction?

I'm trying to draw a parallelogram in tikz and show that it is made up of two sets of parallel lines. Here is a section of part of my code: \begin{tikzpicture} \coordinate (A) at (0,0); ...
Duncan Chrystal's user avatar
1 vote
1 answer
54 views

Shape around empty box in every page

I want to leave an empty box of fixed dimensions in the upper right corner of every page. Something of the kind that you obtain with the following code: \documentclass[oneside,12pt]{book} \usepackage{...
brad's user avatar
  • 527
0 votes
3 answers
66 views

Adding angles to triangle and labelling them inside?

I'm trying to draw an equilateral triangle in tikz and want to include the angles inside and label them within the angle showing they are 60 degrees each but am now sure how to do this... here is my ...
Duncan Chrystal's user avatar
6 votes
4 answers
143 views

TikZ how to temporarily discontinue line at intersection of two lines

I am working in TikZ and I am trying to make one line stop, then start again before and after the intersection with another line. I have attempted to put a node at the intersection point and filled it ...
vali.b's user avatar
  • 63
0 votes
0 answers
81 views

Font shape `T1/lato-TLF/b/sc' undefined, Some font shapes were not available, defaults substituted

When I am compiling an overleaf document with \documentclass[num-refs]{wiley-article}, and the packages \WarningFilter{latex}{Text page 8 contains only floats} \usepackage{anyfontsize} \usepackage{...
Thushara G.A's user avatar
1 vote
1 answer
55 views

How do I translate my ellipsoid, while also scaling it properly?

I have this code for drawing an ellipsoid, but I want to be able to translate it so the center is in (3, 3, 3). Right now I'm not sure how, since it seems to be working fine, but as soon as I change ...
danielw2005's user avatar
2 votes
2 answers
142 views

How can I draw the shapes with gradient colors as shown in the below figure?

\documentclass[11pt, oneside, a4paper, titlepage]{article} \usepackage[dvipsnames, svgnames, xllsnames]{xcolor} \usepackage[most]{tcolorbox} \usepackage[left=0.1cm, right=0.1cm, top=0.1cm, bottom=0....
Vishakha's user avatar
  • 119
0 votes
2 answers
107 views

How to draw the shape shown in the below image?

\documentclass[12pt]{article} \usepackage{tikz} \usepackage{tikzpagenodes} \usetikzlibrary{arrows, shapes, positioning} \begin{document} \pagestyle{empty} \begin{tikzpicture}[remember picture, overlay]...
Vishakha's user avatar
  • 119
2 votes
2 answers
136 views

Arrows on Trapezium

I have cobbled together two lots of code from the website to obtain a trapezium with arrows on it. I have made the lines coincident for the arrows and trapezium, but it looks a bit messy. I have not ...
Jon's user avatar
  • 559
2 votes
1 answer
214 views

How to create a polygon with a specific length and to put a picture inside?

I would like to create a polygon with these sizes: Please note: The sizes are only estimations and there can be errors for 1-2 mm. The most important size are the 2.5cm. The idea is to create a ...
lukascbossert's user avatar
3 votes
1 answer
563 views

How to draw this diagram (function as a machine) using Tikz?

I want to reproduce the diagram below but I couldn't find the "code" for that given shape. The sample diagrams that I've looked at just shows a closed rectangle with the arrows pointing to ...
Janet's user avatar
  • 43
0 votes
0 answers
79 views

LaTeX Font Warning: Font shape ... long time issue ... never resolved

The warning I've had in my LuaTex code for too long (and far toooo many failed searches), that I'd like to eliminate, involves the following: LaTeX Font Warning: Font shape `T1/phv/sb/n' undefined (...
RosesBouquet's user avatar
7 votes
3 answers
1k views

Where did the pentagon with the minimum size of 0.2cm go?

I would like to draw five nested pentagons. \documentclass[tikz]{standalone} \usetikzlibrary {shapes.geometric} \begin{document} \begin{tikzpicture} \foreach \size in {0.2, 0.4, 0.6, 0.8, 1} { \...
licheng's user avatar
  • 795
1 vote
1 answer
35 views

given two nodes, how to define a custom edge style that draws a circular arc instead of a segment joining the two?

Given two points A and B (left), I need to draw a beam that looks like this: i.e. end points of the arc are defined by the nodes, with some specific angle that I can specify. e.g using draw custom ...
user184238's user avatar
1 vote
1 answer
45 views

Making overlap in TikZ figure

In this drawing there are two ellipses: a blue one, above the hexagon, and an orange one, below the hexagon. How can I make the hexagon shape hide the orange ellipse part underneath? \documentclass[...
user3204810's user avatar
  • 1,539
0 votes
0 answers
59 views

Pointed ellipse shape

I'm trying to draw a pointed ellipse shape between two tikzmarknode nodes. Regardless of the ratio of semi-major to semi-minor axis I choose, I can't make the ends very pointy. My different attempts ...
TheorVHP's user avatar
1 vote
1 answer
103 views

How to put ellipses around nodes in tikz-cd diagrams several times in one document

Using the idea of https://tex.stackexchange.com/a/394924/305075 I use execute at end picture to draw the ellipses in tikz-cd diagrams. The names of the nodes for the ellipse to fit are of the form ...
joergkunze63's user avatar
1 vote
0 answers
39 views

“every" will change the shape in TikZ in LaTeX?

I am read the TikZ pdf file, in which there sometime use every to define a style, but sometimes not. After comparing every or no every, I found there is a change of shapes. For example: \documentclass{...
Y. zeng's user avatar
  • 2,115
2 votes
1 answer
158 views

Drawing a hexagon structure similar to a Grötzsch graph with TikZ

I am trying to draw a hexagon that is connected to a set of vertices and edges within the borders of the hexagon itself. It is similar to a Grötzsch graph but is a hexagon rather than a pentagon. So ...
user avatar
0 votes
0 answers
75 views

How to draw regions around nodes and edges in Tikz picture

I want to reproduce this kind of graph by using tikz : I already made a Tikz picture with just the colored nodes and edges but I haven’t found a way to draw the shape that fits nicely around the ...
maitrehihois's user avatar
1 vote
1 answer
142 views

I would like a perfect pentagon with 108° angles

I tried relative coordinates, but couldn't put a coordinate in to make angles. Is this possible? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{quotes,angles,calc,...
Jon's user avatar
  • 559
1 vote
1 answer
119 views

Improve readability of Pie chart

I have a pie chart that displays percentage numbers in a crowded manner, and I want to improve its readability. Is there a way to do that? especially the way the 6.29% and 1.56% appears The code is ...
Diana's user avatar
  • 1,289
0 votes
1 answer
43 views

Removing borders only from the shared area of intersected shapes

I need to intersect two circles and have the borders around them except the borders inside the shared area. It is the tikz code I am trying to write, I have removed all borders but have no idea how to ...
Puya's user avatar
  • 65
3 votes
2 answers
211 views

Dynamometer - Creating custom shapes with anchor and options

I wanted to make a shape called "dynamometer" like rectangle, circle or so on with some anchors and options. But I can't figure out how to achieve such goal. I've taken the dynamometer shape ...
Piroooh's user avatar
  • 1,207
2 votes
4 answers
222 views

semicircle centered at chord center

I need a semicircle node centred at chord center. The positioning is achieved with the option anchor, but the external lines are still directed to center. Is it possible to direct lines to chord ...
Pygmalion's user avatar
  • 6,329
2 votes
1 answer
338 views

Drawing 3-D shapes

I would like to be easily draw 3-D shapes. I'm finding it difficult. I've got isometric paper, but it's difficult to see where to put the lines. here's my MWE. But is the an easier way to draw shapes ...
Jon's user avatar
  • 559
0 votes
1 answer
77 views

Paragraph in the Shape of an Isosceles Trapezoid with Shapepar Package

This post is related to Efficiently Displaying a Paragraph in Trapezoidal Formation in which the shapepar package was suggested in one of the comments. Consider the code \documentclass[10pt]{book} \...
DDS's user avatar
  • 9,768
0 votes
0 answers
86 views

Efficiently Displaying a Paragraph in Trapezoidal Formation

As part of an introduction to the contents of a book, I would like to display a particular paragraph in the formation of a trapezoid; and I suspect I will be able to do this (but rather laboriously) ...
DDS's user avatar
  • 9,768
4 votes
1 answer
342 views

cube shape in Latex Math

I am looking to define a variable with the subscript indicating it is defined in plane or space, as shown in the attached image. \square works for plane. is there a way to get the cube?
Kumar Arumugam's user avatar
1 vote
2 answers
225 views

How to draw polygon from table/file using pgfplots

I can't figure out how to draw a polygon or just a triangle using only 3 rows of coordinates. I have several problems: I can't make stitch corner look sharp (with thinner line it's just less ...
Andrew15_5's user avatar
0 votes
0 answers
109 views

Changing colors of edges and vertices

How do I change the color of each edge of the shape within \node[isosceles triangle]? What I have currently is just a regular isosceles triangle, \begin{tikzpicture} \node[isosceles triangle, ...
Lex_i's user avatar
  • 225
0 votes
1 answer
93 views

Drawing a filled shape in front of a line with even odd rule? [closed]

What I am trying to do is to draw a filled shape in "front" off a vertical line, to give the effect that the line is "behind" the shape. I think it involves the even odd rule but I ...
planetnimz's user avatar
3 votes
2 answers
352 views

Generating a specific graphic with TikZ

I am wondering how to generate a specific image with TikZ. This image is essentially a lattice grid without the grid, with a triangle, rectangle, and other shapes overlayed in a particular way. I ...
Tricryo's user avatar
  • 31
4 votes
2 answers
453 views

How to Crop an Image Precisely in the Shape of a Norman Window

A Norman Window looks like a semicircle atop a rectangle; for example, If would like to be able to take an existing rectangular image and crop it so that what is cut out resembles the perimeter of a ...
DDS's user avatar
  • 9,768
6 votes
1 answer
374 views

Making an Image into a Lettrine

In the MWE \documentclass{book} \usepackage{lettrine} \usepackage{graphicx,lipsum} \setlength{\textwidth}{12cm} %\renewcommand{\LettrineTextFont}{\normalfont} \begin{document} \thispagestyle{empty} \...
DDS's user avatar
  • 9,768
2 votes
2 answers
64 views

Why does using two styles in the same node in tikzpicture lead to an error?

The context I know how to display a cross inside a rectangle (see minimal working example and image below) \documentclass[border = 2]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.misc, fit} ...
Rodrigo Morales's user avatar
1 vote
1 answer
70 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 ...
TiMauzi's user avatar
  • 851
1 vote
1 answer
65 views

How to draw a closed path outward or inward, centering the line

When I have multiple shapes that are close to each other the picture is too busy to be considered "readable". I would like to shift the media point of the line outward or inward as I need, ...
pafao's user avatar
  • 61
8 votes
8 answers
2k views

How to draw a five-pointed star with labels?

I would like to draw a five-pointed star with different labels at each point of the star. I reached the example below, which closely follows this question, but I could not replace the numbers with ...
Andre's user avatar
  • 1,023
1 vote
1 answer
183 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. ...
Xorios's user avatar
  • 317
0 votes
1 answer
102 views

How to properly annotate lengths for a polygon(trapezium). How to calculate the perpendicular height?

I would like to know how to annotate a trapezoid. I think I have the widths okay but I'm having trouble calculating the height. I have adapted the code from answer to this post Once I have the ...
E.Yu's user avatar
  • 337
6 votes
1 answer
146 views

Triangular Node has Unexpected Inner Space

I was expecting a much tighter triangle around the text in this example, similar to the inner spacing around the text in the rectangle nodes. How would I tighten up the inner spacing? \documentclass[...
Doug Ransom's user avatar
3 votes
2 answers
120 views

I can't take my shape one step further. how can I draw more

I can't keep repeating the shape in the corners. I can't issue a command like corner of the corner. I want it to continue in a loop like fractal but I couldn't make the loop. With the command I wrote, ...
SmmTex's user avatar
  • 33
4 votes
2 answers
207 views

How to use "sloped" when the x and y scales are different?

In the example below, I want to align the text to the right of the tangent, as the scales are different, the tilt is wrong. I tried to use "transform shape" by the text becomes unreadable (...
rpapa's user avatar
  • 12.4k
1 vote
1 answer
213 views

How to shade overlaps of multiple circles?

I am trying to create in tikz an image like this illustration of the winset of the Q in two-dimensional space (drawn in Inkscape). The code below draws the circles as nodes, since that seems to be ...
William's user avatar
  • 11
20 votes
8 answers
2k views

Drawing rotated triangles inside triangles

How do I draw rotated triangles inside a triangle as shown above? I already know how to draw one triangle; But I'm not able to draw this specific figure. I found a similar example from https://...
user avatar
0 votes
1 answer
40 views

non rectangular body geometry with xintools failed when verse used

I use the solution suggested in “Non-rectangular body geometry” by the (deleted) user @user4686 but the render failed when it reached a verse environment in the body: The MWE As I need the non-...
fauve's user avatar
  • 2,531
1 vote
1 answer
179 views

How to add colour shape to header on external pdf file with Latex?

I am working on a scanned PDF document to add a rectangular shape on the header to hide header text on all pages of the entire document. To incorporate the external PDF's I use the pdfpages package. ...
MKS's user avatar
  • 412
0 votes
1 answer
128 views

Attaching a small rhombus with a circular bullet at its bottom

I wanna attach (means by adding a second arrow) a small rhombus with a circular bullet at its bottom to the following drawing: \documentclass{article} \usepackage{amsmath} \usepackage{tikz-cd} ...
Happy's user avatar
  • 363