Graphics, Figures & Tables ⇒ Markov Latex
Re: Markov Latex
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Stefan Kottwitz
- Site Admin
- Posts: 10329
- Joined: Mon Mar 10, 2008 9:44 pm
Markov Latex
Don't forget to remove my dummy text if you don't need it, or replace at those loops.
Code: Select all
\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{tikz}
\usetikzlibrary{calc, automata, chains, arrows.meta, quotes}
\begin{document}
\begin{tikzpicture}[start chain = going right,
-Triangle, every loop/.append style = {-Triangle}]
\shorthandoff{"}
\foreach \i in {0,...,4}
\node[state, on chain] (\i) {\i};
\foreach \i/\above/\below in {0/a/b,1/c/d,2/e/f,3/g/h} {
\draw let \n1 = { int(\i+1) } in
(\i) edge[bend left, "\above"] (\n1)
(\n1) edge[bend left, "\below"] (\i);
}
\foreach \i/\txt in {1/here,2/there,3/here too}
\draw (\i) edge[loop below, "\txt"] (\i);
\draw (0) edge[loop left, "left"] (0);
\draw (4) edge[loop right, "right"] (4);
\end{tikzpicture}
\end{document}
Re: Markov Latex
thanks!!!!!!!!
you are a crack!
thanks Stefan! I hope that you have a good day !
