[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Best diagram, image software?
From: |
Nick Dokos |
Subject: |
Re: [O] Best diagram, image software? |
Date: |
Thu, 06 Oct 2016 14:15:55 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Peter Davis <address@hidden> writes:
> Since several people recommended TikZ, I decided to take a look at it.
> It seems very powerful, but I'm unable to get any example to work. For
> example, using the example here:
>
> http://doblogit.com/posts/2015-10-23-org-graphics.html
>
Did you add tikz to org-latex-packages-alist?
> #+begin_src latex :exports results :results output raw :file
> images/fsa.png
> % Define block styles
> \usetikzlibrary{shapes,arrows}
> \tikzstyle{astate} = [circle, draw, text centered, font=\footnotesize,
> fill=blue!25]
> \tikzstyle{rstate} = [circle, draw, text centered, font=\footnotesize,
> fill=red!25]
>
> \begin{tikzpicture}[->,>=stealth', shorten >=1pt, auto, node
> distance=2.8cm, semithick]
> \node [astate] (1) at (0,0) {1};
> \node [astate] (2) at (1,0) {2};
> \node [rstate] (3) at (2,0) {3};
> \path (1) edge [bend left] node {b} (2)
> (2) edge node {b} (3)
> (2) edge [bend left] node {a} (1)
> (3) edge [loop above] node {(a, b)} (3);
> \end{tikzpicture}
> #+end_src
>
>
> I get:
>
> org-babel-exp process latex at line 6...
> executing Latex code block...
> org-latex-compile: PDF file
> c:/Users/pdavis/AppData/Local/Temp/orgtex5448hGP.pdf wasn’t produced
>
> I've got ImageMagick installed. I don't know how to debug this.
I always go back to straight LaTeX to debug such problems:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\tikzstyle{astate} = [circle, draw, text centered, font=\footnotesize,
fill=blue!25]
\tikzstyle{rstate} = [circle, draw, text centered, font=\footnotesize,
fill=red!25]
\begin{document}
\begin{tikzpicture}[->,>=stealth', shorten >=1pt, auto, node distance=2.8cm,
semithick]
\node [astate] (1) at (0,0) {1};
\node [astate] (2) at (1,0) {2};
\node [rstate] (3) at (2,0) {3};
\path (1) edge [bend left] node {b} (2)
(2) edge node {b} (3)
(2) edge [bend left] node {a} (1)
(3) edge [loop above] node {(a, b)} (3);
\end{tikzpicture}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End:
--8<---------------cut here---------------end--------------->8---
--
Nick
- Re: [O] Best diagram, image software?, (continued)
- Re: [O] Best diagram, image software?, Fabrice Popineau, 2016/10/04
- Re: [O] Best diagram, image software?, Peter Davis, 2016/10/04
- Re: [O] Best diagram, image software?, Russell Adams, 2016/10/04
- Re: [O] Best diagram, image software?, Jeremie Juste, 2016/10/05
- Re: [O] Best diagram, image software?,
Nick Dokos <=
- Re: [O] Best diagram, image software?, Peter Davis, 2016/10/06
- Re: [O] Best diagram, image software?, Nick Dokos, 2016/10/06
- Re: [O] Best diagram, image software?, Peter Davis, 2016/10/06
- Re: [O] Best diagram, image software?, Clément Pit--Claudel, 2016/10/06
- Re: [O] Best diagram, image software?, Peter Davis, 2016/10/06
- Re: [O] Best diagram, image software?, John Hendy, 2016/10/06
- Re: [O] Best diagram, image software?, Peter Davis, 2016/10/06
- Re: [O] Best diagram, image software?, John Kitchin, 2016/10/06
- Re: [O] Best diagram, image software?, Martin Schöön, 2016/10/06
- Re: [O] Best diagram, image software?, Robert Klein, 2016/10/07