emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] [PATCH] new babel latex feature :imagemagick


From: Eric Schulte
Subject: Re: [Orgmode] [PATCH] new babel latex feature :imagemagick
Date: Fri, 25 Feb 2011 17:16:15 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> #+begin_src org
>
> * tikz with image magick
>   The following is a simple figure generated using tikz:
>
>   #+begin_src latex :exports results :results (if (and (boundp 'backend) (eq 
> backend 'latex)) "latex" "file") :file test.png :imagemagick yes :iminoptions 
> -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers 
> '("\\usepackage{tikz}")
> \begin{tikzpicture}
>   \node[red!50!black] (a) {A};
>   \node (b) [right of=a] {B};
>   \draw[->] (a) -- (b);
> \end{tikzpicture}
>   #+end_src
>
> #+end_src

Very nice, are you aware of the option to split header arguments among
multiple lines?

the above could be written as...

#+headers:  :file test.png :fit yes
#+headers: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 
400
#+headers: :results (if (and (boundp 'backend) (eq backend 'latex)) "latex" 
"file")
#+begin_src latex :exports results :noweb yes :headers '("\\usepackage{tikz}")
  \begin{tikzpicture}
    \node[red!50!black] (a) {A};
    \node (b) [right of=a] {B};
    \draw[->] (a) -- (b);
  \end{tikzpicture}
#+end_src

which is (possibly) easier to write/read

Best -- Eric




reply via email to

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