* Best way of including tikz into latex (pdf and beamer) export with preview? @ 2016-05-12 8:45 Rainer M Krug 2016-05-17 10:30 ` Rasmus ` (2 more replies) 0 siblings, 3 replies; 5+ messages in thread From: Rainer M Krug @ 2016-05-12 8:45 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 560 bytes --] Hi What is the best way of including tikz into org for latex export (beamer and pdf), and to have preview as well? Thanks, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 454 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Best way of including tikz into latex (pdf and beamer) export with preview? 2016-05-12 8:45 Best way of including tikz into latex (pdf and beamer) export with preview? Rainer M Krug @ 2016-05-17 10:30 ` Rasmus 2016-05-17 21:44 ` briangpowell . 2016-05-19 9:25 ` Myles English 2 siblings, 0 replies; 5+ messages in thread From: Rasmus @ 2016-05-17 10:30 UTC (permalink / raw) To: emacs-orgmode Rainer M Krug <Rainer@krugs.de> writes: > What is the best way of including tikz into org for latex export (beamer > and pdf), I typically create tikz images with R tikzDevice or matplotlib. In this case, it’s useful to refer to the generated file: file:link/to/pix.tikz > and to have preview as well? I believe you’d have to include the code directly in the Org file to make the preview of latex fragments work. If this is essential, you could do something like this: #+latex_header: \usepackage{tikz} #+Caption: A special block that’s a figure with a tikz picture. #+begin_figure \begin{tikzpicture} \input{t.tikz} % raw tikz-content w/o \begin{}/end{} \end{tikzpicture} #+end_figure See also the tikz section on ob-latex in worg: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html#sec-4-3 Rasmus -- Hooray! ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Best way of including tikz into latex (pdf and beamer) export with preview? 2016-05-12 8:45 Best way of including tikz into latex (pdf and beamer) export with preview? Rainer M Krug 2016-05-17 10:30 ` Rasmus @ 2016-05-17 21:44 ` briangpowell . 2016-05-19 9:25 ` Myles English 2 siblings, 0 replies; 5+ messages in thread From: briangpowell . @ 2016-05-17 21:44 UTC (permalink / raw) To: Rainer M Krug; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 926 bytes --] * ImageMagick is great for shrinking images and/or making thumbnails for previews and/or maybe the emacs elisp program "thumbs.el" will help: ;;; thumbs.el --- Thumbnails previewer for images files ;;; ;; Author: Jean-Philippe Theberge <jphiltheberge@videotron.ca> ... On Thu, May 12, 2016 at 4:45 AM, Rainer M Krug <Rainer@krugs.de> wrote: > Hi > > What is the best way of including tikz into org for latex export (beamer > and pdf), and to have preview as well? > > Thanks, > > Rainer > > -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation > Biology, UCT), Dipl. Phys. (Germany) > > Centre of Excellence for Invasion Biology > Stellenbosch University > South Africa > > Tel : +33 - (0)9 53 10 27 44 > Cell: +33 - (0)6 85 62 59 98 > Fax : +33 - (0)9 58 10 27 44 > > Fax (D): +49 - (0)3 21 21 25 22 44 > > email: Rainer@krugs.de > > Skype: RMkrug > > PGP: 0x0F52F982 > [-- Attachment #2: Type: text/html, Size: 1844 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Best way of including tikz into latex (pdf and beamer) export with preview? 2016-05-12 8:45 Best way of including tikz into latex (pdf and beamer) export with preview? Rainer M Krug 2016-05-17 10:30 ` Rasmus 2016-05-17 21:44 ` briangpowell . @ 2016-05-19 9:25 ` Myles English 2016-05-19 13:07 ` Russell Adams 2 siblings, 1 reply; 5+ messages in thread From: Myles English @ 2016-05-19 9:25 UTC (permalink / raw) To: Rainer M Krug; +Cc: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 684 bytes --] Hello Rainer, Rainer M Krug writes: > What is the best way of including tikz into org for latex export > (beamer and pdf), and to have preview as well? I don't know, but I do remember that using the `standalone' document class was useful because you can keep the tikz picture in its own .tex file, develop it using command line processing to pdf and, when it is ready, use it in in several different documents (report, poster, thesis) by including the .tex file file. Not sure about previewing though. Sorry I can't find a comprehensive example but here is an example usage of standalone: http://drvinceknight.blogspot.co.uk/2013/04/makefiles-for-tikz-sagemath-and.html Myles [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 818 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Best way of including tikz into latex (pdf and beamer) export with preview? 2016-05-19 9:25 ` Myles English @ 2016-05-19 13:07 ` Russell Adams 0 siblings, 0 replies; 5+ messages in thread From: Russell Adams @ 2016-05-19 13:07 UTC (permalink / raw) To: emacs-orgmode On Thu, May 19, 2016 at 10:25:09AM +0100, Myles English wrote: > > What is the best way of including tikz into org for latex export > > (beamer and pdf), and to have preview as well? I have used R in the past to generate two outputs for a given graph, one PNG and one PDF from a source block in my Org file. Then immediately under the source block I would put a commented out file link so that Org's inline image display would show it to me. Then I used the latex include command beneath to include the PDF for the final output. This let me preview and have high quality output. Sample code: #+BEGIN_SRC R :session *R-Buffer* :tangle myfile.R :exports none :results none silent :var basename="playerAging" doublePlot = function (base, plotFunc, pngopts = c( width = 1024, height = 500 ), pdfopts = c( width = 10, height = 7.5, paper = 'usr') ) { # basename from org-babel myPng = paste(base,"png",sep=".") myPdf = paste(base,"pdf",sep=".") png(myPng, pngopts ) plotFunc() dev.off() pdf(myPdf, pdfopts) plotFunc() dev.off() } doublePlot(base=basename, plotFunc = function() { plot(players$last_save,players$age,main="Player Age vs Last Login") grid(col="gray",lty=2) }) #+END_SRC # [[file:playerAging.png]] #+LATEX: \includegraphics[width=\textwidth]{playerAging.pdf}\newpage ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-19 13:08 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-05-12 8:45 Best way of including tikz into latex (pdf and beamer) export with preview? Rainer M Krug 2016-05-17 10:30 ` Rasmus 2016-05-17 21:44 ` briangpowell . 2016-05-19 9:25 ` Myles English 2016-05-19 13:07 ` Russell Adams
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.