From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: problem exporting an image to latex Date: Mon, 05 Jul 2010 12:59:59 +0100 Message-ID: <87hbke16m8.wl%ucecesf@ucl.ac.uk> Reply-To: Eric S Fraga Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="Multipart_Mon_Jul__5_12:59:59_2010-1" Return-path: Received: from [140.186.70.92] (port=37595 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVkLI-0005jC-7D for emacs-orgmode@gnu.org; Mon, 05 Jul 2010 08:00:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVkLF-0004AC-VJ for emacs-orgmode@gnu.org; Mon, 05 Jul 2010 08:00:07 -0400 Received: from vscane-c.ucl.ac.uk ([144.82.108.43]:42756) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVkLF-00049t-Fv for emacs-orgmode@gnu.org; Mon, 05 Jul 2010 08:00:05 -0400 Received: from pinto.chemeng.ucl.ac.uk ([128.40.74.171] helo=pinto.chemeng.ucl.ac.uk.ucl.ac.uk) by vscane-c.ucl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.60) (envelope-from ) id 1OVkLA-0003PS-T6 for emacs-orgmode@gnu.org; Mon, 05 Jul 2010 13:00:00 +0100 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: org-mode mailing list --Multipart_Mon_Jul__5_12:59:59_2010-1 Content-Type: text/plain; charset=US-ASCII Hello, with the most up to date org, I am having a problem exporting to latex, specifically if there is a link to an image. See the attached example with emacs and org version information. The error in *Messages* I get is: ,---- | Exporting to LaTeX... | org-babel-exp processing... | insert: Wrong number of arguments: (lambda (path caption label attr) "Format the image element, depending on user settings." (let (ind floatp wrapp multicolumnp placement figenv) (setq floatp (or caption label)) (setq ind (org-get-text-property-any 0 (quote original-indentation) path)) (when (and attr (stringp attr)) (if (string-match "[ ]*\\" attr) (setq wrapp t floatp nil attr (replace-match "" t t attr))) (if (string-match "[ ]*\\" attr) (setq wrapp nil floatp t attr (replace-match "" t t attr))) (if (string-match "[ ]*\\" attr) (setq multicolumnp t attr (replace-match "" t t attr)))) (setq placement (cond (wrapp "{l}{0.5\\textwidth}") (floatp "[htb]") (t ""))) (when (and attr (stringp attr) (string-match "[ ]*\\" attr) (setq wrapp t floatp nil attr (replace-match "" t t attr))) (if (string-match "[ ]*\\" attr) (setq wrapp nil floatp t attr (replace-match "" t t attr))) (if (string-match "[ ]*\\" attr) (setq multicolumnp t attr (replace-match "" t t attr)))) (setq placement (cond (wrapp "{l}{0.5\\textwidth}") (floatp "[htb]") (t ""))) (when (and attr (stringp attr) (string-match "[ ]*\\ level depth) (cond ... ... ... ...))) | (let* ((heading ...) (level ...) (occur ...) (content ...) (subcontent ...) (label ...) (label-list ...) (sectioning org-export-latex-sectioning) (depth org-export-latex-sectioning-depth) main-heading sub-heading) (when (symbolp ...) (setq sectioning ...) (when sectioning ...) (if sectioning ...) (setq depth ...)) (if (string-match "[ ]*\\\\\\\\[ ]*" heading) (setq main-heading ... sub-heading ...)) (setq heading (org-export-latex-fontify-headline heading) sub-heading (and sub-heading ...) main-heading (and main-heading ...)) (cond (... ...) (... ...))) | org-export-latex-subcontent(((pos . 2) (level . 1) (occur . 1) (heading . #(" problem with latex export " 1 2 ... 2 26 ...)) (content . #("\n\n [[file:mip.png][file:mip.png]]\n \n\\begin{verbatim}\n (format \"%s\\n%s\" (org-version) (emacs-version))\n\\end{verbatim}\n\n\n" 0 2 ... 2 3 ... 3 4 ... 4 6 ... 6 11 ... 11 17 ... 17 18 ... 18 19 ... 19 20 ... 20 25 ... 25 31 ... 31 32 ... 32 33 ... 33 34 ... 34 35 ... 35 37 ... 37 38 ... 38 48 ... 48 120 ... 120 121 ... 121 122 ...)) (subcontent)) t) | (lambda (x) (org-export-latex-subcontent x num))(((pos . 2) (level . 1) (occur . 1) (heading . #(" problem with latex export " 1 2 ... 2 26 ...)) (content . #("\n\n [[file:mip.png][file:mip.png]]\n \n\\begin{verbatim}\n (format \"%s\\n%s\" (org-version) (emacs-version))\n\\end{verbatim}\n\n\n" 0 2 ... 2 3 ... 3 4 ... 4 6 ... 6 11 ... 11 17 ... 17 18 ... 18 19 ... 19 20 ... 20 25 ... 25 31 ... 31 32 ... 32 33 ... 33 34 ... 34 35 ... 35 37 ... 37 38 ... 38 48 ... 48 120 ... 120 121 ... 121 122 ...)) (subcontent))) | mapc((lambda (x) (org-export-latex-subcontent x num)) (((pos . 2) (level . 1) (occur . 1) (heading . #(" problem with latex export " 1 2 ... 2 26 ...)) (content . #("\n\n [[file:mip.png][file:mip.png]]\n \n\\begin{verbatim}\n (format \"%s\\n%s\" (org-version) (emacs-version))\n\\end{verbatim}\n\n\n" 0 2 ... 2 3 ... 3 4 ... 4 6 ... 6 11 ... 11 17 ... 17 18 ... 18 19 ... 19 20 ... 20 25 ... 25 31 ... 31 32 ... 32 33 ... 33 34 ... 34 35 ... 35 37 ... 37 38 ... 38 48 ... 48 120 ... 120 121 ... 121 122 ...)) (subcontent)))) | (let ((num ...)) (mapc (lambda ... ...) subcontent)) | org-export-latex-sub((((pos . 2) (level . 1) (occur . 1) (heading . #(" problem with latex export " 1 2 ... 2 26 ...)) (content . #("\n\n [[file:mip.png][file:mip.png]]\n \n\\begin{verbatim}\n (format \"%s\\n%s\" (org-version) (emacs-version))\n\\end{verbatim}\n\n\n" 0 2 ... 2 3 ... 3 4 ... 4 6 ... 6 11 ... 11 17 ... 17 18 ... 18 19 ... 19 20 ... 20 25 ... 25 31 ... 31 32 ... 32 33 ... 33 34 ... 34 35 ... 35 37 ... 37 38 ... 38 48 ... 48 120 ... 120 121 ... 121 122 ...)) (subcontent)))) | (if (eq (car content) (quote subcontent)) (mapc (quote org-export-latex-sub) (cdr content)) (org-export-latex-sub (car content))) | org-export-latex-global((((... ... ... ... ... ...)))) | (let* ((wcf ...) (opt-plist org-export-latex-options-plist) (region-p ...) (rbeg ...) (rend ...) (subtree-p ...) (opt-plist ...) (org-export-latex-options-plist ...) (org-current-export-dir ...) (org-current-export-file buffer-file-name) (title ...) (filename ...) (filename ...) (buffer ...) (odd org-odd-levels-only) (header ...) (skip ...) (text ...) (org-export-preprocess-hook ...) (first-lines ...) (coding-system ...) (coding-system-for-write ...) (save-buffer-coding-system ...) (region ...) (text ...) (string-for-export ...)) (set-buffer buffer) (erase-buffer) (org-install-letbind) (and (fboundp ...) (set-buffer-file-coding-system coding-system-for-write)) (unless (or ... body-only) (insert header)) (when (and text ...) (insert ... "\n\n")) (unless skip (insert first-lines)) (org-e xport-latex-global (with-temp-buffer ... ... ...)) (unless body-only (insert "\n\\end{document}")) (goto-char (point-min)) (while (re-search-forward "^[ ]*\\\\item\\([ ]+\\)\\[" nil t) (delete-region ... ...)) (goto-char (point-min)) (when (re-search-forward "\\[TABLE-OF-CONTENTS\\]" nil t) (goto-char ...) (while ... ...) (goto-char ...) (and ... ...)) (goto-char (point-min)) (while (re-search-forward "^[ ]*\\\\item\\>.*\\(\\\\\\\\\\)[ ]*\\(\n\\\\label.*\\)*\n\\\\begin" nil t) (delete-region ... ...)) (goto-char (point-min)) (while (re-search-forward "^[ ]*\\\\item\\>.*\\(\\\\\\\\\\)[ ]*\\(\n\\\\label.*\\)*" nil t) (if ... ...)) (run-hooks (quote org-export-latex-final-hook)) (if to-buffer (unless ... ...) (save-buffer)) (org-export-latex-fix-inputenc) (run-hooks (quote org-export- latex-after-save-hook)) (goto-char (point-min)) (or (org-export-push-to-kill-ring "LaTeX") (message "Exporting to LaTeX...done")) (prog1 (if ... ... ...) (set-window-configuration wcf))) | org-export-as-latex(nil) | call-interactively(org-export-as-latex) | (if (and bg (nth 2 ass) (not ...) (not ...)) (let (...) (set-process-sentinel p ...) (message "Background process \"%s\": started" p)) (if subtree-p (progn ... ...)) (call-interactively (nth 1 ass)) (when (and bpos ...) (let ... ... ... ... ...))) | (let* ((bg ...) subtree-p (help "[t] insert the export option template\n[v] limit export to visible part of outline tree\n[1] only export the current subtree\n[SPC] publish enclosing subtree (with LaTeX_CLASS or EXPORT_FILE_NAME prop)\n\n[a/n/u] export as ASCII/Latin-1/UTF-8 [A/N/U] to temporary buffer\n\n[h] export as HTML [H] to temporary buffer [R] export region\n[b] export as HTML and open in browser\n\n[l] export as LaTeX [L] to temporary buffer\n[p] export as LaTeX and process to PDF [d] ... and open PDF file\n\n[D] export as DocBook [V] export as DocBook, process to PDF, and open\n\n[j] export as TaskJuggler [J] ... and open\n\n[m] export as Freemind mind map\n[x] export as XOXO\n[g] export using Wes Hardaker's generi c exporter\n\n[i] export current file as iCalendar file\n[I] export all agenda files as iCalendar files [c] ...as one combined file\n\n[F] publish current file [P] publish current project\n[X] publish a project... [E] publish every projects") (cmds ...) r1 r2 ass (cpos ...) (cbuf ...) bpos) (save-excursion (save-window-excursion ... ... ... ... ... ... ...)) (and bpos (goto-char bpos)) (setq r2 (if ... ... r1)) (unless (setq ass ...) (error "No command associated with key %c" r1)) (if (and bg ... ... ...) (let ... ... ...) (if subtree-p ...) (call-interactively ...) (when ... ...))) | org-export(nil) | call-interactively(org-export nil nil) `---- Thanks, eric --Multipart_Mon_Jul__5_12:59:59_2010-1 Content-Type: text/plain; charset=US-ASCII Content-Disposition: attachment Content-Transfer-Encoding: 7bit # -*- coding: utf-8; -*- #+TITLE: examplebug.org #+AUTHOR: Eric S Fraga #+EMAIL: e.fraga@ucl.ac.uk #+DATE: 2010.07.05 12:55:37 #+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:t skip:nil d:nil todo:t pri:nil tags:not-in-toc #+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: * problem with latex export #+attr_latex: width=0.8\linewidth [[file:mip.png]] #+begin_src emacs-lisp :results output (format "%s\n%s" (org-version) (emacs-version)) #+end_src #+results: : Org-mode version 6.36trans (release_6.36.509.g9e9b) : GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.18.2) : of 2009-11-02 on raven, modified by Debian --Multipart_Mon_Jul__5_12:59:59_2010-1 Content-Type: text/plain; charset=US-ASCII -- Eric S Fraga GnuPG: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D --Multipart_Mon_Jul__5_12:59:59_2010-1 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 --Multipart_Mon_Jul__5_12:59:59_2010-1--