emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: FengShu <tumashu@gmail.com>, emacs-orgmode@gnu.org
Cc: nicholas.dokos@hp.com
Subject: Re: Need Help: [patch] A experimental toy which is used to preview latex fragements
Date: Sat, 24 Mar 2012 14:54:45 -0400	[thread overview]
Message-ID: <32078.1332615285@alphaville> (raw)
In-Reply-To: Message from Nick Dokos <nicholas.dokos@hp.com> of "Sat, 24 Mar 2012 13:45:19 EDT." <30896.1332611119@alphaville>

Nick Dokos <nicholas.dokos@hp.com> wrote:

> Nick Dokos <nicholas.dokos@hp.com> wrote:
> 
> > FengShu <tumashu@gmail.com> wrote:
> > 
> > > ...
> > >   At this time ,it can't covert all the latex fragments in the
> > > buffer and only convert one, I can't find the problem due my
> > > pool computer language ability. so I need help!
> > > 
> > 
> > I tried your patch and I can see the problem (I think), but it might not
> > be a problem with your patch: I run into it even if
> > org-create-formula-image-program is set to dvipng. Of course, there is a
> > possibility that your patch broke dvipng, but at this point it doesn't
> > look that way.
> > 
> > I'll do some more testing and let you know.
> > 
> 
> No, you are right: it does seem as if your patch causes only the first
> fragment to be processed (in both the dvipng and imagemagick cases).
> Unpatched org (with dvipng) processes everything.
> 

Ok - just a misplaced paren - the code (I just show the dvipng case,
but the imagemagick case will need it too) should look like this:


--8<---------------cut here---------------start------------->8---
               ...
	       ((eq processing-type 'dvipng)
		(unless executables-checked
		  (org-check-external-command
		   "latex" "needed to convert LaTeX fragments to images")
		  (org-check-external-command
		   "dvipng" "needed to convert LaTeX fragments to images")
		  (setq executables-checked t))
		(unless (file-exists-p movefile)
		  (org-create-formula-image-with-dvipng
		     txt movefile opt forbuffer)))
	       ...
--8<---------------cut here---------------end--------------->8---

with two independent sexps: one to check for executables and one to check
for files. The misplaced paren caused the file check to be inside the
executable check, so it never produced any files after the first one.

Nick

  reply	other threads:[~2012-03-24 18:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23  8:22 [patch] A experimental toy which is used to preview latex fragements FengShu
2012-03-24 13:34 ` Need Help: " FengShu
2012-03-24 17:32   ` Nick Dokos
2012-03-24 17:45     ` Nick Dokos
2012-03-24 18:54       ` Nick Dokos [this message]
2012-03-25 12:36         ` FengShu
2012-03-26  6:07           ` [patch] Need test: New path " FengShu
2012-03-27  4:23             ` [patch] Need test: New method " FengShu
2012-03-27  8:16               ` Bastien
     [not found]                 ` <87haxapcof.fsf@gmail.com>
     [not found]                   ` <87limmqoyu.fsf@gnu.org>
     [not found]                     ` <87k426xk5t.fsf@gmail.com>
     [not found]                       ` <87vclq401w.fsf@gnu.org>
2012-03-27 23:48                         ` Feng Shu
2012-04-23 13:10                           ` Bastien

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=32078.1332615285@alphaville \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tumashu@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).