Tag Info

Hot answers tagged

4

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 ...


4

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, ...


3

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: ...



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