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
0 votes
1 answer
23 views

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

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 ...
user avatar
3 votes
2 answers
234 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 ...
user avatar
  • 31
4 votes
2 answers
404 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 ...
user avatar
  • 5,285
7 votes
1 answer
295 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} \...
user avatar
2 votes
2 answers
52 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} ...
user avatar
  • 205
1 vote
1 answer
48 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
31 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, ...
user avatar
  • 61
8 votes
8 answers
1k 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 ...
user avatar
  • 707
1 vote
1 answer
99 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
0 votes
1 answer
57 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 ...
user avatar
  • 195
6 votes
1 answer
133 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[...
user avatar
3 votes
2 answers
112 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, ...
user avatar
  • 33
4 votes
2 answers
174 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 (...
user avatar
  • 11.4k
1 vote
1 answer
60 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 ...
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
25 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-...
user avatar
  • 2,080
1 vote
1 answer
55 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. ...
user avatar
  • 388
0 votes
1 answer
72 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} ...
user avatar
  • 353
0 votes
4 answers
152 views

Please give the latex code for this diagram, with the shaded region as shown

I have could draw the diagram except the shaded region and the marks showing that OP and OP' are equal. Please help me out!!
user avatar
1 vote
1 answer
100 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
1 vote
0 answers
55 views

To get an arrow white inside and black border [duplicate]

I need your support to draw an arrow like this in Tikz. White inside, black border. I’d like to insert it between two nodes and change the length, width and head extend. Accordingly with the distance. ...
user avatar
-1 votes
4 answers
844 views

How can I draw a right triangle in LaTeX?

Let's say I would like to make the following figure. However, I would like to see if I can make this figure in LaTex so that it looks much cleaner and nicer like this. What are the commands used to ...
user avatar
  • 150
2 votes
1 answer
95 views

Vertical space of shaded box

I use package framed to color background of part of the text. I put attention that shaded environment uses extra space before and after colored box. In search how to reduce this space, I found macro \...
user avatar
3 votes
2 answers
116 views

Draw an arrow over and across tables and images with minimal LateX coding

Can someone reproduce the following in LateX: I have looked extensively at various packages and techniques but none seem quite able to reproduce the desired behavior. I essentially wish to draw an ...
user avatar
0 votes
1 answer
106 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
5 votes
1 answer
125 views

Tikz node with multiparts coloring but single part text

I want to create a tikz node with two colors (split along a vertical axis) and a single body of text spanning the two parts. The way I've seen the shapes.multipart library used makes the being ...
user avatar
  • 533
1 vote
1 answer
83 views

Filling out the space between two circles with dashed lines in order to create a torus like shape

\documentclass[fleqn]{book} \usepackage{amsmath, amssymb} \usepackage{amsthm} \usepackage{xcolor} \definecolor{nord0}{HTML}{2E3440} \definecolor{nord4}{HTML}{D8DEE9} \definecolor{nord5}{HTML}{E5E9F0} \...
user avatar
1 vote
0 answers
26 views

How to make text margins follow a specific shape? [duplicate]

How can text be formatted as in this example from Alice in Wonderland, where the margins for the text seems to follow a specific shape (if that's what's actually happening..sorry if I'm clueless here),...
user avatar
1 vote
1 answer
68 views

Parameterized pgf shape with optional dashed lines

Based on similar questions I found on SE, I have finally managed to create a relatively simple ‘folded document’ shape in tikz with a few horizontal lines inside: \documentclass[tikz,border=1mm]{...
user avatar
  • 595
0 votes
0 answers
32 views

Rounded corner in xy package and ellipse shape

This question very hard for me. xy package have also the shapes, circle with [o], or other forms using this table: \documentclass[a4paper,12pt]{article} \usepackage[all]{xy} \begin{...
user avatar
  • 46.3k
0 votes
0 answers
112 views

How can I modify the SVG's viewBox while using dvisvgm

I have been converting tex files into svg: lualatex --output-format=dvi flowchart.tex dvisvgm flowchart.dvi but the SVG's attributes always holds a view box with min-x, min-y value of viewBox='-72....
user avatar
1 vote
0 answers
84 views

Tikz shape library not working on input files

Somehow, I can use the shapes tikzlibrary only on the current file, with it not working on files loaded via \input. Essentially, if I write a file with: \usepackage{tikz} \usetikzlibrary{shapes} \...
user avatar
2 votes
2 answers
311 views

Vertical alignment of tikz in minipage

The tikz picture should be top aligned with the minipage text. MWE: \documentclass{scrbook} \usepackage{tikz} \usetikzlibrary{shapes.symbols} \usepackage[left=27.5mm, right=30mm, top=25mm, bottom=...
user avatar
  • 508
2 votes
1 answer
158 views

shape border rotate has no effect on "tape" shape

I try to rotate the shape "tape" with no effect. Please take a look at the following MWE: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{tikzpicture} ...
user avatar
-1 votes
2 answers
68 views

Shape and arrows

I want to have the following design in Latex. Could you please help me how to draw it? 3 D format would be great. Many thanks!
user avatar
1 vote
2 answers
196 views

Chevron arrow shape in tikz

What is the best way to draw this in TIKZ? I was thinking I could define a custom shape with this "arrow" form, but did not really figure out how to achieve this. Maybe there are better solutions?
user avatar
  • 415
1 vote
2 answers
170 views

Tikz: Rectangle Split Inner Separations

Using tikz and tikzshapes, two split rectangles are created. Is it possible to have different inner separations for each part? MWE: \documentclass[]{article} \usepackage{tikz} \usetikzlibrary{shapes} ...
user avatar
  • 984
7 votes
3 answers
299 views

How can I draw these cones properly without the base exceeding the lines?

I want to draw a 3D shape as shown in the image, but I cannot seem to get the circle/ellipse base of the cones to fit within the lines. The sides should be a tangent to the bottom circle/ellipse. The ...
user avatar
  • 73
3 votes
1 answer
216 views

How to deform a shape along a path using TikZ?

I know that it is possible to write a text along a path. I want to know is it possible to draw a shape along a path? I know that this is impossible in most cases. but I think we can draw such ...
user avatar
2 votes
2 answers
54 views

How do I create vertical rectangles that are adjacent to each other with spaces in between?

I am working on a probability homework assignment for my discrete math class. One of the questions involves calculating the probability of drawing 7 cards and having exactly one land card and 6 non-...
user avatar
  • 95
2 votes
1 answer
270 views

How to prevent collisions in custom shapes with header and footer using `tikzpicture` and `fancyhdr`?

This is a combination of two previous questions (with their respective answers):How to create a command for the sections with an svg next to it on the top of the page? and How to make a conversation ...
user avatar
  • 3,049
1 vote
1 answer
323 views

Analog Computer Symbols

I am trying to draw analog computer symbols (I will put a picture of the entire list later). Right now, I am trying to draw a symbol of an analog integrator. Here's what I have right now in code: \...
user avatar
  • 1,437
0 votes
1 answer
202 views

How to make a defined \tikzset label centered above?

I managed to get some code from another question on this forum (I forgot where, but here is the code): \tikzstyle{block} = [draw, rectangle, minimum height=3em, minimum width=3em] \tikzstyle{...
user avatar
  • 1,437
-1 votes
2 answers
112 views

Drawing figures instead of insert [closed]

Figures are great for presentation slides. I would like to add a figure to my slides, but wouldn't be nice to import an already designed image. I would like to instead draw from within latex, this way ...
user avatar
  • 329
0 votes
2 answers
133 views

Structure of the block diagram, input and output

I put too much information in my block diagram and now the input and output don't look right. Is there a way to put larger arrows? and also I would like to know if X(s) and Y(s) can be a little bit ...
user avatar
1 vote
1 answer
188 views

Drawing a polygon of polygons

This question is vagely related to https://math.stackexchange.com/questions/3449433/selecting-cards-to-form-a-fair-game?noredirect=1#comment7090962_3449433. I am trying to visually illustrate the ways ...
user avatar
1 vote
1 answer
112 views

How to have declared pgf shape with different line thickness for one part in it?

How do I change line thickness for one part of a declared shape? I want it to have half thickness of the other lines. I tried adding the line \pgfsetlinewidth{0.5\pgflinewidth} before that part with ...
user avatar
  • 159
0 votes
1 answer
85 views

How can I get latex to make a reuleaux triangle, and can I generalize that to other reuleaux polygons?

I'm trying to get a reuleaux triangle, the interior triangle, the radius, and its midpoint. I don't know how to get all of that into the same diagram
user avatar
8 votes
2 answers
884 views

Is there a way to draw a simple circle or square in plain TeX/LaTeX, without relying on graphics packages?

I need to draw some bullets for a custom list, but what I have now is pgf code. I figured, why load entire pgf package to draw a mere circle (or square) when there must be (don't tell me otherwise, it'...
user avatar
  • 3,636
1 vote
1 answer
136 views

Recreating this image using Tikz with flattened circle

I am trying to recreate this image: I'm however struggling with the flattened circle shape in the centre as well as getting the curved lines for focusing. My current attempt has allowed me to get ...
user avatar
  • 135