emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Best diagram, image software?


From: Robert Klein
Subject: Re: [O] Best diagram, image software?
Date: Fri, 7 Oct 2016 08:38:44 +0200

Hi,

I'm using the following header, which lets me export to PDF and HTML,
both (basically from here:
http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html).



#+header: :exports results :file fsa.png
#+header: :imagemagick yes :iminoptions -density 600 :imoutoptions
-geometry 1200 
#+header: :fit yes :noweb yes :headers '("\\usepackage{tikz}") 
#+begin_src latex :exports results :results raw :file fsa.png


(and no #+Results line, but I don't know if this matters)


Also, regarding the babel I use the following to map source blocks to
"supported" LaTeX listings languages:


Add “text” and “conf” to =latex-listings-langs= with empty (space as a
trick) language name to be used in the LaTeX listings package.

#+begin_src emacs-lisp
  (add-to-list 'org-latex-listings-langs
               '(text " "))
  (add-to-list 'org-latex-listings-langs
               '(conf " "))
  (add-to-list 'org-latex-listings-langs
               '(nxml "XML"))
  (add-to-list 'org-latex-listings-langs
               '(org " "))


Best regards

 On Thu, 06 Oct 2016 12:48:52 -0400
Peter Davis <address@hidden> wrote:

> 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
> 
> #+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.
> 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]