Hot answers tagged

31 votes
Accepted

Draw TikZ circles with a specific outer radius

in tikz any coordinate of any path command is determined for the infinitely thin lines. the real lines lie over them so that their centers matches. line width of real lines is accessible with length \...
user avatar
  • 250k
30 votes

Draw a progress circle around text

Something like this? \documentclass{article} \usepackage{tikz,calc} \newlength\charwidth \newlength\chwidth \newcommand*\circled[1]{% \settowidth\charwidth{#1\,\%}% \settototalheight\chwidth{#1\,\...
user avatar
  • 183k
29 votes
Accepted

Draw a progress circle around text

\documentclass{standalone} \usepackage{tikz} \usepackage{calc} \newlength{\outerradius} \newlength{\innerradius} \setlength{\outerradius}{2cm} \setlength{\innerradius}{1.5cm} \newcommand{\...
user avatar
21 votes

Progressively filled circles

How about this: The command \satisfaction takes one parameter, which has to be a number from 0 to 4. And with the optional parameter, the color can be set. It scales with fontsize. And without ...
user avatar
  • 8,444
18 votes
Accepted

How do I draw a circle around a term in an align* equation?

The TikZ-way you tried works, you just forgot to set the baseline of the tikzpicture to the baseline of the text inside the math node. Here is an adjusted solution which also respects the mathstyle ...
user avatar
18 votes

a circular figure with lines behind a disc going off in all directions like a sun

You don't need to connect nodes. First draw background lines. All starting from (0,0). \foreach \angle in {0,1,...,359} \draw[cyan!50!black] (0,0)--++(\angle:4); Second, draw a circular node white ...
user avatar
  • 127k
18 votes
Accepted

How do I do dot inside a letter?

It's among the worst notation I have ever seen. If you really want it, at least do it right, with the dot in the middle of the D. \documentclass{article} \usepackage{amsmath} \usepackage{xparse} \...
user avatar
  • 983k
16 votes
Accepted

How to improve the glowing effect in this figure using TikZ?

Edit Here is a second (better?) solution: \documentclass[border={0pt 0pt 0pt 0pt}]{standalone} \usepackage{graphicx,xcolor} \usepackage{pgf,tikz} \usetikzlibrary{arrows,shadings,decorations.text,...
user avatar
  • 67.8k
16 votes

How to fill random spaces with random circles in tikz?

Opening notes There is a lot of interesting examples created in the D3js library, see e.g. mbostock's blocks or this gallery. It's quite inspiring. Those examples are fast and we could get SVG files ...
user avatar
  • 13.2k
16 votes
Accepted

How to draw a half and half colored circle?

Something like this? \documentclass[12pt,a4paper]{memoir} \usepackage[utf8]{inputenc} \usepackage{tikz,float} \usepackage{tabularx} \usepackage{xparse} \NewDocumentCommand{\statcirc}{ O{#2} m }{% ...
user avatar
  • 13.2k
15 votes

Good way to make \textcircled numbers?

this answer has been converted in a package on CTAN: https://ctan.org/pkg/circledsteps The answers here are all nice, and especially the tikz one is greatly configurable. But it has a problem: you ...
user avatar
  • 28.7k
15 votes
Accepted

Drawing a circle with an angle using TikZ

One (somehow verbose) option: The code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{angles,quotes} \def\myrad{3cm}% radius of the circle \def\myang{60}% angle for the arc \begin{...
user avatar
15 votes
Accepted

Circular Motion

Here's an alternative way to draw your circle + vectors using Metapost and luamplib. Compile with lualatex (assuming you have the TeX Gyre maths fonts available). \documentclass[border=5mm]{...
user avatar
  • 35.7k
15 votes
Accepted

Drawing lines within circle using TikZ

Using clipping? I am using a scope here to restrict the clipping to it. \documentclass[margin=5pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \begin{scope} \draw ...
user avatar
  • 28.7k
15 votes

How to divide a circle into 3 parts with text using tikzpicture environment

an alternative: used polar coordinates define radius of circle and with it also calculated distances of nodes from circle centre \documentclass[tikz, margin=3mm]{standalone} \usepackage[spanish]{...
user avatar
  • 250k
15 votes

How do I do dot inside a letter?

A simple \stackinset with a scalerel wrapper thrown around it will support the smaller math styles. \documentclass{article} \usepackage{stackengine,scalerel} \newcommand\dotD{\ThisStyle{\...
user avatar
14 votes

How to draw a solid colored circle?

\newcommand\filledcirc{{\color{red}\bullet}\mathllap{\circ}} gives you a \circ filled with red color. You need usepackage{mathtools} for the \mathllap command. To change the border color as well, ...
user avatar
  • 413
14 votes
Accepted

Circled equal with same size as \oplus/\otimes with pdflatex

One solution would be to use the unicode-symbol U+229C for this. For example with the package unicode-math. % arara: lualatex \documentclass{article} \usepackage{unicode-math} \begin{document} \[\...
user avatar
  • 42.1k
14 votes
Accepted

a circular figure with lines behind a disc going off in all directions like a sun

To connect the edges of the circle you can use the border anchors of nodes (A.120) and the to Operator to connect it to the outer square. \documentclass[tikz, border=5mm]{standalone} \begin{...
user avatar
14 votes

Drawing lines within circle using TikZ

For fun, here is a style vlines using path picture and grid to draw the lines. \documentclass[tikz,border=7pt]{standalone} \tikzset{ vlines/.style={ path picture={ \draw[xstep=#1, ystep=...
user avatar
  • 22.3k
14 votes
Accepted

How can I draw a water lily in LaTeX?

Are you looking for this 5-petal "water-lily" ? % a 5-petal rose (or "water-lily" if you like ^^) \documentclass[tikz,border=3mm]{standalone} \begin{document} \begin{tikzpicture} \...
user avatar
  • 13.4k
13 votes

Good way to make \textcircled numbers?

@Stefan's answer is good, however, I improved his answer. Firstly, if \circled{1} and \circled{10} are placed together, the two circles will not be the same size, so I added an optional parameter to ...
user avatar
  • 3,733
13 votes

How can I draw a water lily in LaTeX?

Using LuaTeX, it is easy to generate some more generic results. \documentclass{article} \usepackage{tikz} \usepackage{luacode} \begin{document} \tikzset{ arcstyle/.style={ thick } } \begin{...
user avatar
  • 4,600
12 votes

How to draw a half and half colored circle?

One more (and simple) example with use of shapes.geometry packages :-) \documentclass[12pt,a4paper]{memoir} \usepackage[utf8]{inputenc} \usepackage{xcolor} \usepackage{tikz} \usetikzlibrary{...
user avatar
  • 250k
12 votes
Accepted

How to draw a Caesar Cipher diagram with tikz?

Something like this? \documentclass[tikz,border=2mm]{standalone} \usepackage{libertine} % Change the font to your liking \usepackage[T1]{fontenc} \usetikzlibrary{decorations.text,arrows.meta,calc} \...
user avatar
  • 13.2k
12 votes

Draw a Hasse diagram with circles with 3 sectors

I'm sure you'll get some help with your TikZ, but while you are waiting, here is an alternative approach using Metapost. I've wrapped this up in luamplib so you should compile it with lualatex or ...
user avatar
  • 35.7k
12 votes
Accepted

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

As long as you only want the circles in a limited size range \documentclass{article} \begin{document} zzz \begin{picture}(8,8) \put(5,3){\circle{5}} \end{picture} zzz \begin{picture}(8,8) \...
user avatar

Only top scored, non community-wiki answers of a minimum length are eligible