public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org>
To: "jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<jmuccigr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	pandoc-discuss
	<pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Spaces in image filenames
Date: Thu, 06 Jan 2022 16:01:53 -0800	[thread overview]
Message-ID: <yh480kfsq0za4u.fsf@johnmacfarlane.net> (raw)
In-Reply-To: <e06ad7a4-019a-4ab7-8224-3b61ea32a07bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


Here's the root of the issue:

 % pandoc -t native
![moon](La Lune.jpg)
[ Para
    [ Image
        ( "" , [] , [] ) [ Str "moon" ] ( "La%20Lune.jpg" , "fig:" )
    ]
]

As you see, the markdown reader converts the space to %20 in the
image path.  This is fine for HTML but when pandoc tries to
create a PDF, it causes problems.  I need to explore further,
but I'm convinced that's it, because if you try `-f native`
with the above, it fails, but replacing %20 with a space,
it then succeeds.


"jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jmuccigr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> Here's an example:
>
> ```
> ~/Pictures/ > pandoc -o Downloads/test.pdf -f markdown
> ![one](file name.jpg)
> Error producing PDF.
> ! Package pdftex.def Error: File 
> `/private/var/folders/yl/xd3tsv2x1959s23ts4k1q
> t9m0000gr/T/tex2pdf.-a4cc305331e7cf2c/file name.jpg' not found: using draft 
> set
> ting.
>
> See the pdftex.def package documentation for explanation.
> Type  H <return>  for immediate help.
>  ...
>
> l.70 ...T/tex2pdf.-a4cc305331e7cf2c/file name.jpg}
> ```
>
> If I use the full path to the file, it works fine.
> On Thursday, 6 January 2022 at 18:13:33 UTC-5 John MacFarlane wrote:
>
>>
>> What exactly do you mean when you say "generate errors"?
>>
>> "jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>>
>> > I feel like I'm missing something obvious, but I've just noticed the 
>> spaces 
>> > in image filenames generate errors unless they occur with a full path. 
>> For 
>> > example:
>> >
>> > This works:
>> >
>> > `![One image](/Users/username/Pictures/file name.jpg)`
>> >
>> > This doesn't:
>> >
>> > `![Another image](file name.jpg)`
>> >
>> > Nor does:
>> >
>> > `![A third image](./file name.jpg)`
>> >
>> > I've tried quoting the filename, too.
>> >
>> > The command I'm using is the following from the directory where the 
>> files 
>> > live:
>> >
>> > `pandoc -o test.pdf test.md -f markdown`
>> >
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups "pandoc-discuss" group.
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/pandoc-discuss/33416aa7-4f25-41a4-b216-763cd799a90fn%40googlegroups.com
>> .
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e06ad7a4-019a-4ab7-8224-3b61ea32a07bn%40googlegroups.com.


  parent reply	other threads:[~2022-01-07  0:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 16:42 jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found] ` <33416aa7-4f25-41a4-b216-763cd799a90fn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-01-06 23:12   ` John MacFarlane
     [not found]     ` <yh480ktuegzceu.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-01-06 23:32       ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]         ` <e06ad7a4-019a-4ab7-8224-3b61ea32a07bn-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-01-07  0:01           ` John MacFarlane [this message]
     [not found]             ` <yh480kfsq0za4u.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2022-01-07  0:31               ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                 ` <1c8dd209-5629-4681-a5c3-9d030d99a553n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-01-07 20:00                   ` John MacFarlane
     [not found]                     ` <m2y23rb9jv.fsf-jF64zX8BO0+FqBokazbCQ6OPv3vYUT2dxr7GGTnW70NeoWH0uzbU5w@public.gmane.org>
2022-01-08 17:59                       ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
     [not found]                         ` <1b058ce9-9019-471d-8470-8fe229dbc988n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-01-15 19:29                           ` jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yh480kfsq0za4u.fsf@johnmacfarlane.net \
    --to=jgm-tvlzxgkolnx2fbvcvol8/a@public.gmane.org \
    --cc=jmuccigr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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.
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 NNTP newsgroup(s).