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$: Office and Turing Complete?
Whom takes fun only as fun.
And serious only seriously.
Misunderstood both.
Piet Hein
< Offices | Turing Completeness | Scripting >
  1. Variaveis:

    \pgfmathparse{2} \let\R\pgfmathresult;
  2. Conditionals

    \pgfmathparse{2*(1-cos(\t))} \let\ft\pgfmathresult;
    \ifthenelse{\lengthtest{ \ft pt > 0 pt}}
    {
            \pgfmathparse{1/sqrt(\ft)} \let\ft\pgfmathresult;
            \coordinate (t) at ($\ft*(i)+\ft*(p)$);
    }{}


    \IfFileExists
    {
          Existent
    }{
          Nonexistent
    }
  3. Loops - \foreach

    \foreach \t in {0,0.1,...,2*pi}
    {
          \coordinate (P) at (cos(\t),sin(\t));
          \filldraw (P) circle(1pt);
    }
  4. Functions or Commands: \newcommand{\Vector}[1]
    {
          \underline { \textbf {#1}

  5. $\TeX$ is Turing Complete!
< Offices | Turing Completeness | Scripting >
Messages:
0 secs.