From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/28711 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Liwei Ma Newsgroups: gmane.text.pandoc Subject: Re: How to change image extension from svg to pdf? Date: Tue, 29 Jun 2021 01:54:18 -0700 (PDT) Message-ID: <46cd09c4-34b8-4d7c-962b-1f4e04bdff5en@googlegroups.com> References: <350f80e8-7767-4498-acf4-6e468d66770dn@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_3728_522473147.1624956858701" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7298"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDHYRAN2TAKBBO575ODAMGQEVJ23RFQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Jun 29 10:54:22 2021 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f62.google.com ([209.85.210.62]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ly9Ve-0001e7-07 for gtp-pandoc-discuss@m.gmane-mx.org; Tue, 29 Jun 2021 10:54:22 +0200 Original-Received: by mail-ot1-f62.google.com with SMTP id e14-20020a0568301f2eb0290405cba3beedsf14971293oth.13 for ; Tue, 29 Jun 2021 01:54:21 -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=P54kmkPewY4JVZZ02dHQGthHe2BEueTGpqafIOna+3Y=; b=NAqpzDP68cm2hrrjyi7Zm7yWRhgBuPfAaHpY43Fti+YcNG0qk6ODW+5pPjVDClEnhJ oMQPwJV+yBK+aCC1VCA7ddNhe0rAtQ/l2DaGr6s12D/Z6uNUc2QKMgNL/4cHOGkxJrhi QW8n+fZjgCEdcksEvayKsYAbMFFpNQWmkY0YclQBKKKzVJER6cQpdKGItEa2t1tqucCB z/86RNhiMHqjyoY/rUYaoEN8iyHUcBNZX/Al5Aj4tnB5dp8PUTr6PqzIpGCBpkGR50o9 9Cb2YwFzEPfIoFNhOmSceVVNq4Dx2UP6xC3Ku6U8/MYg0sG+W6DgaczGgmRmUiXPhvLE G6yA== 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=P54kmkPewY4JVZZ02dHQGthHe2BEueTGpqafIOna+3Y=; b=VgSdDalifyjBiB6z7VTSqedLbj3O7ODl2rKE2kzK8AdJ/DRg1KXPmeyx/b3fPyNGsK QubUE+doMgH9JOWI3FdftPqJNQVsiyLUf5xe7RNQdR0MHPuxqQnZ6T36U2PKkKXO64Hr IpSnncaDfufm5DrIwZlTs1h9XLhtfWKmCJDKMraLktv8soYHL7mppzgcbJrsn7s8K3rX 4dVb8h6YdU/3qLcWi4cl44ngt3pGFrLmbwbwQsgfUef4hZCCK7Vx6PImz7DPW8wcYwyd +CGsZWkbopaDrKj4sH3un1EtfH/iANQ7pNRYbK5WYoKtKbqFjhqlzY24z4HU7lrjyz/T whCA== 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=P54kmkPewY4JVZZ02dHQGthHe2BEueTGpqafIOna+3Y=; b=JF6j67P62rdNjCF8hmvwIx8CA07Q6RLa4tGfp9a0J+H1nMcCAO09Lk+0W9QDWjKn29 BCS2PuUiWHjqYvSXf9Uf16TdOTvym0Ntox81WSpcgCUzLLIMuIhBjoMwIX3cPVfatP8T uNMY0hCIu26Gv5N8PD/bFVz2K4yekbC2U6DbyId39E6Z+oiTscqPofOImz20gMU+chpm RnbNwF4MhqdioIaAV4OlzaZB30+kNRf6zKoF5SBqrrbiNNXR8U/ltqQnArcPVyT58o5A oMVCsXB5vsUMX141NUhw09Isy0fPncaJ4zCp8/+9/J4Dye2k1/lnmd83X2jh+GgMn+xA dldw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM532gQOOlAZ1CnFsbRRjHwIMM8HxJ/6KKVba95ipKNXKDxyGxTuoH 1656HIw8vtzTzaazH8qhFys= X-Google-Smtp-Source: ABdhPJwV3RX6MjxNFc1oDeT9jMJjUojBhR0J/YanvisopJnr+FKxH6rVkvM7D2l/bbuLjlzkl0Erqw== X-Received: by 2002:a9d:7197:: with SMTP id o23mr3629725otj.81.1624956861030; Tue, 29 Jun 2021 01:54:21 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a9d:7c1:: with SMTP id 59ls7581206oto.8.gmail; Tue, 29 Jun 2021 01:54:19 -0700 (PDT) X-Received: by 2002:a05:6830:1da3:: with SMTP id z3mr80972oti.312.1624956859373; Tue, 29 Jun 2021 01:54:19 -0700 (PDT) In-Reply-To: X-Original-Sender: liwei.ma-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:28711 Archived-At: ------=_Part_3728_522473147.1624956858701 Content-Type: multipart/alternative; boundary="----=_Part_3729_1865894859.1624956858701" ------=_Part_3729_1865894859.1624956858701 Content-Type: text/plain; charset="UTF-8" Many thanks, it works! On Tuesday, June 29, 2021 at 1:00:35 AM UTC+8 John MacFarlane wrote: > > This lua filter should do the job: > > function Image(el) > el.src = string.gsub(el.src, ".svg", ".pdf") > return el > end > > Liwei Ma writes: > > > Pandoc supports ' --default-image-extension= ' to add a custom extension > to > > an image in markdown. While most markdown editor don't support to add a > > default extension to the file name and cannot render right with images > that > > omits extension. > > > > So in an editor, one has to remain the extension such as 'file.svg' for > > better rendering. While in pandoc script, it is better change the > '*.svg' > > to '*.pdf' for image files. > > > > Is there an easy way to do this? Or how to write a filter to do this? > > > > Best regards > > > > -- > > 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/350f80e8-7767-4498-acf4-6e468d66770dn%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/46cd09c4-34b8-4d7c-962b-1f4e04bdff5en%40googlegroups.com. ------=_Part_3729_1865894859.1624956858701 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Many thanks, it works!

On Tuesday, June 29, 2021 at 1:00:35 AM UTC+8 John Mac= Farlane wrote:
liwe...@gmail.c= om> writes:

> Pandoc supports ' --default-image-extension=3D ' to add a = custom extension to=20
> an image in markdown. While most markdown editor don't support= to add a=20
> default extension to the file name and cannot render right with im= ages that=20
> omits extension.
>
> So in an editor, one has to remain the extension such as 'file= .svg' for=20
> better rendering. While in pandoc script, it is better change the = '*.svg'=20
> to '*.pdf' for image files.
>
> Is there an easy way to do this? Or how to write a filter to do th= is?
>
> Best regards
>
> --=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/3= 50f80e8-7767-4498-acf4-6e468d66770dn%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/46cd09c4-34b8-4d7c-962b-1f4e04bdff5en%40googlegroups.= com.
------=_Part_3729_1865894859.1624956858701-- ------=_Part_3728_522473147.1624956858701--