meta:texrender-examples-2
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| meta:texrender-examples-2 [August 13, 2026 at 18:06] – Ivan Janevski | meta:texrender-examples-2 [August 13, 2026 at 18:09] (current) – removed Ivan Janevski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | % Turing Machine | ||
| - | % Author: Sebastian Sardina | ||
| - | \documentclass{standalone} | ||
| - | \usepackage{tikz} | ||
| - | \usepackage[active, | ||
| - | \PreviewEnvironment{tikzpicture} | ||
| - | \setlength\PreviewBorder{5pt}% | ||
| - | \usetikzlibrary{chains, | ||
| - | \begin{document} | ||
| - | \begin{tikzpicture} | ||
| - | \tikzstyle{every path}=[very thick] | ||
| - | \edef\sizetape{0.7cm} | ||
| - | \tikzstyle{tmtape}=[draw, | ||
| - | \tikzstyle{tmhead}=[arrow box, | ||
| - | arrows={east: | ||
| - | |||
| - | %% Draw TM tape | ||
| - | \begin{scope}[start chain=1 going right,node distance=-0.15mm] | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1, | ||
| - | \node [on chain=1] {\textbf{Input/ | ||
| - | \end{scope} | ||
| - | |||
| - | %% Draw TM Finite Control | ||
| - | \begin{scope} | ||
| - | [shift={(3cm, | ||
| - | \foreach \i in {q_0, | ||
| - | \node [on chain] {$\i$}; | ||
| - | |||
| - | % Arrow to current state | ||
| - | \node (center) {}; | ||
| - | \draw[-> | ||
| - | |||
| - | \node[rounded corners, | ||
| - | (circle-4) (circle-5) (circle-6), | ||
| - | label=below: | ||
| - | {}; | ||
| - | \end{scope} | ||
| - | |||
| - | %% Draw TM head below (input) tape cell | ||
| - | \node [tmhead, | ||
| - | |||
| - | %% Link Finite Control with Head | ||
| - | \path[->, | ||
| - | (headlinetext) | ||
| - | | ||
| - | (head.south); | ||
| - | \node[xshift=3cm] at (headlinetext) | ||
| - | {\begin{tabular}{c} | ||
| - | \textbf{Reading and Writing Head} \\ | ||
| - | \textbf{(moves in both directions)} | ||
| - | \end{tabular}}; | ||
| - | |||
| - | \end{tikzpicture} | ||
| - | \end{document} | ||
meta/texrender-examples-2.1786644383.md.gz · Last modified: by Ivan Janevski
