From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Timoth=C3=A9e_Flutre?= Subject: Re: naming image files before exporting to PDF Date: Fri, 6 Feb 2015 10:15:10 +0100 Message-ID: References: Reply-To: timflutre@gmail.com Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0443063abf3a9b050e67dcbc Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56189) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJf0g-0001Xu-KL for emacs-orgmode@gnu.org; Fri, 06 Feb 2015 04:15:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJf0f-0001Xk-2C for emacs-orgmode@gnu.org; Fri, 06 Feb 2015 04:15:34 -0500 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:49576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJf0e-0001Wz-MU for emacs-orgmode@gnu.org; Fri, 06 Feb 2015 04:15:32 -0500 Received: by mail-we0-f171.google.com with SMTP id k11so12454388wes.2 for ; Fri, 06 Feb 2015 01:15:31 -0800 (PST) In-Reply-To: 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: Rainer M Krug Cc: "emacs-orgmode@gnu.org" , John Kitchin --f46d0443063abf3a9b050e67dcbc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for your answers. In fact, the problem comes from the LaTeX package "underscore" (I had it in my ~/.emacs). In this situation: #+latex_header: \usepackage{underscore} #+latex_header: \graphicspath{ {./images/} } [[file:simul001_a-4_b-0-1.pdf]] =3D> the image is not displayed Whereas in this situation: #+latex_header: \graphicspath{ {./images/} } [[file:simul001_a-4_b-0-1.pdf]] =3D> the image is displayed correctly Therefore, if one needs to have any underscore in the text as well as in image file names, the only way I found is to use the verbatim mode ("=3D" i= n org-mode) to handle underscore in text. Here is an example that works: #+latex_header: \graphicspath{ {./images/} } File name: =3Dsimul001_a-4_b-0-1.pdf=3D [[file:simul001_a-4_b-0-1.pdf]] Note also that underscore "_" and hyphen "-" work well separately as well as together. Timoth=C3=A9e Flutre 2015-02-06 9:06 GMT+01:00 Rainer M Krug : > I remember a similar problem, and the cuprit was the dot. If I remember > correctly, LaTeX was interpreting everything after the *first* "." as > the extension. > > After avoiding "." in file names for images, it worked. > > "_" are fine. > > Rainer > > > John Kitchin writes: > > > Dashes are usually fine. Did you try replacing the _ with -? > > > > I try to avoid _ in filenames, but - works for me. > > > > On Thu, Feb 5, 2015 at 6:42 PM, Timoth=C3=A9e Flutre > wrote: > > > >> In the org file, it would look like this: > >> #+latex_header: \graphicspath{ {./images/} } > >> [[file:simul001_a-4_b-0.1.pdf]] > > > > > > > > > > John > > > > ----------------------------------- > > Professor John Kitchin > > Doherty Hall A207F > > Department of Chemical Engineering > > Carnegie Mellon University > > Pittsburgh, PA 15213 > > 412-268-7803 > > @johnkitchin > > http://kitchingroup.cheme.cmu.edu > > -- > Rainer M. Krug > email: Rainerkrugsde > PGP: 0x0F52F982 > --f46d0443063abf3a9b050e67dcbc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks for your answers. In fact, the problem comes f= rom the LaTeX package "underscore" (I had it in my ~/.emacs).
=
In this situation:

#+latex_header: \usepackage{underscore}=
#+latex_header: \graphicspath{ {./images/} }
[[file:simul001_a-4_b-0= -1.pdf]]
=3D> the image is not displayed

Where= as in this situation:
#+latex_header: \graphicspath{ {./images/} }
[[= file:simul001_a-4_b-0-1.pdf]]
=3D> the image is displayed correctly
Therefore, if one needs to have any underscore in the text= as well as in image file names, the only way I found is to use the verbati= m mode ("=3D" in org-mode) to handle underscore in text.
Here = is an example that works:

#+latex_header: \graphicspath{ {./images/}= }
File name: =3Dsimul001_a-4_b-0-1.pdf=3D
[[file:simul001_a-4_b-0-1.= pdf]]

Note also that underscore "_" and hyphen "= ;-" work well separately as well as together.

Tim= oth=C3=A9e Flutre

2015-02-06 9:06 GMT+01:00 Rainer M Krug <Rain= er@krugs.de>:
I remember a = similar problem, and the cuprit was the dot. If I remember
correctly, LaTeX was interpreting everything after the *first* "."= ; as
the extension.

After avoiding "." in file names for images, it worked.

"_" are fine.

Rainer


John Kitchin <jkitchin@andrew= .cmu.edu> writes:

> Dashes are usually fine. Did you try replacing the _ with -?
>
> I try to avoid _ in filenames, but - works for me.
>
> On Thu, Feb 5, 2015 at 6:42 PM, Timoth=C3=A9e Flutre <timflutre@gmail.com> wrote:
>
>> In the org file, it would look like this:
>> #+latex_header: \graphicspath{ {./images/} }
>> [[file:simul001_a-4_b-0.1.pdf]]
>
>
>
>
> John
>
> -----------------------------------
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http:/= /kitchingroup.cheme.cmu.edu

--
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

--f46d0443063abf3a9b050e67dcbc--