From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Need Help: [patch] A experimental toy which is used to preview latex fragements Date: Sat, 24 Mar 2012 14:54:45 -0400 Message-ID: <32078.1332615285@alphaville> References: <874ntfyber.fsf@gmail.com> <87zkb6xgv8.fsf@gmail.com> <30714.1332610374@alphaville> <30896.1332611119@alphaville> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBW72-00068D-PB for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 14:54:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBW70-0004Py-U6 for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 14:54:52 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:36222) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBW70-0004Pt-NF for emacs-orgmode@gnu.org; Sat, 24 Mar 2012 14:54:50 -0400 In-Reply-To: Message from Nick Dokos of "Sat, 24 Mar 2012 13:45:19 EDT." <30896.1332611119@alphaville> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: FengShu , emacs-orgmode@gnu.org Cc: nicholas.dokos@hp.com Nick Dokos wrote: > Nick Dokos wrote: > > > FengShu 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