Re: [O] Tikz--LaTeX/HTML
On Mon, Mar 26, 2012 at 3:48 AM, Andreas Leha andreas.l...@med.uni-goettingen.de wrote: Andreas Leha andreas.l...@med.uni-goettingen.de writes: Sorry, sent with wrong version, see below: Steve Hafner steve.b.haf...@gmail.com writes: I'm trying to get a LaTeX scr block with Tikz code either to go native into LaTeX or to be converted into a PNG file and included in HTML, as described in http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html. That document refers to a thread on this list in which two example were given: http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01297.html and http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01302.html. Both examples behave in a similar way for me on Org-7.8.06, but not in the way I expected. If I export to PDF then I just get [[file:test.png]] in the PDF where I expected the image to be visible, and if I export to HTML then nothing is visible in the HTML file. Either way I export, the file test.png is indeed generated. So I wonder if these examples are valid with respect to 7.8.06 or maybe my expectations are off. I would not think that the PNG file should be generated for the PDF export, but would expect the image to be visible when viewing either document. Reading the manual, it seems that maybe the behavior has changed in the last year with respect to these examples. So I've tried to figure it out with the manual. If I don't worry about the HTML export, I'm able to set up the document so that the Tikz code is included into LaTeX in the correct way; not too difficult. On the other hand, if I don't worry about the LaTeX export, I can get the PNG file to generate but can't get it automatically included into the HTML. If I could get this second part figured out, then the plan would be to have an elisp conditional testing on backend (if this is still a valid symbol to test on) that would determine whether on not to include :file etc. in the header for the src block. Any thoughts? --Steve Hi Steve, the examples are indeed out-dated. 1) 'backend is now 'org-export-current-backend (though I am not sure, I think there was also 'latexp at some time). 2) If the latex block is evaluated at all and a file argument is present, this will be used. So the block meant to go the latex-PDF route should not contain the :file argument. 3) Even if :results graphics or :results file is specified, the results of a latex block seem to be wrapped in #+begin_latex...#+end_latex. So for the block meant to go to the html, one way is to specify :results org. But here I get a spurious ORG-ORG-START ... Anyway, besides that ORG-ORG-START thing, this seems to work on my side: , | * Tikz test | #+name: contents | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) :results latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) :results file :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '(\\usepackage{tikz}) here it should have been :results org | contents | #+end_src ` Regards, Andreas Best, Andreas PS: BTW, it requires tons of header arguments. These can be split over several lines: , | * Tikz test | #+name: contents | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) | #+header: :results latex | #+begin_src latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) | #+header: :results org :file test.png | #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 | #+header: :fit yes :noweb yes :headers '(\\usepackage{tikz}) | #+begin_src latex | contents | #+end_src ` Thank you, Andreas. It now works as expected. I don't have any problems that I can see with repect to this ORG-ORG-START issue; the exported files I get look clean. For any in-the-dark readers coming across this thread, I needed to put #+LATEX_HEADER: \usepackage{tikz} in my file. Steve
Re: [O] Tikz--LaTeX/HTML
On Mon, Mar 26, 2012 at 9:11 AM, Steve Hafner steve.b.haf...@gmail.com wrote: On Mon, Mar 26, 2012 at 3:48 AM, Andreas Leha andreas.l...@med.uni-goettingen.de wrote: Andreas Leha andreas.l...@med.uni-goettingen.de writes: Sorry, sent with wrong version, see below: Steve Hafner steve.b.haf...@gmail.com writes: I'm trying to get a LaTeX scr block with Tikz code either to go native into LaTeX or to be converted into a PNG file and included in HTML, as described in http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html. That document refers to a thread on this list in which two example were given: http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01297.html and http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01302.html. Both examples behave in a similar way for me on Org-7.8.06, but not in the way I expected. If I export to PDF then I just get [[file:test.png]] in the PDF where I expected the image to be visible, and if I export to HTML then nothing is visible in the HTML file. Either way I export, the file test.png is indeed generated. So I wonder if these examples are valid with respect to 7.8.06 or maybe my expectations are off. I would not think that the PNG file should be generated for the PDF export, but would expect the image to be visible when viewing either document. Reading the manual, it seems that maybe the behavior has changed in the last year with respect to these examples. So I've tried to figure it out with the manual. If I don't worry about the HTML export, I'm able to set up the document so that the Tikz code is included into LaTeX in the correct way; not too difficult. On the other hand, if I don't worry about the LaTeX export, I can get the PNG file to generate but can't get it automatically included into the HTML. If I could get this second part figured out, then the plan would be to have an elisp conditional testing on backend (if this is still a valid symbol to test on) that would determine whether on not to include :file etc. in the header for the src block. Any thoughts? --Steve Hi Steve, the examples are indeed out-dated. 1) 'backend is now 'org-export-current-backend (though I am not sure, I think there was also 'latexp at some time). 2) If the latex block is evaluated at all and a file argument is present, this will be used. So the block meant to go the latex-PDF route should not contain the :file argument. 3) Even if :results graphics or :results file is specified, the results of a latex block seem to be wrapped in #+begin_latex...#+end_latex. So for the block meant to go to the html, one way is to specify :results org. But here I get a spurious ORG-ORG-START ... Anyway, besides that ORG-ORG-START thing, this seems to work on my side: , | * Tikz test | #+name: contents | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) :results latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+begin_src latex :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) :results file :file test.png :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 :fit yes :noweb yes :headers '(\\usepackage{tikz}) here it should have been :results org | contents | #+end_src ` Regards, Andreas Best, Andreas PS: BTW, it requires tons of header arguments. These can be split over several lines: , | * Tikz test | #+name: contents | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) results none) | #+header: :results latex | #+begin_src latex | \begin{tikzpicture} | \node[red!50!black] (a) {A}; | \node (b) [right of=a] {B}; | \draw[-] (a) -- (b); | \end{tikzpicture} | #+end_src | | #+header: :exports (if (and (boundp 'org-export-current-backend) (eq org-export-current-backend 'latex)) none results) | #+header: :results org :file test.png | #+header: :imagemagick yes :iminoptions -density 600 :imoutoptions -geometry 400 | #+header: :fit yes :noweb yes :headers '(\\usepackage{tikz}) | #+begin_src latex | contents | #+end_src ` Thank you, Andreas. It now works as expected. I don't have any problems that I can see with repect to this ORG-ORG-START issue; the exported files I get look clean. Andreas, I just read your bug report about the ORG-ORG-START issue in which you say the problem disappears with removal of indentation, and in fact I had removed the indentation. Leaving it in I get excess junk. Steve For any in-the-dark readers coming across this thread, I needed to put #+LATEX_HEADER: \usepackage{tikz} in my file. Steve
[O] Tikz--LaTeX/HTML
I'm trying to get a LaTeX scr block with Tikz code either to go native into LaTeX or to be converted into a PNG file and included in HTML, as described in http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html. That document refers to a thread on this list in which two example were given: http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01297.html and http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01302.html. Both examples behave in a similar way for me on Org-7.8.06, but not in the way I expected. If I export to PDF then I just get [[file:test.png]] in the PDF where I expected the image to be visible, and if I export to HTML then nothing is visible in the HTML file. Either way I export, the file test.png is indeed generated. So I wonder if these examples are valid with respect to 7.8.06 or maybe my expectations are off. I would not think that the PNG file should be generated for the PDF export, but would expect the image to be visible when viewing either document. Reading the manual, it seems that maybe the behavior has changed in the last year with respect to these examples. So I've tried to figure it out with the manual. If I don't worry about the HTML export, I'm able to set up the document so that the Tikz code is included into LaTeX in the correct way; not too difficult. On the other hand, if I don't worry about the LaTeX export, I can get the PNG file to generate but can't get it automatically included into the HTML. If I could get this second part figured out, then the plan would be to have an elisp conditional testing on backend (if this is still a valid symbol to test on) that would determine whether on not to include :file etc. in the header for the src block. Any thoughts? --Steve
Re: [O] LaTeX export
Hi Bastien, Thanks a lot, this really works, and it sounds like literate programming. Can you suggest some quick reading on using org-mode for literate programming? Happy new year, York Read Chapter 14 of the Org-mode manual. And go to http://orgmode.org/worg/ and search with the keyword literate.
[Orgmode] Re: Hyperlink to a string in an external text file
Ok, I see that 4.7 Search options in file links generalizes the info in 4.3 External links and includes my case, sorry for the noise. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Hyperlink to a string in an external text file
On Mon, Jan 17, 2011 at 3:36 PM, Samuel Wales samolog...@gmail.com wrote: A good way to determin this is using capture from the file you want and look at the link it creates. -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com I support WPI: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE === I want to see the original (pre-hold) Lo et al. 2010 NIH/FDA/Harvard MLV paper. I assume you are referring to org-store-link, and yes this is helpful. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Executing functions remotely from agenda
On Wed, Jan 5, 2011 at 5:13 AM, Matt Lundin m...@imapmail.org wrote: Steve Hafner steve.b.haf...@gmail.com writes: On Tue, Jan 4, 2011 at 9:22 PM, Matt Lundin m...@imapmail.org wrote: Steve Hafner steve.b.haf...@gmail.com writes: I've written a few elisp functions to edit entries, and I would like to be able to execute them remotely from the agenda; but it seems no hooks or other facilities exist to do so. Am I missing something? (info (org) Using the mapping API) http://orgmode.org/manual/Using-the-mapping-API.html Best, Matt OK, I'm able to run elisp commands remotely from an agenda buffer using org-map-entries; but what I'd really like to do is specifically target the current item, and I don't see what expression for MATCH would only match the current item. By current item I mean the entry corresponding to the line that point is on within the agenda buffer. Ah. I see. I misread remotely from agenda as not in the agenda. You can jump to the current entry in a number of ways. There is the function org-agenda-goto. Within the agenda, you can also get the markers for the current entry with: (org-get-at-bol 'org-marker) (org-get-at-bol 'org-hd-marker) You can use these markers (usually with save-excursion or save-window-excursion) to jump to the function and alter it. The code of org-agenda-todo provides a nice example of this. Thanks for the directions! The org-agenda-todo code with modifications does the job I wanted. It would be nice if this functionality were abstracted a bit in org-agenda.el. Right now, each of the org-agenda editing commands (org-agenda-todo, org-agenda-set-tags, org-agenda-priority, org-agenda-add-note, etc.) reimplements the same behavior. Indeed. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Placing special properties in the properties drawer
Hello, Is there any easy way to have the special properties TODO, SCHEDULED, TAGS, etc be placed in the properties drawer? -Steve ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Executing functions remotely from agenda
I've written a few elisp functions to edit entries, and I would like to be able to execute them remotely from the agenda; but it seems no hooks or other facilities exist to do so. Am I missing something? -steve ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Executing functions remotely from agenda
On Tue, Jan 4, 2011 at 9:22 PM, Matt Lundin m...@imapmail.org wrote: Steve Hafner steve.b.haf...@gmail.com writes: I've written a few elisp functions to edit entries, and I would like to be able to execute them remotely from the agenda; but it seems no hooks or other facilities exist to do so. Am I missing something? (info (org) Using the mapping API) http://orgmode.org/manual/Using-the-mapping-API.html Best, Matt OK, I'm able to run elisp commands remotely from an agenda buffer using org-map-entries; but what I'd really like to do is specifically target the current item, and I don't see what expression for MATCH would only match the current item. By current item I mean the entry corresponding to the line that point is on within the agenda buffer. -steve ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Manual typos/dead link
In the recent org manual, 3294 @lisp 3295 (add-hook 'org-load-hook 3296 (lambda () 3297 (define-key 'org-mode-map \C-n 'org-next-link) 3298 (define-key 'org-mode-map \C-p 'org-previous-link))) 3299 @end lisp I think should be 3294 @lisp 3295 (add-hook 'org-load-hook 3296 (lambda () 3297 (define-key org-mode-map \C-n 'org-next-link) 3298 (define-key org-mode-map \C-p 'org-previous-link))) 3299 @end lisp Also, in section 15.10.1 Packages that Org cooperates with under the item calc.el by Dave Gillespie, the link See Embedded Mode is dead. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] ob-lisp missing
Why has ob-lisp.el been in the git tree since August, but it is not in the stable release nor mentioned in the manual? Anyway, thanks David and Eric for coding this. Steve ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode