From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Question on latex source block Date: Thu, 13 Sep 2012 09:07:55 -0600 Message-ID: <87392mnepg.fsf@gmx.com> References: <40C7B1BFC291ED4E9D10436D07736A3347089E653C@EXMAIL7.haas.uc.berkeley.edu> <8243.1347174432@alphaville> <87bohfywdt.fsf@gmx.com> <13524.1347212661@alphaville> <87ligj6l57.fsf@gmx.com> <87pq5q4g3x.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCBbP-0008Fl-Pr for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 11:45:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCBbJ-0003Th-1z for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 11:45:15 -0400 Received: from mailout-eu.gmx.com ([213.165.64.42]:37744) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1TCBbI-0003RF-Oe for emacs-orgmode@gnu.org; Thu, 13 Sep 2012 11:45:08 -0400 In-Reply-To: <87pq5q4g3x.fsf@gmail.com> (Jambunathan K.'s message of "Thu, 13 Sep 2012 11:30:18 +0530") 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: Jambunathan K Cc: Richard Stanton , nicholas.dokos@hp.com, "emacs-orgmode@gnu.org" Jambunathan K writes: > Eric Schulte writes: > >> Alright, >> >> I've just committed a patch which gets part-way to your suggest >> solution. While the two backend-specific functions are still separate >> (I agree they should be combined), I have brought back the >> `org-create-formula-image' function, which now dispatches to the backend >> specific functions. >> >> Additionally there are some problems in the `org-format-latex' function. >> It lists mandatory arguments as optional, and appears to create >> variables which are not required or properly set. >> >> These function should probably be cleaned at some point up by whoever is >> maintaining Org-mode's LaTeX interfaces. > > This (or one of the recent commits) is creating the following > regression. I have not dived in to the details. > Perhaps you could use git-bisect to find the ID of the offending commit? Also a reproduction recipe would be useful. Does this bug only occur if `org-export-as-odt-and-open' is called, or can it be reproduced by simply calling `org-preview-latex-fragment' or `org-create-formula-image'. Note: my patch (referenced above) did not touch the `org-create-formula-image-with-dvipng' function which appears in your backtrace (below), so I doubt my commit is the culprit. Best, > > Export the below snippert with C-c C-e o. You will see this. > > Export works fine with tree at commit 8e445333. > > Debugger entered--Lisp error: (error "Not enough arguments for format string") > format("rgb %s %s %s") > apply(format "rgb %s %s %s" nil) > org-dvipng-color-format("Transparent") > org-create-formula-image-with-dvipng(#("\\begin{equation*}\n > x=\\sqrt{b}\n \\end{equation*}" 0 18 (fontified t) 18 54 (fontified > t)) > "/home/kjambunathan/ltxpng/regression_8ae36f2f639503b0a2290277a2d42b284db15c21.png" > (:foreground default :background default :scale 1.0 :html-foreground > "Black" :html-background "Transparent" :html-scale 1.0 :matchers > ("begin" "$1" "$" "$$" "\\(" "\\[")) nil) > org-create-formula-image(#("\\begin{equation*}\n x=\\sqrt{b}\n > \\end{equation*}" 0 18 (fontified t) 18 54 (fontified t)) > "/home/kjambunathan/ltxpng/regression_8ae36f2f639503b0a2290277a2d42b284db15c21.png" > (:foreground default :background default :scale 1.0 :html-foreground > "Black" :html-background "Transparent" :html-scale 1.0 :matchers > ("begin" "$1" "$" "$$" "\\(" "\\[")) nil dvipng) > org-format-latex("ltxpng/regression" "." nil "Creating LaTeX image %s" nil nil dvipng) > org-export-odt-do-preprocess-latex-fragments() > org-export-odt-preprocess-latex-fragments() > run-hooks(org-export-preprocess-after-blockquote-hook) > org-export-preprocess-string(#("#+TITLE: regression.org\n#+AUTHOR: > Jambunathan K\n#+EMAIL: kjambunathan@gmail.com\n#+DATE: 2012-09-13 > Thu\n#+DESCRIPTION:\n#+KEYWORDS:\n#+LANGUAGE: en\n#+OPTIONS: H:3 num:t > toc:t \\n:nil @:t ::t |:t ^:t -:t f:t *:t <:t\n#+OPTIONS: TeX:t > LaTeX:dvipng skip:nil d:t todo:t pri:nil tags:t\n#+INFOJS_OPT: > view:nil toc:nil ltoc:t mouse:underline buttons:0 > path:http://orgmode.org/org-info.js\n#+EXPORT_SELECT_TAGS: > export\n#+EXPORT_EXCLUDE_TAGS: noexport\n#+LINK_UP: \n#+LINK_HOME: > \n#+XSLT:\n\n\n#+name: Equation:2\n \\begin{equation*}\n x=\\sqrt{b}\n > \\end{equation*}\n" 0 8 (fontified t font-lock-fontified t face > org-document-info-keyword) 8 13 (fontified t) 13 27 (fontified t > font-lock-fontified t face org-document-title) 27 28 (fontified t) 28 > 37 (fontified t font-lock-fontified t face org-document-info-keyword) > 37 41 (fontified t) 41 54 (fontified t font-lock-fontified t face > org-document-info) 54 55 (fontified t) 55 63 (fontified t > font-lock-fontified t face org-document-info-keyword) 63 68 (fontified > t) 68 90 (fontified t font-lock-fontified t face org-document-info) 90 > 91 (fontified t) 91 98 (fontified t font-lock-fontified t face > org-document-info-keyword) 98 104 (fontified t) 104 118 (fontified t > font-lock-fontified t face org-document-info) 118 119 (fontified t) > 119 133 (fontified t font-lock-fontified t face org-meta-line) 133 134 > (fontified t) 134 145 (fontified t font-lock-fontified t face > org-meta-line) 145 146 (fontified t) 146 161 (fontified t > font-lock-fontified t face org-meta-line) 161 162 (fontified t) 162 > 229 (fontified t font-lock-fontified t face org-meta-line) 229 230 > (fontified t) 230 296 (fontified t font-lock-fontified t face > org-meta-line) 296 297 (fontified t) 297 366 (fontified t > font-lock-fontified t face org-meta-line) 366 395 (fontified t > font-lock-fontified t org-no-flyspell t mouse-face highlight face > org-meta-line keymap #1=(keymap (follow-link . mouse-face) (mouse-3 > . org-find-file-at-mouse) (mouse-2 . org-open-at-mouse))) 395 396 > (fontified t rear-nonsticky (mouse-face highlight keymap invisible > intangible help-echo org-linked-text) font-lock-fontified t > org-no-flyspell t mouse-face highlight face org-meta-line keymap #1#) > 396 397 (fontified t) 397 425 (fontified t font-lock-fontified t face > org-meta-line) 425 426 (fontified t) 426 457 (fontified t > font-lock-fontified t face org-meta-line) 457 458 (fontified t) 458 > 471 (fontified t font-lock-fontified t face org-meta-line) 471 472 > (fontified t) 472 485 (fontified t font-lock-fontified t face > org-meta-line) 485 486 (fontified t) 486 493 (fontified t > font-lock-fontified t face org-meta-line) 493 494 (fontified t) 494 > 495 (fontified t) 495 496 (fontified t) 496 514 (fontified t > font-lock-fontified t face org-meta-line) 514 515 (fontified t) 515 > 538 (fontified t) 538 575 (fontified t)) :emph-multiline t > :for-backend odt :skip-before-1st-heading nil :drawers t > :todo-keywords t :tasks t :tags t :priority nil :footnotes t > :timestamps t :archived-trees headline :select-tags ("export") > :exclude-tags ("noexport") :add-text nil :LaTeX-fragments dvipng) > org-do-lparse(nil hidden nil nil nil nil) > org-lparse("odt" "odt" nil hidden) > org-lparse-and-open("odt" "odt" nil) > #[nil "\303\206\304\304 #\n \210\207" [org-export-odt-preferred-output-format arg --cleanup-xml-buffers org-lparse-and-open "odt"] 4]() > org-export-as-odt-and-open(nil) > call-interactively(org-export-as-odt-and-open) > org-export(nil) > > > --8<---------------cut here---------------start------------->8--- > #+TITLE: regression.org > #+AUTHOR: Jambunathan K > #+EMAIL: kjambunathan@gmail.com > #+DATE: 2012-09-13 Thu > #+DESCRIPTION: > #+KEYWORDS: > #+LANGUAGE: en > #+OPTIONS: H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t > #+OPTIONS: TeX:t LaTeX:dvipng skip:nil d:t todo:t pri:nil tags:t > #+INFOJS_OPT: view:nil toc:nil ltoc:t mouse:underline buttons:0 path:http://orgmode.org/org-info.js > #+EXPORT_SELECT_TAGS: export > #+EXPORT_EXCLUDE_TAGS: noexport > #+LINK_UP: > #+LINK_HOME: > #+XSLT: > > > #+name: Equation:2 > \begin{equation*} > x=\sqrt{b} > \end{equation*} > --8<---------------cut here---------------end--------------->8--- -- Eric Schulte http://cs.unm.edu/~eschulte