SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

$\LaTeX$
Existe pessoas presos na rua.
E pessoas livres na cadeia.
É uma questão de conceito.
Mahatma Gandhi.
< Conditionals | \foreach | MathJaX >

Looping: \foreach

  1. Needs TikZ!! \includepackage{tikz}
  2. \foreach \p in {A,B,C)
    {
       \draw[Points] (\p) node [anchor=north east] {$\p$};
    }
  3. \foreach \p/\anchor in {A/north,B/south,C/south west)
    {
       \draw[Points] (\p) node [anchor=\anchor] {$\p$};
    }
  4. \foreach \p/\anchor/\title in {A/north/A',B/south/B',C/south west/C')
    {
       \draw[Points] (\p) node [anchor=\anchor] {$\title$};
    }
  5. \def\Path{Curves/Trochoid}
    \tikzmath{\N=10;}
    \foreach \n in {1,2,...,\N)
    {
       \textbf{\n} {\safeinput{\Path/\n.tex}
    }
  6. \def\Path{Curves/Trochoid}
    \tikzmath{\N=10;}
    \tikzmath{\tstart=0;}
    \tikzmath{\tend=0;}
    \tikzmath{\tnext=\tstart+(\tend-\tstart)/\N;}
    \foreach \t in {\tstart,\tnext,...,\tend)
    {
       %Curves.Draw.tikz.tex refers to \t as time
       \input{Curves.Draw.tikz}
    }
< Conditionals | \foreach | MathJaX >
Messages:
0 secs.