* Export tikz Figures Issue
@ 2014-01-11 3:58 Aric
2014-01-11 12:48 ` Andreas Leha
0 siblings, 1 reply; 3+ messages in thread
From: Aric @ 2014-01-11 3:58 UTC (permalink / raw)
To: emacs-orgmode
I apologize for the sudden flurry of postings, but I am finding some great
solutions within Org.
I have very happily managed to find the more recent references to babel
latex and tikz figures with the imagemagick conversion, and this works
absolutely beautifully within the Org mode buffer.
I have not been successful in exporting the image (html or odt) however. I
can export it if I create a link to the generated png image, rather than
leaving it to the results section like I can with latex. Here is an example:
Working R:
#+name: fig:bplotil8staph
#+headers: :results graphics :file /somewhereelse/bplotil8staph.png
#+begin_src R
bwplot(il.8 ~ impression,....)
#+end_src
#+CAPTION: Plot demonstrating significantly increased IL-8 levels during /S.
aureus/ pneumonia as compared to colonization.
#+RESULTS: bplotil8staph
[[file:/somewhereelse/bplotil8staph.png]]
Note that this link is generated by the R output and I can see the image
along with the caption in both Org buffer and exported files.
Not working so well LaTeX:
#+name: fig:markovdesc
#+headers: :imagemagick yes :iminoptions -density 600 :imoutoptions -
geometry 800
#+headers: :file /somewhereelse/plot_markovModel.png :fit yes
#+begin_src latex :buffer no :packages '(("" "tikz"))
\usetikzlibrary{shadows,arrows,automata,decorations.text,shapes,snakes,fit}
\tikzstyle{ball} = [circle,shading=ball,minimum size=1cm]
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=4.2cm]
\tikzstyle{everystate}=[draw=black,thick,scale=1,align=center]
\node [state,initial,text width=4em,align=center,ball,text=black,ball
color=green!70!black,drop shadow] (A) {{\small Post-
Transplant State 1}};
\node [state,align=center,text width=4em,ball,text=black,ball
color=purple!70,drop shadow] (B) [right of=A] {{\small BOS
~~~State 2}};
\path (A) edge [bend left] node[above] {{\small $\lambda_{12}(t)$
Covariates~$HR_{12}$}} (B);
\node[state,align=center,text width=4em,ball,text=black,ball
color=blue!50,drop shadow] (C) [below=2.6cm,right=1cm]
{{\small Death ~~~State 3}};
\path (A) edge [] node[left] {{\small $\lambda_{13}(t)$
Covariates~$HR_{13}$}} (C);
\path (B) edge [] node[right] {{\small $\lambda_{23}(t)$
Covariates~$HR_{23}$}} (C);
\end{tikzpicture}
#+end_src
#+CAPTION: Basic idea of the model demonstrating the transition states.
#+RESULTS: fig:markovdesc
#+BEGIN_LaTeX
[[file:/fitz/Rworkarea/gnr/new_work/staph/plot_markovModel.png]]
#+END_LaTeX
For the LaTeX there is no image in the exported buffers and the in-text link
to the image is not active at all. Things only work for latex tikz in the
Org buffer.
What am I doing wrong? Or do I need to create a manual link to the file?
Thanks so much for suggestions.
aric
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Export tikz Figures Issue
2014-01-11 3:58 Export tikz Figures Issue Aric
@ 2014-01-11 12:48 ` Andreas Leha
2014-01-13 23:47 ` Aric
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Leha @ 2014-01-11 12:48 UTC (permalink / raw)
To: emacs-orgmode
Hi Aric,
Aric <aorchid@mac.com> writes:
> I apologize for the sudden flurry of postings, but I am finding some great
> solutions within Org.
>
> I have very happily managed to find the more recent references to babel
> latex and tikz figures with the imagemagick conversion, and this works
> absolutely beautifully within the Org mode buffer.
>
> I have not been successful in exporting the image (html or odt) however. I
> can export it if I create a link to the generated png image, rather than
> leaving it to the results section like I can with latex. Here is an example:
>
> Working R:
>
> #+name: fig:bplotil8staph
> #+headers: :results graphics :file /somewhereelse/bplotil8staph.png
> #+begin_src R
> bwplot(il.8 ~ impression,....)
> #+end_src
> #+CAPTION: Plot demonstrating significantly increased IL-8 levels during /S.
> aureus/ pneumonia as compared to colonization.
> #+RESULTS: bplotil8staph
> [[file:/somewhereelse/bplotil8staph.png]]
>
> Note that this link is generated by the R output and I can see the image
> along with the caption in both Org buffer and exported files.
>
> Not working so well LaTeX:
>
> #+name: fig:markovdesc
> #+headers: :imagemagick yes :iminoptions -density 600 :imoutoptions -
> geometry 800
> #+headers: :file /somewhereelse/plot_markovModel.png :fit yes
> #+begin_src latex :buffer no :packages '(("" "tikz"))
> \usetikzlibrary{shadows,arrows,automata,decorations.text,shapes,snakes,fit}
> \tikzstyle{ball} = [circle,shading=ball,minimum size=1cm]
> \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=4.2cm]
> \tikzstyle{everystate}=[draw=black,thick,scale=1,align=center]
> \node [state,initial,text width=4em,align=center,ball,text=black,ball
> color=green!70!black,drop shadow] (A) {{\small Post-
> Transplant State 1}};
> \node [state,align=center,text width=4em,ball,text=black,ball
> color=purple!70,drop shadow] (B) [right of=A] {{\small BOS
> ~~~State 2}};
> \path (A) edge [bend left] node[above] {{\small $\lambda_{12}(t)$
> Covariates~$HR_{12}$}} (B);
> \node[state,align=center,text width=4em,ball,text=black,ball
> color=blue!50,drop shadow] (C) [below=2.6cm,right=1cm]
> {{\small Death ~~~State 3}};
> \path (A) edge [] node[left] {{\small $\lambda_{13}(t)$
> Covariates~$HR_{13}$}} (C);
> \path (B) edge [] node[right] {{\small $\lambda_{23}(t)$
> Covariates~$HR_{23}$}} (C);
> \end{tikzpicture}
> #+end_src
>
> #+CAPTION: Basic idea of the model demonstrating the transition states.
> #+RESULTS: fig:markovdesc
> #+BEGIN_LaTeX
> [[file:/fitz/Rworkarea/gnr/new_work/staph/plot_markovModel.png]]
> #+END_LaTeX
>
> For the LaTeX there is no image in the exported buffers and the in-text link
> to the image is not active at all. Things only work for latex tikz in the
> Org buffer.
>
> What am I doing wrong? Or do I need to create a manual link to the file?
>
> Thanks so much for suggestions.
>
> aric
Works for me if I add ':results raw file'. Not sure, this is the
'official' solution, though.
Here is the complete example, that works for me:
--8<---------------cut here---------------start------------->8---
#+name: fig:markovdesc
#+headers: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 800
#+headers: :file ~/tmp/plot_markovModel.png :fit yes
#+headers: :results raw file
#+begin_src latex :buffer no :packages '(("" "tikz"))
\usetikzlibrary{shadows,arrows,automata,decorations.text,shapes,snakes,fit}
\tikzstyle{ball} = [circle,shading=ball,minimum size=1cm]
\begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=4.2cm]
\tikzstyle{everystate}=[draw=black,thick,scale=1,align=center]
\node [state,initial,text width=4em,align=center,ball,text=black,ball
color=green!70!black,drop shadow] (A) {{\small Post-
Transplant State 1}};
\node [state,align=center,text width=4em,ball,text=black,ball
color=purple!70,drop shadow] (B) [right of=A] {{\small BOS
~~~State 2}};
\path (A) edge [bend left] node[above] {{\small $\lambda_{12}(t)$
Covariates~$HR_{12}$}} (B);
\node[state,align=center,text width=4em,ball,text=black,ball
color=blue!50,drop shadow] (C) [below=2.6cm,right=1cm]
{{\small Death ~~~State 3}};
\path (A) edge [] node[left] {{\small $\lambda_{13}(t)$
Covariates~$HR_{13}$}} (C);
\path (B) edge [] node[right] {{\small $\lambda_{23}(t)$
Covariates~$HR_{23}$}} (C);
\end{tikzpicture}
#+end_src
#+CAPTION: Basic idea of the model demonstrating the transition states.
#+RESULTS: fig:markovdesc
[[file:~/tmp/plot_markovModel.png]]
--8<---------------cut here---------------end--------------->8---
Regards,
Andreas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Export tikz Figures Issue
2014-01-11 12:48 ` Andreas Leha
@ 2014-01-13 23:47 ` Aric
0 siblings, 0 replies; 3+ messages in thread
From: Aric @ 2014-01-13 23:47 UTC (permalink / raw)
To: emacs-orgmode
Andreas Leha <andreas.leha <at> med.uni-goettingen.de> writes:
> Works for me if I add ':results raw file'. Not sure, this is the
> 'official' solution, though.
That works beautifully, thank you very much!
Aric
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-13 23:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-11 3:58 Export tikz Figures Issue Aric
2014-01-11 12:48 ` Andreas Leha
2014-01-13 23:47 ` Aric
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.