{"id":9255,"date":"2019-03-02T15:17:53","date_gmt":"2019-03-02T15:17:53","guid":{"rendered":"http:\/\/blog.bachi.net\/?p=9255"},"modified":"2019-06-14T08:43:17","modified_gmt":"2019-06-14T08:43:17","slug":"latex-finite-state-machine","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=9255","title":{"rendered":"LaTeX\/TikZ: Finite State Machine \/ Automata"},"content":{"rendered":"<p><a href=\"http:\/\/madebyevan.com\/fsm\/\">Finite State Machine Designer<\/a><br \/>\n<a href=\"https:\/\/notendur.hi.is\/aee11\/automataLatexGen\/\">automataLatexGen<\/a><\/p>\n<p><a href=\"http:\/\/www.flutterbys.com.au\/stats\/tut\/tut17.1a.html\">Tutorial 17.1a &#8211; PGF\/Tikz<\/a> (Modifying coordinates &#8211; coordinate calculations)<\/p>\n<p><a href=\"https:\/\/tex.stackexchange.com\/questions\/419115\/how-to-change-initial-state-text-in-finite-state-machines-with-tikz-automata-li\">How to change initial state text in finite state machines with TikZ, automata library?<\/a><br \/>\n<a href=\"https:\/\/tex.stackexchange.com\/questions\/260627\/controlling-edge-shape-in-tikz\">Controlling edge shape in tikz<\/a><\/p>\n<p><a href=\"https:\/\/tex.stackexchange.com\/questions\/20784\/which-package-can-be-used-to-draw-automata\">Which package can be used to draw automata?<\/a><br \/>\n<a href=\"http:\/\/www.texample.net\/tikz\/examples\/state-machine\/\">Example: State machine<\/a><br \/>\n<a href=\"https:\/\/www3.nd.edu\/~kogge\/courses\/cse30151-fa17\/Public\/other\/tikz_tutorial.pdf\">Drawing Finite State Machines in LATEX using tikz<\/a> (PDF)<br \/>\n<a href=\"http:\/\/hauke-stieler.de\/public\/tikz-for-state-machines_en.pdf\">Tikz for state-machines<\/a> (PDF)<br \/>\n<a href=\"https:\/\/www.tug.org\/TUGboat\/tb35-2\/tb110mertz.pdf\">Typesetting figures for computer science<\/a> (PDF)<\/p>\n<p><a href=\"https:\/\/texfaq.org\/FAQ-boldgreek\">Setting bold Greek letters in LaTeX maths<\/a><\/p>\n<p><a href=\"https:\/\/tex.stackexchange.com\/questions\/52372\/should-tikzset-or-tikzstyle-be-used-to-define-tikz-styles\">Should \\tikzset or \\tikzstyle be used to define TikZ styles?<\/a><br \/>\n<a href=\"https:\/\/texwelt.de\/wissen\/fragen\/8375\/kann-man-every-nodestyle-spezifizieren-auer-fur-nodes-auf-edges\">Kann man `every node\/.style` spezifizieren au\u00dfer f\u00fcr nodes auf edges?<\/a><br \/>\n<a href=\"https:\/\/tex.stackexchange.com\/questions\/69316\/tikz-state-initial-with-vertical-orientation\">tikz state initial with vertical orientation?<\/a><br \/>\n<a href=\"https:\/\/tex.stackexchange.com\/questions\/16231\/node-below-and-left-of-another-node-in-tikz\">Node below and left of another node in TikZ<\/a><br \/>\n<a href=\"https:\/\/tex.stackexchange.com\/questions\/107095\/changing-line-thickness-of-arrow\">Changing line thickness of arrow<\/a><br \/>\n<a href=\"https:\/\/texwelt.de\/wissen\/fragen\/828\/wie-kann-ich-die-biegung-von-tikz-pfeilen-einstellen\">Wie kann ich die Biegung von TikZ-Pfeilen einstellen?<\/a><br \/>\n<a href=\"https:\/\/tex.stackexchange.com\/questions\/35257\/how-do-you-get-two-lines-between-nodes-that-have-paths-to-each-other-instead-of\">How do you get two lines between nodes that have paths to each other instead of a double ended line? [duplicate]<\/a><\/p>\n<p><a href=\"https:\/\/tex.stackexchange.com\/questions\/255234\/how-does-one-pick-control-points-to-control-b%C3%A9zier-curves-in-tikz\">How does one pick control points to control B\u00e9zier curves in TikZ?<\/a><br \/>\n<a href=\"https:\/\/tex.stackexchange.com\/questions\/209303\/tikz-in-out-angle-vs-bezier-controls\">TikZ in\/out angle vs. Bezier controls<\/a><br \/>\n<a href=\"https:\/\/tex.stackexchange.com\/questions\/18389\/tikz-node-at-same-x-coordinate-as-another-node-but-specified-y-coordinate\">TikZ: Node at same x-coordinate as another node, but specified y-coordinate?<\/a><br \/>\n<a href=\"https:\/\/texwelt.de\/wissen\/fragen\/2192\/wie-werden-nodes-positioniert\">Wie werden nodes positioniert?<\/a><\/p>\n<p><a href=\"https:\/\/de.overleaf.com\/learn\/latex\/LaTeX_Graphics_using_TikZ:_A_Tutorial_for_Beginners_(Part_1)%E2%80%94Basic_Drawing\">LaTeX Graphics using TikZ: A Tutorial for Beginners (Part 1)\u2014Basic Drawing<\/a><br \/>\n<a href=\"https:\/\/de.overleaf.com\/learn\/latex\/LaTeX_Graphics_using_TikZ:_A_Tutorial_for_Beginners_(Part_2)%E2%80%94Generating_TikZ_Code_from_GeoGebra\">LaTeX Graphics using TikZ: A Tutorial for Beginners (Part 2)\u2014Generating TikZ Code from GeoGebra<\/a><br \/>\n<a href=\"https:\/\/de.overleaf.com\/learn\/latex\/LaTeX_Graphics_using_TikZ:_A_Tutorial_for_Beginners_(Part_3)%E2%80%94Creating_Flowcharts\">LaTeX Graphics using TikZ: A Tutorial for Beginners (Part 3)\u2014Creating Flowcharts<\/a><br \/>\n<a href=\"https:\/\/de.overleaf.com\/learn\/latex\/LaTeX_Graphics_using_TikZ:_A_Tutorial_for_Beginners_(Part_4)%E2%80%94Circuit_Diagrams_Using_Circuitikz\">LaTeX Graphics using TikZ: A Tutorial for Beginners (Part 4)\u2014Circuit Diagrams Using Circuitikz<\/a><br \/>\n<a href=\"https:\/\/de.overleaf.com\/learn\/latex\/LaTeX_Graphics_using_TikZ:_A_Tutorial_for_Beginners_(Part_5)%E2%80%94Creating_Mind_Maps\">LaTeX Graphics using TikZ: A Tutorial for Beginners (Part 5)\u2014Creating Mind Maps<\/a><\/p>\n<p><a href=\"https:\/\/en.wikibooks.org\/wiki\/LaTeX\/PGF\/TikZ\">LaTeX\/PGF\/TikZ<\/a><\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n\\usepackage{tikz}\r\n\\usetikzlibrary{automata, positioning, arrows}\r\n\r\n\\tikzset{\r\n    -&gt;, % makes the edges directed\r\n    &gt;=stealth, % makes the arrow heads bold\r\n    node distance=2cm, % specifies the minimum distance between two nodes. Change if necessary.\r\n    every state\/.style={thick, fill=gray!10}, % sets the properties for each \u2019state\u2019 node\r\n    every edge\/.append style={line width=0.25mm}, % sets the properties for each \u2019state\u2019 node\r\n    initial text=$ $, % sets the text that appears on the start arrow\r\n}\r\n\r\n\\begin{document}\r\n    \\begin{tikzpicture}\r\n        \\node&#x5B;state, initial] (q1) {$q_1$};\r\n        \\node&#x5B;state, accepting, right of=q1] (q2) {$q_2$};\r\n        \\node&#x5B;state, right of=q2] (q3) {$q_3$};\r\n        \\draw\t(q1) edge&#x5B;loop above] node{0} (q1)\r\n                (q1) edge&#x5B;above] node{1} (q2)\r\n                (q2) edge&#x5B;loop above] node{1} (q2)\r\n                (q2) edge&#x5B;bend left, above] node{0} (q3)\r\n                (q3) edge&#x5B;bend left, below] node{0, 1} (q2);\r\n    \\end{tikzpicture}\r\n    \r\n    \\begin{tikzpicture}&#x5B;shorten &gt;=1pt,node distance=2cm,on grid,auto] \r\n        \\node&#x5B;state,initial] (q_0)   {$q_0$}; \r\n        \\node&#x5B;state] (q_1) &#x5B;above right=of q_0] {$q_1$}; \r\n        \\node&#x5B;state] (q_2) &#x5B;below right=of q_0] {$q_2$}; \r\n        \\node&#x5B;state,accepting](q_3) &#x5B;below right=of q_1] {$q_3$};\r\n        \\path&#x5B;-&gt;] \r\n            (q_0) edge              node        {0} (q_1)\r\n                  edge              node &#x5B;swap] {1} (q_2)\r\n            (q_1) edge              node        {1} (q_3)\r\n                  edge &#x5B;loop above] node        {0} ()\r\n            (q_2) edge              node &#x5B;swap] {0} (q_3) \r\n                  edge &#x5B;loop below] node        {1} ();\r\n    \\end{tikzpicture}\r\n\\end{document}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Finite State Machine Designer automataLatexGen Tutorial 17.1a &#8211; PGF\/Tikz (Modifying coordinates &#8211; coordinate calculations) How to change initial state text in finite state machines with TikZ, automata library? Controlling edge shape in tikz Which package can be used to draw automata? Example: State machine Drawing Finite State Machines in LATEX using tikz (PDF) Tikz for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9255","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9255"}],"version-history":[{"count":17,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9255\/revisions"}],"predecessor-version":[{"id":9731,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/9255\/revisions\/9731"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}