From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/29916 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" Newsgroups: gmane.text.pandoc Subject: Re: Spaces in image filenames Date: Thu, 6 Jan 2022 16:31:42 -0800 (PST) Message-ID: <1c8dd209-5629-4681-a5c3-9d030d99a553n@googlegroups.com> References: <33416aa7-4f25-41a4-b216-763cd799a90fn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_328_571097640.1641515502683" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17245"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCX7HCFDXYLRB34T32HAMGQEM7GWKCY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Jan 07 01:31:47 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f192.google.com ([209.85.167.192]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1n5dAY-0004JP-Hd for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 07 Jan 2022 01:31:46 +0100 Original-Received: by mail-oi1-f192.google.com with SMTP id t72-20020acaaa4b000000b002c6f0e4294esf2902848oie.6 for ; Thu, 06 Jan 2022 16:31:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:date:from:to:message-id:in-reply-to:references:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=SIxaL9JZ8jK02Sp4H/O122hXSyPkeSTvocof6ugN5vk=; b=aWhiCovaqv218ZpqM3+R4o+DKjwwK3YEV3QRW8GV/fMU2iJWRHQtiAKjPYUoYLpkkU 94O8+OMv0xS/dgM95r468QzpWx+zXjQpQPGAGy/y+jLcx/ccxGrv+1gev3EkdEb8jylu vmvzYODjn/RA3J2eAAXbhCCi3NkGkoAF7ECWxeJfc9jLkmTLLPVwG73/b0uQev6ZYVuT lnJHqC6+h4FAm9mpHKqeqeGblNzOmX6UsuOtN3ROqSDCesSyl/sVQnqjG4MXNEsf787H BHRY0ruCvLPdcxiBjwrxMMESmMqiGfzL7R66juV5CEnbOGoviiyK07A5wtE2GDZ19noy iahw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:message-id:in-reply-to:references:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=SIxaL9JZ8jK02Sp4H/O122hXSyPkeSTvocof6ugN5vk=; b=aPezb12eV84IWzYECYxEK6ADIIULSX4/h6KbLbhPWQUdkbTUJifZwSNEwSxtmdYqua Kh7Crb91PsBDrEuFn9Ge4G4u9/rFCLyQDvMlaKJ2BLyim9Yr5/opmjeLpv66cG1m3O1F 0SlsF+cObfpiUcYZQOWkSuZmBhTC6vDEHy4aEAHUvg7YfVu8zoi4+v+Ey/EQ1T4cdGjH drXoWFL+HpjNPqyDZB/SDUo2ny+AVnTuybEYsRJ9ig2DOaw1BWJurdt5vorPpUzSyX+g xdZ1XDA8amW4yIyT48PoIv2Ek+x1lv5RTwiWqguO2QTHedujO++qPE6WdReYXr8Fkxb0 Ww7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:date:from:to:message-id:in-reply-to :references:subject:mime-version:x-original-sender:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=SIxaL9JZ8jK02Sp4H/O122hXSyPkeSTvocof6ugN5vk=; b=PnUz08P+cvrg30e5RWmTTuxBIefWlwMM0DvS9cCcjZzoP6yZjrgere0GsNpBa/vKs2 jw3lkfU6xxG49JEuWp2Ymm790IexInIghil/med/0TKq2J+UGB/nZszhyY5a3/jTUMBl l/MpaTbzDh7ybi6GHxTORkR2f65Sp0loFOYKKR70NlXZSkQmiozmTZrLbvL94X/VknxT cXMA1NHdEHryozPFLSHCyNRvlxOueS4AJgKYBmfx7FPzDY375jsfi41FbUsBWmp7t+5d ADNnVsYOQDRyeVj+pOO4CQ8rGCMqbd8E+gQFx/jj6geReVzx7op7Zk44emaYazjW84xY b1hg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM533kzl0IRIc4QhZU1P/yTRRAs6Hsao4pT7vSc3uEcxN+WOAeBPuw I3kXymxwZO+zG98GRVek3/E= X-Google-Smtp-Source: ABdhPJyZhGva5YxNWw2PF7gT4K9mvXUDWG5JU8SvapazKrOjtnaeDwolpr38K8aKxjyf35QjWbt9+A== X-Received: by 2002:a05:6830:1108:: with SMTP id w8mr6558887otq.71.1641515504935; Thu, 06 Jan 2022 16:31:44 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6830:438e:: with SMTP id s14ls792852otv.7.gmail; Thu, 06 Jan 2022 16:31:43 -0800 (PST) X-Received: by 2002:a9d:6351:: with SMTP id y17mr43705631otk.105.1641515503197; Thu, 06 Jan 2022 16:31:43 -0800 (PST) In-Reply-To: X-Original-Sender: jmuccigr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:29916 Archived-At: ------=_Part_328_571097640.1641515502683 Content-Type: multipart/alternative; boundary="----=_Part_329_1827677768.1641515502683" ------=_Part_329_1827677768.1641515502683 Content-Type: text/plain; charset="UTF-8" I can see that, but I'm not sure why giving the entire path removes the problem. If it helps, I don't think this was a problem before (though I couldn't say for sure or which what version). On Thursday, 6 January 2022 at 19:02:16 UTC-5 John MacFarlane wrote: > > 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" 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 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" 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-discus...-/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 > . > -- 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/1c8dd209-5629-4681-a5c3-9d030d99a553n%40googlegroups.com. ------=_Part_329_1827677768.1641515502683 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I can see that, but I'm not sure why giving the entire path removes the pro= blem.

If it helps, I don't think this was a problem befo= re (though I couldn't say for sure or which what version).

On Thursday,= 6 January 2022 at 19:02:16 UTC-5 John MacFarlane wrote:

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&= quot; <jmuc...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org&= gt; 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=20
> `/private/var/folders/yl/xd3tsv2x1959s23ts4k1q
> t9m0000gr/T/tex2pdf.-a4cc305331e7cf2c/file name.jpg' not found= : using draft=20
> 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 wrot= e:
>
>>
>> What exactly do you mean when you say "generate errors&qu= ot;?
>>
>> "jmuc...@gmail= .com" <jmuc...@gmail= .com> writes:
>>
>> > I feel like I'm missing something obvious, but I'= ve just noticed the=20
>> spaces=20
>> > in image filenames generate errors unless they occur with= a full path.=20
>> For=20
>> > 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 direc= tory where the=20
>> files=20
>> > live:
>> >
>> > `pandoc -o test.pdf test.md -f markdown`
>> >
>> > --=20
>> > You received this message because you are subscribed to t= he Google=20
>> Groups "pandoc-discuss" group.
>> > To unsubscribe from this group and stop receiving emails = from it, send=20
>> an email to pandoc-= discus...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
>> > To view this discussion on the web visit=20
>> https://groups= .google.com/d/msgid/pandoc-discuss/33416aa7-4f25-41a4-b216-763cd799a90fn%40= googlegroups.com
>> .
>>
>
> --=20
> 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..= .@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/e= 06ad7a4-019a-4ab7-8224-3b61ea32a07bn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/1c8dd209-5629-4681-a5c3-9d030d99a553n%40googlegroups.= com.
------=_Part_329_1827677768.1641515502683-- ------=_Part_328_571097640.1641515502683--