Tag Info

Hot answers tagged

5

With a few nested loops and some conditions (with the help of a simple style from the forest package) this can be done rather easily. There might be a shorter graphs solution which will do basically the same. Code \documentclass[tikz]{standalone} \usepackage{forest} \usetikzlibrary{arrows.meta,chains} \tikzset{if/.style={/forest/if=#1}, If/.style ...


5

I don't think this is quite what is required at all, but anyway... I went for brevity over anything/everything else. Needs PGF v3 for the node contents key. \documentclass[tikz, border=5]{standalone} \begin{document} \begin{tikzpicture}[x=2.5em, y=2.5em, every slot/.style={fill=yellow!\m!white, draw, very thick, rounded corners, node contents=G, ...


4

While you're waiting for a TikZ-loop-expert, here's a Metapost version for your entertainment that features two nested loops. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); path s; s = superellipse(7 right, 6 up, 7 left,6 down, 0.8); color yellow, filler; yellow = .4[red+green,white]; boolean connect; pair t; y = 0; for n=12 downto 2: ...


1

It looks... well... basically, awful in my opinion but anyway... \documentclass[tikz, border=15]{standalone} \usetikzlibrary{decorations.text} \usepackage[nopar]{lipsum} \UnpackLipsum[1] \begin{document} \tikz\draw [gray, thick, postaction={decoration={text along path, text/.expanded=\lipsumexp}, decorate}] (0,0) \foreach \i in {0,...,20}{ -- ...


1

Works only for integer of semi integer values. \documentclass{report} \usepackage{tikz} \newcommand{\grade}[1]{% \begin{tikzpicture} \clip (1em-.3em,-.3em) rectangle (5em +.5em ,.3em); \begin{scope} \clip (1em-.3em,-.3em) rectangle (#1em +.5em ,.3em); \foreach \x in {1,2,...,5}{ \path[fill=red] (\x em,0) circle (.25em); } \end{scope} \foreach \x in ...



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