Re: [O] tikz for multiple targets

2013-07-16 Thread Eric S Fraga
Andreas Leha writes: [...] > But since you have a dedicated latex export-only block, the simplest > solution would be to put the caption inside: D'uh! That is so obvious (in hindsight ;-) ... thanks! -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.5-337-g9f3bed

Re: [O] tikz for multiple targets

2013-07-16 Thread Andreas Leha
Hi Eric, Eric S Fraga writes: > Hi Eric et al., > > I now have a system I am happy with mostly for using LaTeX code blocks > heading to multiple export targets. The solution I am using is a > combination of what has been discussed in this thread (by-backend > customisation of headers for babel)

Re: [O] tikz for multiple targets

2013-07-16 Thread Eric S Fraga
Hi Eric et al., I now have a system I am happy with mostly for using LaTeX code blocks heading to multiple export targets. The solution I am using is a combination of what has been discussed in this thread (by-backend customisation of headers for babel) and using noweb substitution for the main c

Re: [O] tikz for multiple targets

2013-07-15 Thread Eric S Fraga
Eric Schulte writes: [...] > My patch introduced a new variable `org-babel-latex-htlatex-packages' > which controls the packages added to these latex to SVG code block > snippets. The following should work. > > (push "{your-package}" org-babel-latex-htlatex-packages) Yes, thanks, I found thi

Re: [O] tikz for multiple targets

2013-07-11 Thread Eric Schulte
Eric S Fraga writes: > Eric Schulte writes: > >>> >>> This is very nice and works well for me. I would very much like to see >>> that in orgmode. Thanks a lot! >>> >> >> Great, I've just committed this patch. Thanks for your original example >> which this simply extends. > > Thanks for this E

Re: [O] tikz for multiple targets

2013-07-11 Thread Andreas Leha
Hi Eric, Eric Schulte writes: >> Thanks for the quick answer. I am aware, that imagemagick is needed. >> Let me rephrase my question using your example: >> >>> #+LATEX_HEADER: \usepackage{tikz} >>> >>> First execute the second code block, to define the convenience macro >>> and to set the requi

Re: [O] tikz for multiple targets

2013-07-11 Thread Eric S Fraga
Eric Schulte writes: >> >> This is very nice and works well for me. I would very much like to see >> that in orgmode. Thanks a lot! >> > > Great, I've just committed this patch. Thanks for your original example > which this simply extends. Thanks for this Eric! I've tried it out just now (on

Re: [O] tikz for multiple targets

2013-07-11 Thread Eric Schulte
> Thanks for the quick answer. I am aware, that imagemagick is needed. > Let me rephrase my question using your example: > >> #+LATEX_HEADER: \usepackage{tikz} >> >> First execute the second code block, to define the convenience macro >> and to set the required new variables in ob-latex.el. Then

Re: [O] tikz for multiple targets

2013-07-11 Thread Andreas Leha
Hi Eric, Eric Schulte writes: >> >> This is very nice and works well for me. I would very much like to see >> that in orgmode. Thanks a lot! >> > > Great, I've just committed this patch. Thanks for your original example > which this simply extends. > >> >> How do I extend your example to outp

Re: [O] tikz for multiple targets

2013-07-11 Thread Eric Schulte
> > This is very nice and works well for me. I would very much like to see > that in orgmode. Thanks a lot! > Great, I've just committed this patch. Thanks for your original example which this simply extends. > > How do I extend your example to output latex for latex, svg for html and > png in

Re: [O] tikz for multiple targets

2013-07-11 Thread Eric Schulte
Rasmus writes: > Eric Schulte writes: > > >> Building from this example, the attached patch to ob-latex.el combined >> with the attached org-mode file should export the latex (tikz) code as >> an inline SVG image to HTML and as embedded tikz to latex. >> >> If this works generally I can commit t

Re: [O] tikz for multiple targets

2013-07-11 Thread Eric Schulte
Eric S Fraga writes: > Andreas Leha writes: > >> Hi Eric, >> > > [...] > >> I updated the example again. Try this: > > Brilliant. Thanks. This works perfectly. I can see the changes you've > made and they make sense (in hindsight for me) except for the (intern > "latex") bit... but this is p

Re: [O] tikz for multiple targets

2013-07-11 Thread Andreas Leha
Hi Eric, Eric Schulte writes: >> >> I updated the example again. Try this: >> >> --8<---cut here---start->8--- >> #+LATEX_HEADER: \usepackage{tikz} >> >> * Tikz test >> #+name: contents >> #+header: :exports (if (and (boundp 'backend) (eq (org-export-backend-

Re: [O] tikz for multiple targets

2013-07-11 Thread Rasmus
Eric Schulte writes: > Building from this example, the attached patch to ob-latex.el combined > with the attached org-mode file should export the latex (tikz) code as > an inline SVG image to HTML and as embedded tikz to latex. > > If this works generally I can commit the patch to ob-latex.el.

Re: [O] tikz for multiple targets

2013-07-11 Thread Eric S Fraga
Andreas Leha writes: > Hi Eric, > [...] > I updated the example again. Try this: Brilliant. Thanks. This works perfectly. I can see the changes you've made and they make sense (in hindsight for me) except for the (intern "latex") bit... but this is probably to do with how eq works I guess.

Re: [O] tikz for multiple targets

2013-07-10 Thread Eric Schulte
> > I updated the example again. Try this: > > --8<---cut here---start->8--- > #+LATEX_HEADER: \usepackage{tikz} > > * Tikz test > #+name: contents > #+header: :exports (if (and (boundp 'backend) (eq (org-export-backend-name > backend) (intern "latex"))) "resul

Re: [O] tikz for multiple targets

2013-07-10 Thread Andreas Leha
Hi Eric, Eric S Fraga writes: > Rasmus writes: > > [...] > >> Tikz/pgf works for the latex exporter. Just insert it as a file link >> (with extension tikz or pgf) or as latex verbatim code. > > Yes, thanks. However, I guess I didn't explain very well what I was > looking for. > > I use tikz

Re: [O] tikz for multiple targets

2013-07-10 Thread Eric S Fraga
Rasmus writes: [...] > Tikz/pgf works for the latex exporter. Just insert it as a file link > (with extension tikz or pgf) or as latex verbatim code. Yes, thanks. However, I guess I didn't explain very well what I was looking for. I use tikz all the time and typically enclose it in a #+beg

Re: [O] tikz for multiple targets

2013-07-10 Thread Fabrice Popineau
And did anybody tried the svg backend available from tikz, rather than relying on pdf conversion? Fabrice 2013/7/10 Rasmus > Rasmus writes: > > >> Is what I want possible with the new exporter? If so, I imagine the > >> test for the backend must be different now. Any pointers very welcome!

Re: [O] tikz for multiple targets

2013-07-10 Thread Rasmus
Rasmus writes: >> Is what I want possible with the new exporter? If so, I imagine the >> test for the backend must be different now. Any pointers very welcome! > > It needs to be added to `org-html-inline-image-rules' and some > potential translation should be added to org-html-inline-image-p,

Re: [O] tikz for multiple targets

2013-07-10 Thread Rasmus
Eric S Fraga writes: > Hello again, > > I am trying to get an example that worked with the old exporter to work > with the new exporter. The aim is to have a tikzpicture exported to > both LaTeX and HTML. The example is in the following message from over > a year ago now: > > http://article.gma

[O] tikz for multiple targets

2013-07-09 Thread Eric S Fraga
Hello again, I am trying to get an example that worked with the old exporter to work with the new exporter. The aim is to have a tikzpicture exported to both LaTeX and HTML. The example is in the following message from over a year ago now: http://article.gmane.org/gmane.emacs.orgmode/53900 Thi