From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Lu Subject: Re: The ditaa picture Date: Tue, 2 Feb 2010 03:08:46 -0500 Message-ID: <3cbb63d01002020008m6f7497f1qb01dc84cd3c685ec@mail.gmail.com> References: <3cbb63d01001290027p3dc23567jfcfa31f2fed7dd89@mail.gmail.com> <87eil7nlrl.fsf@gmail.com> <3cbb63d01001312219h677def3ft9c11b83e421113fe@mail.gmail.com> <87zl3tm0bi.fsf@gmail.com> <3cbb63d01002011011h5c88ac3v3f6e7f8f821e95c9@mail.gmail.com> <87ock8n5m3.fsf@gmail.com> <3cbb63d01002011135t5574b42ajfbb5f980a710663b@mail.gmail.com> <87iqagn31k.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1572663254==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NcDp0-000548-PE for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 03:09:18 -0500 Received: from [140.186.70.92] (port=36962 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NcDox-00053n-DO for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 03:09:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NcDou-0003Cm-0c for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 03:09:14 -0500 Received: from mail-gx0-f211.google.com ([209.85.217.211]:39287) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NcDoq-0003CI-Q8 for emacs-orgmode@gnu.org; Tue, 02 Feb 2010 03:09:10 -0500 Received: by gxk3 with SMTP id 3so5174982gxk.6 for ; Tue, 02 Feb 2010 00:09:06 -0800 (PST) In-Reply-To: <87iqagn31k.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: emacs-orgmode@gnu.org --===============1572663254== Content-Type: multipart/alternative; boundary=0016e68ee3dc9b12df047e999d2f --0016e68ee3dc9b12df047e999d2f Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > Hey Chao, > > Chao Lu 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 > 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 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 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 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 > --0016e68ee3dc9b12df047e999d2f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hey Eric,

Thanks for you tip, but I guess the dvipng command works w= ell. 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 p= ackage needed. But if I try

--------
#+BEGIN_LaTeX
=A0=A0=A0 \begin{equation}=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 % arbitrary en= vironments,
=A0=A0=A0 x=3D\sqrt{b}=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 % even tables, fi= gures
=A0=A0=A0 \end{equation}=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 % etc
#+END_LaTeX
--------

It will end up with some strange picture in = ltxpng directory, which is just all black, nothing...

Do you have an= y idea?

Thanks a lot!

Chao

On Mon, Feb 1, 2010 at 2:56 PM, Eric Schulte <schulte.eric@gmail.com> wr= ote:
Hey Chao,

Chao Lu <chaol@princeton.edu&= gt; writes:

> Hey Eric,
>
> Now it works! Thank you soooo much. I'll r= ead 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 produce= d the images in
> the ltxpng dir. But problems the images it generated is just black, wi= th nothing... Do
> you have any idea?
>

Hmm, I do use org for both latex and Beamer presentations, it sounds<= br> 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 u= p
being issue with org finding and using my dvipng command. =A0I'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:
>
> =A0 =A0 Hi Chao,
>
> =A0 =A0 Try the following alternative to your statement
>
> =A0 =A0 ----------
> =A0 =A0 #+begin_src emacs-lisp :exports results
> =A0 =A0 =A0(defun fibonacci (n)
> =A0 =A0 =A0 =A0(if (or (=3D n 0) (=3D n 1))
> =A0 =A0 =A0 =A0 =A0 =A0n
> =A0 =A0 =A0 =A0 =A0(+ (fibonacci (- n 1)) (fibonacci (- n 2)))))
>
> =A0 =A0 =A0(mapcar (lambda (row)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(mapcar #'fibonacci row)) fib-input= s)
> =A0 =A0 #+end_src
> =A0 =A0 ----------
>
> =A0 =A0 for more information on Org-babel see [1], and specifically fo= r more
> =A0 =A0 information on the use of header arguments like :exports see [= 2].
>
> =A0 =A0 Best -- Eric
>
> =A0 =A0 Chao Lu <chaol@princ= eton.edu> writes:
>
> =A0 =A0 > Hey Eric,
> =A0 =A0 >
> =A0 =A0 > Thanks again for your instruction, now it works well. But= could I ask more about
> =A0 =A0 > org-babel?
> =A0 =A0 >
> =A0 =A0 > Actually I tried to enabled it by:
> =A0 =A0 > -----------
> =A0 =A0 > (require 'org-babel-init)
> =A0 =A0 > (require 'org-babel-ditaa)
> =A0 =A0 > (org-babel-load-library-of-babel)
> =A0 =A0 > -----------
> =A0 =A0 >
> =A0 =A0 > Then tried to evaluate it by
> =A0 =A0 > ----------
> =A0 =A0 > #+begin_src emacs-lisp
> =A0 =A0 > =A0 (defun fibonacci (n)
> =A0 =A0 > =A0=A0=A0 (if (or (=3D n 0) (=3D n 1))
> =A0 =A0 > =A0=A0=A0=A0=A0=A0=A0 n
> =A0 =A0 > =A0=A0=A0=A0=A0 (+ (fibonacci (- n 1)) (fibonacci (- n 2)= ))))
> =A0 =A0 > =A0
> =A0 =A0 > =A0 (mapcar (lambda (row)
> =A0 =A0 > =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (mapcar #'fibonacci= row)) fib-inputs)
> =A0 =A0 > #+end_src
> =A0 =A0 > ----------
> =A0 =A0 >
> =A0 =A0 > But seems did not get what I want, which should be a seri= es of numbers, what I got
> =A0 =A0 from
> =A0 =A0 > is just a colored output when I export this file to html.=
> =A0 =A0 >
> =A0 =A0 > Would you mind explain a little bit?
> =A0 =A0 >
> =A0 =A0 > Many thanks,
> =A0 =A0 >
> =A0 =A0 > Chao
> =A0 =A0 >
> =A0 =A0 > On Mon, Feb 1, 2010 at 10:40 AM, Eric Schulte <schulte.eric@gmail.com> wrote: > =A0 =A0 >
> =A0 =A0 > =A0 =A0 Chao Lu <= loochao@gmail.com> writes:
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 > Hey Eric,
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > Thanks for the tip, it works well here!
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > Yet another further question, is it possible= to assign the directory where
> =A0 =A0 the
> =A0 =A0 > =A0 =A0 picture
> =A0 =A0 > =A0 =A0 > should be exported to? For it is kind of mes= sy if all the figures goes to
> =A0 =A0 the root
> =A0 =A0 > =A0 =A0 > directory.
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 Yes, just add it to the :file name, i.e.
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 #+begin_src ditaa :file data/communication.png :e= xports results
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 Best -- Eric
> =A0 =A0 >
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > Thanks a lot for your help,
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > Chao
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > On Sat, Jan 30, 2010 at 7:46 PM, Eric Schult= e <schulte.eric@gmail.com&= gt;
> =A0 =A0 wrote:
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 Hi Chao,
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 I don't believe that it is curre= ntly possible to customize the file
> =A0 =A0 > =A0 =A0 > =A0 =A0 names in the ways you have described= using the standard begin_ditaa
> =A0 =A0 > =A0 =A0 > =A0 =A0 blocks. =A0It is possible to have co= mplete control over the file names
> =A0 =A0 > =A0 =A0 > =A0 =A0 using org-babel, in which case the c= orresponding block would look like
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 --------
> =A0 =A0 > =A0 =A0 > =A0 =A0 #+begin_src ditaa :file communicatio= n.png :exports results
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 =A0blabla
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 #+end_src
> =A0 =A0 > =A0 =A0 > =A0 =A0 --------
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 then the image will be created on ex= port, and you can also preview the
> =A0 =A0 > =A0 =A0 > =A0 =A0 image by pressing C-c C-o on the blo= ck.
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 To activate org-babel add the follow= ing to your Emacs configuration
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 (require 'org-babel-init)
> =A0 =A0 > =A0 =A0 > =A0 =A0 (require 'org-babel-ditaa)
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 Best -- Eric
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 Chao Lu <loochao@gmail.com> writes:
> =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > Dear all,
> =A0 =A0 > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > When I'm using the ditaa in= a org file called pearl.org= , by
> =A0 =A0 > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > --------
> =A0 =A0 > =A0 =A0 > =A0 =A0 > #+begin_ditaa communication.png=
> =A0 =A0 > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > blabla
> =A0 =A0 > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > #+end_ditaa
> =A0 =A0 > =A0 =A0 > =A0 =A0 > --------
> =A0 =A0 > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > It generates a file called
> =A0 =A0 > =A0 =A0 > =A0 =A0 communication_5e2f49c31c46339e8e3af9= ef8a2fd2dfa3d1fe74.png,
> =A0 =A0 > =A0 =A0 > =A0 =A0 > but this picture is right locat= ed at the same file as the org file(
> =A0 =A0 pearl.org > =A0 =A0 > =A0 =A0 ). Is
> =A0 =A0 > =A0 =A0 > =A0 =A0 it
> =A0 =A0 > =A0 =A0 > =A0 =A0 > possible to let it go to certai= n dir like the latex pictures do? And
> =A0 =A0 is it
> =A0 =A0 > =A0 =A0 > =A0 =A0 possible to
> =A0 =A0 > =A0 =A0 > =A0 =A0 > let the generated picture has t= he prefix of the org file name
> =A0 =A0 automatically,
> =A0 =A0 > =A0 =A0 like
> =A0 =A0 > =A0 =A0 > =A0 =A0 > org_communication_5e2f49c31c463= 39e8e3af9ef8a2fd2dfa3d1fe74.png?
> =A0 =A0 > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > Thanks,
> =A0 =A0 > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > Chao
> =A0 =A0 > =A0 =A0 > =A0 =A0 >
> =A0 =A0 > =A0 =A0 > =A0 =A0 > _______________________________= ________________
> =A0 =A0 > =A0 =A0 > =A0 =A0 > Emacs-orgmode mailing list
> =A0 =A0 > =A0 =A0 > =A0 =A0 > Please use `Reply All' to s= end replies to the list.
> =A0 =A0 > =A0 =A0 > =A0 =A0 > Emacs-orgmode@gnu.org
> =A0 =A0 > =A0 =A0 > =A0 =A0 > http://lists.gnu.org/mai= lman/listinfo/emacs-orgmode
>
> =A0 =A0 Footnotes:
> =A0 =A0 [1] =A0http://orgmode.org/worg/org-contrib/babel/
>
> =A0 =A0 [2] =A0http://orgmode.org/worg/org-contrib/babel/re= ference.php

--0016e68ee3dc9b12df047e999d2f-- --===============1572663254== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1572663254==--