From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: bug in new exporter Date: Tue, 11 Jun 2013 13:09:35 -0400 Message-ID: <874nd4ing0.fsf@pierrot.dokosmarshall.org> References: <87d2s388l2.fsf@pank.eu> <87ip1vjdlg.fsf@pierrot.dokosmarshall.org> <874ndf7xkn.fsf@pank.eu> <87fvwyrjnr.fsf@pierrot.dokosmarshall.org> <87y5aq7sin.fsf@pank.eu> <877gi8n3q7.fsf@gmail.com> <87obbko739.fsf@pierrot.dokosmarshall.org> <87r4ggmdtk.fsf@pierrot.dokosmarshall.org> <87txl4onoa.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmS5A-0003eL-3z for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 13:10:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmS55-0006Wp-2Q for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 13:10:08 -0400 Received: from plane.gmane.org ([80.91.229.3]:39009) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmS54-0006U4-Ns for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 13:10:02 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UmS4q-000312-SV for emacs-orgmode@gnu.org; Tue, 11 Jun 2013 19:09:48 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Jun 2013 19:09:48 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Jun 2013 19:09:48 +0200 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: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Nicolas Goaziou writes: > Nick Dokos writes: > >> Nick Dokos writes: >> >>> Just a heads-up: As part of testing this, I stumbled on an unrelated >>> current-working-directory problem, where on exporting to pdf, the >>> pdflatex of the produced tex file fails to find an image file specified >>> with a relative pathname (it works fine with an absolute path name). The >>> tex file looks OK and I can process it from the command line. I'll try >>> to pin this down more precisely, but do I understand correctly that the >>> processing of the tex file should take place with the current working >>> directory set to the directory of the org file? >>> >> >> The problem was that I had customized my org-latex-pdf-process to the >> texi2dvi recommended value: >> >> texi2dvi -p -b -c -V %f >> >> The -c (equivalently: --clean or --build=clean) breaks relative paths >> because texi2dvi executes in a different directory. The *Org PDF LaTeX >> Output* buffer shows >> >> /usr/bin/texi2dvi: cd /home/nick/src/org/latex/foo.t2d/pdf/build >> >> whereas the org file was in /home/nick/src/org/latex. >> >> If you use texi2dvi, beware of -c (and also --tidy I presume). >> >> So nothing to do with org, but maybe the customization option should not >> include the -c. > > I also use texi2dvi, but I don't have any compilation problem with > images, even with a relative path. > > Would you mind providing an ECM for that? > Please find an org file and the corresponding tex file attached. The directory structure is as follows: ~/src/org--images--foo.png | |--latex--example.{org,tex} | |--example.t2d/pdf/build Just executing --8<---------------cut here---------------start------------->8--- texi2dvi -p -b -c -V example.tex --8<---------------cut here---------------end--------------->8--- from the command line produces the error: ,---- | /usr/bin/texi2dvi: cd /home/nick/src/org/latex/example.t2d/pdf/build | ... | LaTeX Warning: File `../images/foo.png' not found on input line 37. | | | /home/nick/src/org/latex/./example.tex:37: Package pdftex.def Error: File | `../images/foo.png' not found. | | See the pdftex.def package documentation for explanation. | Type H for immediate help. | ... | | l.37 ...ludegraphics[scale=1.5]{../images/foo.png} | ... `---- Note the top line in the excerpt above. Taking out the -c gets rid of the error (at the price of leaving all the toc/aux/log/etc files around of course). --tidy exhibits the same symptom. Org-mode version 8.0.3 (release_8.0.3-197-g221768 @ /home/nick/elisp/org-mode/lisp/) --=-=-= Content-Type: text/x-org Content-Disposition: attachment; filename=example.org Content-Description: example.org #+OPTIONS: timestamp:nil * foo #+caption: foo #+attr_latex: :placement [htb!] :options scale=1.5 :width "" [[file:../images/foo.png]] --=-=-= Content-Type: text/x-tex Content-Disposition: attachment; filename=example.tex Content-Description: example.tex \documentclass[11pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} \usepackage{soul} \usepackage{textcomp} \usepackage{marvosym} \usepackage[nointegrals]{wasysym} \usepackage{latexsym} \usepackage{amssymb} \usepackage{amstext} \usepackage{hyperref} \tolerance=1000 \usepackage{minted} \author{Nick Dokos} \date{\today} \title{example} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs 24.3.50.1 (Org mode 8.0.3)}} \begin{document} \maketitle \tableofcontents \section{foo} \label{sec-1} \begin{figure}[htb!] \centering \includegraphics[scale=1.5]{../images/foo.png} \caption{foo} \end{figure} % Emacs 24.3.50.1 (Org mode 8.0.3) \end{document} --=-=-= Content-Type: text/plain -- Nick --=-=-=--