# Tag Info

133

Here's a TikZ solution: \documentclass{article} \usepackage{tikz} \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ \node[shape=circle,draw,inner sep=2pt] (char) {#1};}} \begin{document} Numbers aligned with the text: \circled{1} \circled{2} \circled{3} end. \end{document} It's just a node. TikZ options are used to align the base line, ...

75

I was pleasantly surprised how many people decided to give it a try, and a lot of interesting solutions popped out. As per tradition, this answer will be community wiki and will summarize and compare all suggested solutions. I hereby suggest three different evaluation criteria, each graded from 1 to 5: Simplicity. This is a measure how easy it is to ...

57

There is now a package pullquote which allows to create various shapes of inserts. All you have to specify is the text which should "flow" plus some rectangular "object" which is inserted. Everything else is calculated automatically by the environment pullquote. In principle, every shape can be defined by providing an appropriate shape function macro. See ...

50

Commands \drawCaesarsDisk that works with a number of letters (only A to Z) \drawCaesarsList that works with one list for both rings or two different lists Keys inner radius/middle radius/outer radius Improvements: Specify inner radius and add inner height and outer height respectively to calculate the actual radii. Improvements: With these heights, ...

34

Just with the help of TikZ it is perfectly possible to do such a job. Here is indeed a possible solution that allows you to easily set the number of points on the circle; set the circle radius; decide the position of the picture in terms of coordinates eventually position labels. The first three things are did by one command: \drawconnectvertices while ...

31

Here's one possibility using \foreach and its evaluate=<variable> as <macro> using <formula> and count=<macro> from <value> syntax: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,shapes.geometric,arrows,fit,calc,positioning,automata,} \usepackage{amsmath} \definecolor{myblue}{RGB}{153,205,255} \begin{...

25

24

Here's a new style double circle that can be supplied to a node. It takes two arguments, one for specifying how much larger the radius of the outer circle is (default is 2pt), and the second for specifying the colour (or any combination of options, really) of the inner circle (default is blue). If you specify a node name, this will refer to the outer node (...

23

Something like this? \documentclass{article} \usepackage{tikz,calc} \newlength\charwidth \newlength\chwidth \newcommand*\circled[1]{% \settowidth\charwidth{#1\,\%}% \settototalheight\chwidth{#1\,\%}% \ifdim\chwidth>\charwidth\let\charwidth\chwidth\fi \addtolength\charwidth{5pt}% twice inner sep plus half line width \tikz[baseline=(char.base)]{...

22

Two examples of what you can draw with the 3d library. The first on has been modified because something was wrong with shade colour. \documentclass[]{article} \usepackage{tikz} \usetikzlibrary{3d} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{5pt}% \begin{document} \begin{tikzpicture} [x={(-0.2cm,-0....

21

One easy way would be to use TikZ as in the following MWE \documentclass[a4paper,12pt]{scrartcl} \usepackage{tikz} \begin{document} Some Text \tikz\draw[red,fill=red] (0,0) circle (.5ex); further text \end{document} which produces Where the first red defines the line style of the drawn circle to be red and the fill=red specifies, that its solid red. ...

19

The quickest fix would be to use the \raisebox command. I've played around with it a bit, and it seems lowering the text by 0.9pt puts the figure approximately in the center: \textcircled{\raisebox{-0.9pt}{8}} You could play around with it to get the absolute center but it's definitely between 0.9 and 1pt. I got the idea here. It seems the \textcircled ...

19

I don't think there are automated approached for this kind of thing in LaTeX. The procedure I've implemented is based on trial-and-error and uses \parshape. Here are the steps I followed: 0. Preliminaries \parshape <n> <i1> <w1> <i2> <w2> ... <in> <wn> The first "argument" to \parshape represents the number of ...

19

Here is what I've done so far: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\alphsize}{26} \pgfmathsetmacro{\ang}{360/\alphsize} \pgfmathsetmacro{\d}{10} \pgfmathsetmacro{\op}{98 + \ang/2 - 1.2} \pgfmathsetmacro{\e}{\ang + \ang*\d} \pgfmathsetmacro{\ep}{\op + \ang*\d} \...

19

A recommended solution with PSTricks (plus supporting Chinese characters as you are living in Macau, China), just for best-practitioners. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-eucl} \usepackage{CJKutf8} \newsavebox\IBox \begin{document} \begin{CJK}{UTF8}{bsmi} \savebox\IBox{中} \begin{pspicture}[showgrid=false](5.75,4.25) \...

19

In this case it is pretty simple to use the calc and intersections library: \documentclass[tikz,border=0.125cm]{standalone} \usetikzlibrary{calc,intersections} \begin{document} \begin{tikzpicture} \path [rotate=60] (0,0) coordinate (A) (-2,-3) coordinate (B) (0,-3) coordinate (C) ($(B)!2!(C)$) coordinate (D) ($(A)!0.5!(B)$) coordinate (...

17

This is a possible solution mainly based on How to generate n points on a circumference and connect all of them while having constraints on the image size? The adaptation from that code concerns how the labels and the colors are customized: I developed two ways basically circumference with labels which allows to customize both; they should be inserted as ...

17

I'm not sure what you mean by "\textcircled doesn't seem to like this", because \documentclass{article} \begin{document} \raisebox{.5pt}{\textcircled{\raisebox{-.9pt} {$f_n$}}} \end{document} compiles fine for me. That said, it does look a bit rubbish: You might consider a little TikZ picture for this situation. You could put the $f_n$ inside a ...

16

Draw Arched "Rectangle" Around Circle: Below is a macro that draws the desired shape around the circle: \DrawAlong{(Center)}{\Radius}{\Separation}{120}{60} yields the blue shape from 120 to 60 degrees, and \DrawAlong[draw=black,fill=yellow, fill opacity=0.4]{(Center)}{\Radius}{\Separation}{-30}{-60} yields the filled in yellow shape from -30 to -60 degrees: ...

15

PGF is overkill for this one application, but if you already have it loaded, you can use it: \documentclass{article} \usepackage{tikz} \newcommand{\pgftextcircled}[1]{ \setbox0=\hbox{#1}% \dimen0\wd0% \divide\dimen0 by 2% \begin{tikzpicture}[baseline=(a.base)]% \useasboundingbox (-\the\dimen0,0pt) rectangle (\the\dimen0,1pt); ...

15

And a poor man's solution if compared to Claudio's answer :) \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \def\numofpoints{19} \def\circpatt{{1,0,0,1,1,0,0,1,0,1,1,0,0,0,1,0,0,1,2,3}} % 1 filled 0 empty \def\labelpatt{{1,11,2,12,3,13,4,14,5,15,6,16,7,17,8,18,9,19,10}} \node[circle,draw,minimum width=4cm] (bigc) {}; \...

15

Here: \documentclass{article} \usepackage{tikz} \usepackage{ifthen} \newcounter{encrypted} \newcounter{original} \newcommand{\increase}[1]{%command to increase a counter by 1 modulo 26 \ifthenelse{\arabic{#1}<26}{\addtocounter{#1}{1}}{\setcounter{#1}{1}} } \begin{document} \setcounter{encrypted}{7} \setcounter{original}{1} \begin{tikzpicture}[scale=0....

14

Not sure exactly what you want, but here are five different ways: \documentclass[border=2pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} % Version 1 \draw [red ] (0,0) circle (5pt); \draw [blue] (0,0) circle (10pt); \node at (0,0) {1}; % Version 2 \node [draw=blue,double=red, circle, inner sep=1pt] at (1,0) {2}; % Version 3 \...

14

run with xelatex \documentclass{article} \usepackage{pst-poly} \providecommand{\PstPolygonNode}{% \psdots[dotscale=2](1;\INode) \multido{\iA=0+1}{\INode}{% \multido{\iB=\iA+1}{\numexpr\INode-\iA+1\relax}{% \psline[linecolor=blue!50](1;\iA)(1;\iB)}}} \begin{document} \psset{unit=2,linewidth=0.2pt} \PstPolygon[PolyNbSides=4] \qquad \PstPolygon[...

14

Another solution with TikZ, but this one creates a command \tikzcircle to be used in the document: \newcommand{\tikzcircle}[2][red,fill=red]{\tikz[baseline=-0.5ex]\draw[#1,radius=#2] (0,0) circle ;}% It takes one mandatory argument, the radius of the circle and an optional argument that helps in customizing the circle's aspect. The code: \documentclass[...

14

Use named nodes. They do that automatically. To name nodes, use either the name=<name> key, or the special syntax (<name>) (see example below) Code \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}% \draw[help lines] (0,0) grid (1,1); \node [draw, circle] (c1) at (0,0) {};% special syntax \...

12

12

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 at a JavaScript level, if needed (easily convertible to PDF, TikZ etc.). Let me focus on these types of graphs. I believe these examples belong to a field of ...

11

As percusse commented, the easiest way is to use two arcs, one of which is without reversing the text. \documentclass[11pt]{scrartcl} % TikZ \usepackage{tikz, pgfornament, tikzrput} \usetikzlibrary{decorations, decorations.text} % font size \usepackage{fix-cm} % cryillic font \usepackage[OT2, OT1]{fontenc} \newcommand\cyr{% \...

11

Just 4 fun with PSTricks. \documentclass[pstricks,border=12pt]{standalone} \SpecialCoor \makeatletter \def\N{26} \begin{document} % speficy the angular distance between the 2 sets of alphabets \def\offset{13} \begin{pspicture}(-5,-5)(5,5) \psforeach{\r} {2,3,4}{\pscircle{\r}} \degrees[\N] \psforeach{\t}{65,66,..,90}{% \psline(2;\the\...

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