emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Chao Lu <chaol@princeton.edu>
To: Eric Schulte <schulte.eric@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: The ditaa picture
Date: Tue, 2 Feb 2010 03:08:46 -0500	[thread overview]
Message-ID: <3cbb63d01002020008m6f7497f1qb01dc84cd3c685ec@mail.gmail.com> (raw)
In-Reply-To: <87iqagn31k.fsf@gmail.com>


[-- 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

      parent reply	other threads:[~2010-02-02  8:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-29  8:27 The ditaa picture Chao Lu
2010-01-31  0:46 ` Eric Schulte
2010-02-01  6:19   ` Chao Lu
     [not found]     ` <87zl3tm0bi.fsf@gmail.com>
     [not found]       ` <3cbb63d01002011011h5c88ac3v3f6e7f8f821e95c9@mail.gmail.com>
     [not found]         ` <87ock8n5m3.fsf@gmail.com>
     [not found]           ` <3cbb63d01002011135t5574b42ajfbb5f980a710663b@mail.gmail.com>
     [not found]             ` <87iqagn31k.fsf@gmail.com>
2010-02-02  8:08               ` Chao Lu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3cbb63d01002020008m6f7497f1qb01dc84cd3c685ec@mail.gmail.com \
    --to=chaol@princeton.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=schulte.eric@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).