From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/18311 Path: news.gmane.org!.POSTED!not-for-mail From: Jennifer Bryan Newsgroups: gmane.text.pandoc Subject: Re: How to suppress title attribute in a CommonMark image link? Date: Fri, 13 Oct 2017 11:16:46 -0700 (PDT) Message-ID: References: <892c5a25-086a-4e19-b4c1-8975cea8df0f@googlegroups.com> <20171013173117.GA27286@protagoras> <3dcce503-9815-4a2d-aad9-b884f0e023aa@googlegroups.com> <20171013180518.GD27286@protagoras> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_17405_1332064224.1507918606110" X-Trace: blaine.gmane.org 1507918611 10280 195.159.176.226 (13 Oct 2017 18:16:51 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Oct 2017 18:16:51 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCPLDBV3WYCRBDUGQTHQKGQECYXWEKY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Oct 13 20:16:46 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-oi0-f59.google.com ([209.85.218.59]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e34Vk-0001JF-5e for gtp-pandoc-discuss@m.gmane.org; Fri, 13 Oct 2017 20:16:40 +0200 Original-Received: by mail-oi0-f59.google.com with SMTP id m198sf6578110oig.20 for ; Fri, 13 Oct 2017 11:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; 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=4zfIr2BMc3hUo16r7GX2EP25QEE/dOtCneNBjwWj5UE=; b=i3wNESDYYrzO9RR5y6hMvzK0DHG7oz+TQJ5pmaP6nM64+gQ6/9CS5yhpkjsbvTtnOs e1kYNbD1Zcxb0ZckB7/d35Mwz20WOUyiD0Qk6eqqwiMiOIo/YIo91gJRkjJxiF5j+eOf 97L9UaB59YfChE+oCLoizgKbtHARoH7Ht/y3tEW55QOKMB85V9+6Ury0hEB88kEWn5bM LataBB8OMeKgOK/EFHRYiyzF6LIvaa07VYBr/4Mhvcb8M8SZplLwkAEaqkDQwFn+UMUy VSayswIuNz+00FZbj4uAQVW0E2dZRh3KH/7104KRJpId5liq7CisHM524LjkSvlUCmwZ X/Fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; 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=4zfIr2BMc3hUo16r7GX2EP25QEE/dOtCneNBjwWj5UE=; b=R/L3qDwUrbc7p2RM8nHAOqJhdWwDruIlAMihrGl2GLbfhaiaz10vz72fAzJfCsrGWn 0eeCTQhvhU4XDJlBrdNtpO9o72cct2UTezNI8TpyMLlGRBnnN0Z/CyTJ1vSkVKO5TKCO 62Pqgi2LIJ3Yzt/47Jgc+R6TikYTawxtGvsFZ+JlQRpwyTeVO6do7EvXbVHyElf6N4p4 YKY2+MsPKZMIzz+GTCI+oarspxINL5XGoPBqaJZFIzQ/2y2V5/049Pw6y12udAiZVB5y duupU0H8JWpasonVTm2HN1AcKZeiB9OoeJvuJtwJWZJ60LrjBJWu1b3YHAVPYRyfoYga lcnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; 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=4zfIr2BMc3hUo16r7GX2EP25QEE/dOtCneNBjwWj5UE=; b=VYwywOH7EjKoo73JXJl1nNUjAT8doqxcW97c9Zqgc3GiJt1JQ2SveYHMNvfYLswXpP I6qGHQA8M2U9ofFokMDFWG+msAuQ9UYmoxXYkKdwKnsjQl5e4BQ8WNTB8L54gpqZD1mz wln7d/Sdl9XRD6WndzV11HB/KtJWCHedbWaTvMYsRfFTuyF4pc9VUYGAvL+7IwLQRx1U MqCjobW+2MoDiJklVoV5czz08hDit4x0NK6llOeTy3gvKw0DkT0CNAlvw+UiItNACEjX M5FVyGNJYy3R+djLqK8Q9BJioR+B9DHJukRW34AsLfDEJBTZU/2ZV6dt5tMXnyQJcOy+ +BaA== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AMCzsaVBmbpwSD2/IijdpfwRwBM66nfQLvQyf6ERvfsyJzIZ9zFMqiWo PFspoJr7wRl9JkXOgTUw9DA= X-Google-Smtp-Source: ABhQp+RHF3ZvVTYrBe/7PZ001S1V3WKn/ErsYMLWtD8Gt6+82B15yENDCT5AGouGA8UQUgcS0EE7QA== X-Received: by 10.157.85.5 with SMTP id l5mr71429oth.7.1507918607400; Fri, 13 Oct 2017 11:16:47 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.85.214 with SMTP id z22ls2423480oti.4.gmail; Fri, 13 Oct 2017 11:16:46 -0700 (PDT) X-Received: by 10.157.45.110 with SMTP id v101mr72542ota.12.1507918606518; Fri, 13 Oct 2017 11:16:46 -0700 (PDT) In-Reply-To: <20171013180518.GD27286@protagoras> X-Original-Sender: jenny.f.bryan-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.org gmane.text.pandoc:18311 Archived-At: ------=_Part_17405_1332064224.1507918606110 Content-Type: multipart/alternative; boundary="----=_Part_17406_1320292604.1507918606111" ------=_Part_17406_1320292604.1507918606111 Content-Type: text/plain; charset="UTF-8" My problem is occurring at arm's length inside an R Markdown workflow (.R or .Rmd --> .md --> .html). I guess there's something else we're doing that causes ?URL encoding? of the image link. This is the pandoc error I ultimately see at the conversion to html stage for the affected image links: pandoc: Could not fetch fooabcdefghijklmnopqrstuvwxyz_files/figure-markdown_strict/unnamed-chunk-1-1.png%20%22fig:%22 fooabcdefghijklmnopqrstuvwxyz_files/figure-markdown_strict/unnamed-chunk-1-1.png "fig:": openBinaryFile: does not exist (No such file or directory) Error: pandoc document conversion failed with error 67 On Friday, October 13, 2017 at 11:05:11 AM UTC-7, John MacFarlane wrote: > > +++ Jennifer Bryan [Oct 13 17 10:57 ]: > > From my narrow view of the world, changing the CommonMark writer to > > match the rest here would be great! > > Done. > > > In my real problem, the presence of this "fig:" makes image links > > vulnerable to breakage via the insertion of a hard line break at the > > space before "fig:". Therefore I have to also manipulate text > wrapping, > > i.e. set --wrap=none or --wrap=preserve to protect the links. > > I don't get that. This is a perfectly valid image in > CommonMark: > > ![](foo.png > "fig:") > > > > > On Friday, October 13, 2017 at 10:31:12 AM UTC-7, John MacFarlane > > wrote: > > > > It's a kludge we use to distinguish images that should be > > treated as figures. You can turn off the extension > > entirely using > > -f markdown-implicit_figures > > I can also change the CommonMark writer so that the "fig:" > > prefix is removed, as it is in the other Markdown writers. > > +++ Jennifer Bryan [Oct 13 17 09:44 ]: > > > Why does the title "fig:" get inserted into this image link and, > > more > > > importantly, how can I prevent that? > > > $ echo '![](foo.png)' | pandoc -f markdown -t commonmark > > > ![](foo.png "fig:") > > > It appears to be fairly specific to CommonMark, i.e. it's not > > there for > > > other flavours of markdown. > > > $ echo '![](foo.png)' | pandoc -f markdown -t markdown_github > > > ![](foo.png) > > > > > > -- > > > 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 [1][1]pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To post to this group, send email to > > > [2][2]pandoc-...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit > > > [3][3]https://groups.google.com/d/msgid/pandoc-discuss/ > > 892c5a25-086a-4e19- > > > b4c1-8975cea8df0f%[4]40googlegroups.com. > > > For more options, visit [4][5]https://groups.google.com/ > > d/optout. > > > > > >References > > > > > > 1. mailto:[6]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > > 2. mailto:[7]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > > 3. [8]https://groups.google.com/d/msgid/pandoc-discuss/892c5a25- > > 086a-4e19-b4c1-8975cea8df0f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium= > > email&utm_source=footer > > > 4. [9]https://groups.google.com/d/optout > > > > -- > > 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 [10]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > . > > To post to this group, send email to > > [11]pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org . > > To view this discussion on the web visit > > [12] > https://groups.google.com/d/msgid/pandoc-discuss/3dcce503-9815-4a2d > > -aad9-b884f0e023aa%40googlegroups.com. > > For more options, visit [13]https://groups.google.com/d/optout. > > > >References > > > > 1. javascript:/ > > 2. javascript:/ > > 3. > https://groups.google.com/d/msgid/pandoc-discuss/892c5a25-086a-4e19- > > 4. http://40googlegroups.com/ > > 5. https://groups.google.com/d/optout > > 6. javascript:/ > > 7. javascript:/ > > 8. > https://groups.google.com/d/msgid/pandoc-discuss/892c5a25-086a-4e19-b4c1-8975cea8df0f-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer > > 9. https://groups.google.com/d/optout > > 10. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > 11. mailto:pandoc-...-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > > 12. > https://groups.google.com/d/msgid/pandoc-discuss/3dcce503-9815-4a2d-aad9-b884f0e023aa-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer > > 13. https://groups.google.com/d/optout > > -- 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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/d32e07da-beac-4710-b65e-7a02d9f76d43%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_17406_1320292604.1507918606111 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
My problem is occurring at arm's length inside an= R Markdown workflow (.R or .Rmd --> .md --> .html). I guess there= 9;s something else we're doing that causes ?URL encoding? of the image = link. This is the pandoc error I ultimately see at the conversion to html s= tage for the affected image links:

pandoc: Could =
not fetch fooabcdefghijklmnopqrstuvwxyz_files/figure-markdown_strict/unname=
d-chunk-1-1.png%20%22fig:%22
fooabcdefghijklmnopqrstuvwxyz_files/figure-markdown_strict/unnamed-chunk-1-=
1.png "fig:": openBinaryFile: does not exist (No such file or dir=
ectory)
Error: pandoc document conversion failed with error 67


On Friday, October 13, 2017 at 11:05:11 AM UTC-7, John MacFarlan= e wrote:
+++ Jennifer Bryan [Oc= t 13 17 10:57 ]:
> =C2=A0 From my narrow view of the world, changing the CommonMark w= riter to
> =C2=A0 match the rest here would be great!

Done.

> =C2=A0 In my real problem, the presence of this "fig:" m= akes image links
> =C2=A0 vulnerable to breakage via the insertion of a hard line bre= ak at the
> =C2=A0 space before "fig:". Therefore I have to also man= ipulate text wrapping,
> =C2=A0 i.e. set --wrap=3Dnone or --wrap=3Dpreserve to protect the = links.

I don't get that. =C2=A0This is a perfectly valid image in
CommonMark:

![](foo.png
"fig:")



> =C2=A0 On Friday, October 13, 2017 at 10:31:12 AM UTC-7, John MacF= arlane
> =C2=A0 wrote:
>
> =C2=A0 =C2=A0 It's a kludge we use to distinguish images that = should be
> =C2=A0 =C2=A0 treated as figures. =C2=A0You can turn off the exten= sion
> =C2=A0 =C2=A0 entirely using
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 -f markdown-implicit_figures
> =C2=A0 =C2=A0 I can also change the CommonMark writer so that the = "fig:"
> =C2=A0 =C2=A0 prefix is removed, as it is in the other Markdown wr= iters.
> =C2=A0 =C2=A0 +++ Jennifer Bryan [Oct 13 17 09:44 ]:
> =C2=A0 =C2=A0 > =C2=A0 Why does the title "fig:" get = inserted into this image link and,
> =C2=A0 =C2=A0 more
> =C2=A0 =C2=A0 > =C2=A0 importantly, how can I prevent that?
> =C2=A0 =C2=A0 > =C2=A0 $ echo '![](foo.png)' | pandoc -= f markdown -t commonmark
> =C2=A0 =C2=A0 > =C2=A0 ![](foo.png "fig:")
> =C2=A0 =C2=A0 > =C2=A0 It appears to be fairly specific to Comm= onMark, i.e. it's not
> =C2=A0 =C2=A0 there for
> =C2=A0 =C2=A0 > =C2=A0 other flavours of markdown.
> =C2=A0 =C2=A0 > =C2=A0 $ echo '![](foo.png)' | pandoc -= f markdown -t markdown_github
> =C2=A0 =C2=A0 > =C2=A0 ![](foo.png)
> =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 > =C2=A0 --
> =C2=A0 =C2=A0 > =C2=A0 You received this message because you ar= e subscribed to the
> =C2=A0 =C2=A0 Google
> =C2=A0 =C2=A0 > =C2=A0 Groups "pandoc-discuss" group.
> =C2=A0 =C2=A0 > =C2=A0 To unsubscribe from this group and stop = receiving emails from
> =C2=A0 =C2=A0 it, send
> =C2=A0 =C2=A0 > =C2=A0 an email to [1][1]pandoc-discus...@googlegroups.com.
> =C2=A0 =C2=A0 > =C2=A0 To post to this group, send email to
> =C2=A0 =C2=A0 > =C2=A0 [2][2]pandoc-...@googlegroups.co= m.
> =C2=A0 =C2=A0 > =C2=A0 To view this discussion on the web visit
> =C2=A0 =C2=A0 > =C2=A0 [3][3]https://groups.google.com/d/msgid= /pandoc-discuss/
> =C2=A0 =C2=A0 892c5a25-086a-4e19-
> =C2=A0 =C2=A0 > =C2=A0 b4c1-8975cea8df0f%[4]40googlegroups.com.
> =C2=A0 =C2=A0 > =C2=A0 For more options, visit [4][5]https://= groups.google.com/
> =C2=A0 =C2=A0 d/optout.
> =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 >References
> =C2=A0 =C2=A0 >
> =C2=A0 =C2=A0 > =C2=A0 1. mailto:[6]pandoc-discuss+unsubscribe@= googlegroups.com
> =C2=A0 =C2=A0 > =C2=A0 2. mailto:[7]pandoc-...@googlegr= oups.com
> =C2=A0 =C2=A0 > =C2=A0 3. [8]https://grou= ps.google.com/d/msgid/pandoc-discuss/892c5a25-
> =C2=A0 =C2=A0 086a-4e= 19-b4c1-8975cea8df0f@googlegroups.com?utm_medium=3D
> =C2=A0 =C2=A0 email&utm_source=3Dfooter
> =C2=A0 =C2=A0 > =C2=A0 4. [9]https://g= roups.google.com/d/optout
>
> =C2=A0 --
> =C2=A0 You received this message because you are subscribed to the= Google
> =C2=A0 Groups "pandoc-discuss" group.
> =C2=A0 To unsubscribe from this group and stop receiving emails fr= om it, send
> =C2=A0 an email to [10]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org= .
> =C2=A0 To post to this group, send email to
> =C2=A0 [11]pandoc-...@googlegroups.com.
> =C2=A0 To view this discussion on the web visit
> =C2=A0 [12]https:= //groups.google.com/d/msgid/pandoc-discuss/3dcce503-9815-4a2d
> =C2=A0 -aad9-b884f0e023aa%40googlegroups.com.
> =C2=A0 For more options, visit [13]https:= //groups.google.com/d/optout.
>
>References
>
> =C2=A0 1. javascript:/
> =C2=A0 2. javascript:/
> =C2=A0 3. http= s://groups.google.com/d/msgid/pandoc-discuss/892c5a25-086a-4e19-<= /a>
> =C2=A0 4.
http://40googlegroups.com/
> =C2=A0 5. https://groups.google.com/d/optout
> =C2=A0 6. javascript:/
> =C2=A0 7. javascript:/
> =C2=A0 8. https://groups.google.com/d/msgid/pandoc-discuss/892c5a25-0= 86a-4e19-b4c1-8975cea8df0f@googlegroups.com?utm_medium=3Demail&am= p;utm_source=3Dfooter
> =C2=A0 9. https://groups.google.com/d/optout
> =C2=A010. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
> =C2=A011. mailto:pandoc-...@googlegroups.com
> =C2=A012. https://groups.google.com/d/msgid/pandoc-discuss/3dcce503-9= 815-4a2d-aad9-b884f0e023aa@googlegroups.com?utm_medium=3Demail&am= p;utm_source=3Dfooter
> =C2=A013. https://groups.google.com/d/optout

--
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 post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/d32e07da-beac-4710-b65e-7a02d9f76d43%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_17406_1320292604.1507918606111-- ------=_Part_17405_1332064224.1507918606110--