emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: bug in new exporter
Date: Tue, 11 Jun 2013 13:09:35 -0400	[thread overview]
Message-ID: <874nd4ing0.fsf@pierrot.dokosmarshall.org> (raw)
In-Reply-To: 87txl4onoa.fsf@gmail.com

[-- Attachment #1: Type: text/plain, Size: 2778 bytes --]

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Nick Dokos <ndokos@gmail.com> writes:
>
>> Nick Dokos <ndokos@gmail.com> 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 <return>  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/)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example.org --]
[-- Type: text/x-org, Size: 139 bytes --]

#+OPTIONS: timestamp:nil

* foo

#+caption: foo
#+attr_latex:  :placement [htb!] :options scale=1.5  :width ""
[[file:../images/foo.png]]


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: example.tex --]
[-- Type: text/x-tex, Size: 787 bytes --]

\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}

[-- Attachment #4: Type: text/plain, Size: 19 bytes --]

         
-- 
Nick

  reply	other threads:[~2013-06-11 17:10 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-03 15:50 bug in new exporter Marvin Doyley
2013-06-03 16:25 ` Rasmus
2013-06-03 17:42   ` Nick Dokos
2013-06-03 20:23     ` Rasmus
2013-06-03 21:03       ` Nick Dokos
2013-06-03 22:12         ` Rasmus
2013-06-05 12:26           ` Nicolas Goaziou
2013-06-05 16:28             ` Nick Dokos
2013-06-05 21:45               ` Nick Dokos
2013-06-11 12:08                 ` Nicolas Goaziou
2013-06-11 17:09                   ` Nick Dokos [this message]
2013-06-16 20:53                     ` Nicolas Goaziou
2013-06-11 12:05               ` Nicolas Goaziou
  -- strict thread matches above, loose matches on Subject: below --
2013-06-03 17:22 Marvin Doyley

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=874nd4ing0.fsf@pierrot.dokosmarshall.org \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).