Re: [Orgmode] Re: [babel] dot in pdf directly

2009-11-10 Thread Sebastian Rose
andrea Crotti andrea.crott...@gmail.com writes:
 Eric Schulte schulte.eric at gmail.com writes:

 
 The two separate mechanisms are confusion, but for now are necessary to
 allow org-mode users to evaluate some simple block types (like dot) on
 export without having to load up all of org-babel.
 
 I hope the above isn't too confusing :) -- Eric
 


 No no thanks a lot not it's very clear.
 Coming back to my original question, am I able to insert directly
 the eps generated in my final generated pdf??

 Maybe I have to
 #+begin_dot -Tpdf -o file.pdf
 ...
 #+end_dot

 And then somewhere write some latex code to include it?
 #+begin_latex
 \includegraphics..
 #+end_latex

Yes, you can include the eps image like this at any point - not sure if
you need to run the export twice, once the dot block changes.


But the dot block itself will always be executed and replaced by the
resulting image. This is absolutely fine in 99% of all cases.

Suppose you want to refer to the image several times, how about this
then: 

   1. Create a file your-org-directory/images/images.org
   2. Put all images into that file, that you need to reference more
  than once, or that you need to be out of sight to avoid clutter.
   3. Include your images using the relative path to
  ../your-org-directory/images/resulting-image.eps 




Sebastian


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [babel] dot in pdf directly

2009-11-10 Thread Eric Schulte
Sebastian Rose sebastian_r...@gmx.de writes:

 andrea Crotti andrea.crott...@gmail.com writes:
 Eric Schulte schulte.eric at gmail.com writes:

 
 The two separate mechanisms are confusion, but for now are necessary to
 allow org-mode users to evaluate some simple block types (like dot) on
 export without having to load up all of org-babel.
 
 I hope the above isn't too confusing :) -- Eric
 


 No no thanks a lot not it's very clear.
 Coming back to my original question, am I able to insert directly
 the eps generated in my final generated pdf??

 Maybe I have to
 #+begin_dot -Tpdf -o file.pdf
 ...
 #+end_dot

 And then somewhere write some latex code to include it?
 #+begin_latex
 \includegraphics..
 #+end_latex

 Yes, you can include the eps image like this at any point - not sure if
 you need to run the export twice, once the dot block changes.


 But the dot block itself will always be executed and replaced by the
 resulting image. This is absolutely fine in 99% of all cases.

 Suppose you want to refer to the image several times, how about this
 then: 

1. Create a file your-org-directory/images/images.org
2. Put all images into that file, that you need to reference more
   than once, or that you need to be out of sight to avoid clutter.
3. Include your images using the relative path to
   ../your-org-directory/images/resulting-image.eps 


Note that the solution I'm about to propose relies on the use of
org-babel and #+begin_src dot blocks rather than #+begin_dot blocks.

When in these situations I will often set the block so that neither the
code or the resulting image is exported, and so that the results of
block evaluation are silent.

#+begin_src dot :file file.pdf :cmdline -Tpdf :exports none :results silent
...
#+end_src

Then I manually add file links to the image throughout my document.

[[file:file.pdf]]

Whenever I change the contents of the block I manually re-evaluate the
block with C-c C-c and the image to which all of the links point is
updated.

Best -- Eric





 Sebastian


 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: [babel] dot in pdf directly

2009-11-10 Thread Eric Schulte
andrea Crotti andrea.crott...@gmail.com writes:

 Eric Schulte schulte.eric at gmail.com writes:

 Note that the solution I'm about to propose relies on the use of
 org-babel and #+begin_src dot blocks rather than #+begin_dot blocks.
 
 When in these situations I will often set the block so that neither the
 code or the resulting image is exported, and so that the results of
 block evaluation are silent.
 
 #+begin_src dot :file file.pdf :cmdline -Tpdf :exports none :results silent
 ...
 #+end_src
 
 Then I manually add file links to the image throughout my document.
 
 [[file:file.pdf]]
 
 Whenever I change the contents of the block I manually re-evaluate the
 block with C-c C-c and the image to which all of the links point is
 updated.
 
 Best -- Eric
 

 Ok that's really perfect!
 The only problem is that it keeps exporting the code even without
 the :exports none, maybe I need some newlines?

  s2
 #+BEGIN_SRC dot :file s2.pdf :cmdline -Tpdf :exports none :results silent
 digraph s1 {
 t1;
 t2;
 }
 #+END_SRC

 [[file:s2.pdf]]


Hi Andrea,

there was a bug related to capitalization in org-exp-blocks, I've fixed
this bug in the head of the org-mode git repo.  Please grab the latest
org-mode and see if you problem persists.

Best -- Eric


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode