* Re: The ditaa picture
[not found] ` <87iqagn31k.fsf@gmail.com>
@ 2010-02-02 8:08 ` Chao Lu
0 siblings, 0 replies; 4+ messages in thread
From: Chao Lu @ 2010-02-02 8:08 UTC (permalink / raw)
To: Eric Schulte; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 7465 bytes --]
Hey Eric,
Thanks for you tip, but I guess the dvipng command works well. Things get
kind of strange, since if I type $2^6$, Org recognizes it, and generates the
right results, which means, it could find all the latex package needed. But
if I try
--------
#+BEGIN_LaTeX
\begin{equation} % arbitrary environments,
x=\sqrt{b} % even tables, figures
\end{equation} % etc
#+END_LaTeX
--------
It will end up with some strange picture in ltxpng directory, which is just
all black, nothing...
Do you have any idea?
Thanks a lot!
Chao
On Mon, Feb 1, 2010 at 2:56 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
> Hey Chao,
>
> Chao Lu <chaol@princeton.edu> writes:
>
> > Hey Eric,
> >
> > Now it works! Thank you soooo much. I'll read through the reference,
> sorry to bother you
> > so much, a little busy on research.
> >
>
> I'm happy to help.
>
> >
> > And, Could I ask for more... Say, are you using Org to generate LaTeX or
> beamer, by any
> > chance? If so, I'm trying to configure the LaTeX part, my Org has been
> able to find the
> > dvipng and latex bins, for it recognized the LaTeX blocks, and produced
> the images in
> > the ltxpng dir. But problems the images it generated is just black, with
> nothing... Do
> > you have any idea?
> >
>
> Hmm, I do use org for both latex and Beamer presentations, it sounds
> like what you're describing is an issue during the preview of latex
> fragments from within org-mode files?
>
> I've had problems with that in the past, but they've mainly ended up
> being issue with org finding and using my dvipng command. I'd take a
> look at your messages buffer, and if you continue to have problems you
> can submit a bug report to the org-mode mailing list.
>
> Good Luck -- Eric
>
> >
> > Best,
> >
> > Chao
> >
> > On Mon, Feb 1, 2010 at 2:00 PM, Eric Schulte <schulte.eric@gmail.com>
> wrote:
> >
> > Hi Chao,
> >
> > Try the following alternative to your statement
> >
> > ----------
> > #+begin_src emacs-lisp :exports results
> > (defun fibonacci (n)
> > (if (or (= n 0) (= n 1))
> > n
> > (+ (fibonacci (- n 1)) (fibonacci (- n 2)))))
> >
> > (mapcar (lambda (row)
> > (mapcar #'fibonacci row)) fib-inputs)
> > #+end_src
> > ----------
> >
> > for more information on Org-babel see [1], and specifically for more
> > information on the use of header arguments like :exports see [2].
> >
> > Best -- Eric
> >
> > Chao Lu <chaol@princeton.edu> writes:
> >
> > > Hey Eric,
> > >
> > > Thanks again for your instruction, now it works well. But could I
> ask more about
> > > org-babel?
> > >
> > > Actually I tried to enabled it by:
> > > -----------
> > > (require 'org-babel-init)
> > > (require 'org-babel-ditaa)
> > > (org-babel-load-library-of-babel)
> > > -----------
> > >
> > > Then tried to evaluate it by
> > > ----------
> > > #+begin_src emacs-lisp
> > > (defun fibonacci (n)
> > > (if (or (= n 0) (= n 1))
> > > n
> > > (+ (fibonacci (- n 1)) (fibonacci (- n 2)))))
> > >
> > > (mapcar (lambda (row)
> > > (mapcar #'fibonacci row)) fib-inputs)
> > > #+end_src
> > > ----------
> > >
> > > But seems did not get what I want, which should be a series of
> numbers, what I got
> > from
> > > is just a colored output when I export this file to html.
> > >
> > > Would you mind explain a little bit?
> > >
> > > Many thanks,
> > >
> > > Chao
> > >
> > > On Mon, Feb 1, 2010 at 10:40 AM, Eric Schulte <
> schulte.eric@gmail.com> wrote:
> > >
> > > Chao Lu <loochao@gmail.com> writes:
> > >
> > > > Hey Eric,
> > > >
> > > > Thanks for the tip, it works well here!
> > > >
> > > > Yet another further question, is it possible to assign the
> directory where
> > the
> > > picture
> > > > should be exported to? For it is kind of messy if all the
> figures goes to
> > the root
> > > > directory.
> > > >
> > >
> > > Yes, just add it to the :file name, i.e.
> > >
> > > #+begin_src ditaa :file data/communication.png :exports results
> > >
> > > Best -- Eric
> > >
> > > >
> > > > Thanks a lot for your help,
> > > >
> > > > Chao
> > > >
> > > > On Sat, Jan 30, 2010 at 7:46 PM, Eric Schulte <
> schulte.eric@gmail.com>
> > wrote:
> > > >
> > > > Hi Chao,
> > > >
> > > > I don't believe that it is currently possible to
> customize the file
> > > > names in the ways you have described using the standard
> begin_ditaa
> > > > blocks. It is possible to have complete control over the
> file names
> > > > using org-babel, in which case the corresponding block
> would look like
> > > >
> > > > --------
> > > > #+begin_src ditaa :file communication.png :exports
> results
> > > >
> > > > blabla
> > > >
> > > > #+end_src
> > > > --------
> > > >
> > > > then the image will be created on export, and you can
> also preview the
> > > > image by pressing C-c C-o on the block.
> > > >
> > > > To activate org-babel add the following to your Emacs
> configuration
> > > >
> > > > (require 'org-babel-init)
> > > > (require 'org-babel-ditaa)
> > > >
> > > > Best -- Eric
> > > >
> > > > Chao Lu <loochao@gmail.com> writes:
> > > >
> > > > > Dear all,
> > > > >
> > > > > When I'm using the ditaa in a org file called
> pearl.org, by
> > > > >
> > > > > --------
> > > > > #+begin_ditaa communication.png
> > > > >
> > > > > blabla
> > > > >
> > > > > #+end_ditaa
> > > > > --------
> > > > >
> > > > > It generates a file called
> > > >
> communication_5e2f49c31c46339e8e3af9ef8a2fd2dfa3d1fe74.png,
> > > > > but this picture is right located at the same file as
> the org file(
> > pearl.org
> > > ). Is
> > > > it
> > > > > possible to let it go to certain dir like the latex
> pictures do? And
> > is it
> > > > possible to
> > > > > let the generated picture has the prefix of the org
> file name
> > automatically,
> > > like
> > > > >
> org_communication_5e2f49c31c46339e8e3af9ef8a2fd2dfa3d1fe74.png?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Chao
> > > > >
> > > > > _______________________________________________
> > > > > 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
> >
> > Footnotes:
> > [1] http://orgmode.org/worg/org-contrib/babel/
> >
> > [2] http://orgmode.org/worg/org-contrib/babel/reference.php
>
[-- Attachment #1.2: Type: text/html, Size: 10399 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 4+ messages in thread