emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Trouble exporting ditaa blocks to latex or html
@ 2011-07-19  1:31 Jeff Mickey
  2011-07-19  1:55 ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Mickey @ 2011-07-19  1:31 UTC (permalink / raw)
  To: emacs-orgmode Org-Mode

Hello!

So I've been trying to use org-babel for the first time recently, and
something that seemed like it would be absolutely wonderful for my
technical notes is ditaa. I've been attempting to export to latex and
then create pdf with a ditaa image for the past little bit, and can't
seem to manage. It produces a pdf just fine doing C-c C-e d, but the
ditaa just has the text in a \verbatim section in the .tex. ditaa is
installed on my system, and I set the jar path. HTML export didn't
work either, also just including the ditaa text. *Messages* didn't
have anything in it of value. I feel like I'm missing something
obvious, so here's some more information about my configuration.

The test org is as follows:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; test.org
* Something
Some text and stuff. Let's see how this exports.

** a subline

* More stuff

* A ditaa diagram
#+begin_src ditaa :file blue.png :cmdline -r
/---------------\
|    test       |
|        {cBLU} |
\---------------/
#+end_src
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; eof

My org configuration can be found on my github page[1]. The relevant
section to org-babel/ditaa is as follows:
;; org export
(setq org-ditaa-jar-path "/usr/local/Cellar/ditaa/0.9/ditaa0_9.jar")
(add-hook 'org-babel-after-execute-hook 'org-display-inline-images)

(setq org-babel-load-languages `((emacs-lisp . t)
(dot . t)
(ditaa . t)
(R . t)
(python . t)
(ruby . t)
(gnuplot . t)
(clojure . t)
(sh . t)
(ledger . t)
(org . t)
(latex . t)))
(setq org-confirm-babel-evaluate nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; eof

Any tips would be greatly appreciated. I've been trying this on org
from git, with this commit for head:
commit 22fa9bf2227b8222580d0b9a59ae0a9c08c4c32a
Author: Bastien Guerry <bzg@altern.org>
Date:   Tue Jul 12 16:56:11 2011 +0200

    org.texi (Special agenda views): Fix double quoting (bug#3509).

    Patch by Lars Magne Ingebrigtsen taken from emacs latest bzr repo.


Thanks for any help, and thanks for all the work on org-mode!

  //  jeff

[1]: https://github.com/codemac/config/blob/master/emacs.d/pkg-init/cm-org.el

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Trouble exporting ditaa blocks to latex or html
  2011-07-19  1:31 Trouble exporting ditaa blocks to latex or html Jeff Mickey
@ 2011-07-19  1:55 ` Eric Schulte
  2011-07-19  2:04   ` Jeff Mickey
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2011-07-19  1:55 UTC (permalink / raw)
  To: Jeff Mickey; +Cc: emacs-orgmode Org-Mode

Hi Jeff,

First off, be sure that evaluation works interactively by pressing C-c
C-c with the cursor on the code block body.

Second, try adding an ":exports results" header argument to the code
block.  Aside from that I fear that the problem may be due to something
in your config given that the example below exports for me as expected.

I'd suggest trying to start emacs with the -Q option, then only a
minimal amount of config required to enable evaluation of ditaa export,
and see if the problem persists.

Best -- Eric

Jeff Mickey <jeff@archlinux.org> writes:

> Hello!
>
> So I've been trying to use org-babel for the first time recently, and
> something that seemed like it would be absolutely wonderful for my
> technical notes is ditaa. I've been attempting to export to latex and
> then create pdf with a ditaa image for the past little bit, and can't
> seem to manage. It produces a pdf just fine doing C-c C-e d, but the
> ditaa just has the text in a \verbatim section in the .tex. ditaa is
> installed on my system, and I set the jar path. HTML export didn't
> work either, also just including the ditaa text. *Messages* didn't
> have anything in it of value. I feel like I'm missing something
> obvious, so here's some more information about my configuration.
>
> The test org is as follows:
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; test.org
> * Something
> Some text and stuff. Let's see how this exports.
>
> ** a subline
>
> * More stuff
>
> * A ditaa diagram
> #+begin_src ditaa :file blue.png :cmdline -r
> /---------------\
> |    test       |
> |        {cBLU} |
> \---------------/
> #+end_src
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; eof
>
> My org configuration can be found on my github page[1]. The relevant
> section to org-babel/ditaa is as follows:
> ;; org export
> (setq org-ditaa-jar-path "/usr/local/Cellar/ditaa/0.9/ditaa0_9.jar")
> (add-hook 'org-babel-after-execute-hook 'org-display-inline-images)
>
> (setq org-babel-load-languages `((emacs-lisp . t)
> (dot . t)
> (ditaa . t)
> (R . t)
> (python . t)
> (ruby . t)
> (gnuplot . t)
> (clojure . t)
> (sh . t)
> (ledger . t)
> (org . t)
> (latex . t)))
> (setq org-confirm-babel-evaluate nil)
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; eof
>
> Any tips would be greatly appreciated. I've been trying this on org
> from git, with this commit for head:
> commit 22fa9bf2227b8222580d0b9a59ae0a9c08c4c32a
> Author: Bastien Guerry <bzg@altern.org>
> Date:   Tue Jul 12 16:56:11 2011 +0200
>
>     org.texi (Special agenda views): Fix double quoting (bug#3509).
>
>     Patch by Lars Magne Ingebrigtsen taken from emacs latest bzr repo.
>
>
> Thanks for any help, and thanks for all the work on org-mode!
>
>   //  jeff
>
> [1]: https://github.com/codemac/config/blob/master/emacs.d/pkg-init/cm-org.el
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Trouble exporting ditaa blocks to latex or html
  2011-07-19  1:55 ` Eric Schulte
@ 2011-07-19  2:04   ` Jeff Mickey
  0 siblings, 0 replies; 3+ messages in thread
From: Jeff Mickey @ 2011-07-19  2:04 UTC (permalink / raw)
  To: Eric Schulte; +Cc: emacs-orgmode Org-Mode

On Mon, Jul 18, 2011 at 18:55, Eric Schulte <schulte.eric@gmail.com> wrote:
> First off, be sure that evaluation works interactively by pressing C-c
> C-c with the cursor on the code block body.

There we go! Did C-c C-c, it complained with: "No org-babel-execute
function for ditaa!", so I searched a bit, and found out my setq line
is incorrect. Instead of setq it should be
org-babel-do-load-languages. Now it all works!

Hurray! Now it works like a champ.

  //  jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-19  2:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-19  1:31 Trouble exporting ditaa blocks to latex or html Jeff Mickey
2011-07-19  1:55 ` Eric Schulte
2011-07-19  2:04   ` Jeff Mickey

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).