From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32279 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Bastien DUMONT Newsgroups: gmane.text.pandoc Subject: Re: Including SVGs with LaTeX math in Pandoc? Date: Mon, 6 Mar 2023 15:46:53 +0000 Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39887"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDCINCES2QJRB4MVTCQAMGQEZHDBVJA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Mar 06 16:47:03 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-lf1-f64.google.com ([209.85.167.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1pZD3F-000AAZ-JA for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 06 Mar 2023 16:47:01 +0100 Original-Received: by mail-lf1-f64.google.com with SMTP id g33-20020a0565123ba100b004dc6259b7acsf2879134lfv.6 for ; Mon, 06 Mar 2023 07:47:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1678117620; cv=pass; d=google.com; s=arc-20160816; b=dzgl2AiH3+5NPQ3xpKQHYq3hD6dX5cR30xrr0KpidRNEUMoh57zdRHzbXK5ohMKWqy SeGHLGwYE6VwB9kzI2sAzzGRGmJmv3qXZpCcoIRv3cn8HRlNUItISlMUwqt2y/5N6t5b URy0uKnFqkWuz8TnmsBaCwrPR/DkbmLxpwtVwnBlOkGw2K6czVRnKT2n4V1os5yTCdYN 6LR+aTMmA/InosRZPzB6JXgzFGOPDIMAfTe164ZLa5uMk1FhQ+ofvmPTp/Nudzj5ZmBR 7JM2jE3mP31qkMdzHeybU7JfcdXSuuZDIxmgF9h4rlcXsPpZKrW/VYdFTfIux7hpCwjZ 0Z0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:to:from:date :sender:dkim-signature; bh=JiaZc7Gg+Eho1IhrZTm20LssYLIHU9L0ADmtYYoZ7es=; b=ZayZqIBImpLo+zqimDZCMDSZdwm8fpF12lpbKcqVsgcpdhxIVUu8oiHajd9i66Wmod IG1DP6+wbbCGS674pVeR5dybokjW+sIA2HEjJexk1r2O+7pPHhenvampySg7rje5bPJ+ PgvY2bcIrG3DhsIAV9vlrmyDeMNJY4PSk5BHDphUzAEKxnBWCu6foteOqHJXAa4WQk0x kGvjdbzjWxcspQUHjf7/JtA8IMivlRLEXp16IO6hmDFX4xP6G5mw/x6s0kjNnzC93d8g Z2sntRgIK9ResXz5DvaDKPjtpIayp+21wpshTiZcQTbRGqzug2CwjLk5X7HimjimIp9B k3CQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=ZjDX0lF4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; t=1678117620; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:content-disposition:mime-version :message-id:subject:to:from:date:sender:from:to:cc:subject:date :message-id:reply-to; bh=JiaZc7Gg+Eho1IhrZTm20LssYLIHU9L0ADmtYYoZ7es=; b=mxG8Tv9G+p81eBWQ8H6gcQC2yiLtcx5EEz0Josle7qSicDvUxXD7qMGhfGWzRLhhoz oO/S2x+iDBBSqZWvkiKni6s8dbtYLtRzgOa3dIhFvsViJk3Qkz3S5M0mq4tCVlap4xIc inO9yQcXjx5LhCH8wxOwBf1n660cQlrtc+wVrsNVPsT+DeGPRl7YPpmbtN8334gIFcSW UdFDly11rlH4pjBb5vZIer7KMnOd/zn12C3ZeHXAd/zeEVkgJ4g9ZW/D4quvxk8Nq8sa +70JUc1sRE6Jrmaz6zczoMMXbHNZL63FOW9qfDTj6cZuc2XKbU/o3v X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678117620; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:content-disposition:mime-version :message-id:subject:to:from:date:x-gm-message-state:sender:from:to :cc:subject:date:message-id:reply-to; bh=JiaZc7Gg+Eho1IhrZTm20LssYLIHU9L0ADmtYYoZ7es=; b=O/vLRCK1J4G5hSWzPVjjAxc5X/NmpBIokD6ittmxT4Le3M6OstKs33wmJN0BQ9Sb6u LNecFvElBAJ9euojQoX+QM+CLNBckcmXYRMabHLN3vHaWV1VVMm9H6ZioikJea0Vy9E6 WCFhQuveed1bQombMTVH7BGtA8NWTBFlVfy/x1PpUMfB6oHf5UrSko3HyqsI+da0ky3E wT2HwQ83Gg+yPSc6bgtpIVkDYZbWJ0QZAi1DxoVpNYEv2ePrGEBBRSTr6NaLg4pnZFzv HiAxmKFrS Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AO0yUKWlqRmeQ8jB3IEIuhrlsIYOxnTBZ9lSLAAmdgazObEI7v+ZppqP cZ5do6yudnOqdDmNB2PHS+s= X-Google-Smtp-Source: AK7set/6yRe3PTAl3+Q9GGm5U9yyVwfYCEA9XL/+kHgaBfGUiWowXIgarZUB3cq3lR+Ug+JpHl66NQ== X-Received: by 2002:a05:651c:231b:b0:295:ac45:f08e with SMTP id bi27-20020a05651c231b00b00295ac45f08emr3328903ljb.7.1678117620161; Mon, 06 Mar 2023 07:47:00 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6512:3ca4:b0:4db:51a5:d2e8 with SMTP id h36-20020a0565123ca400b004db51a5d2e8ls1614802lfv.2.-pod-prod-gmail; Mon, 06 Mar 2023 07:46:55 -0800 (PST) X-Received: by 2002:a19:c20a:0:b0:4dc:4c4e:4e57 with SMTP id l10-20020a19c20a000000b004dc4c4e4e57mr3128834lfc.57.1678117615828; Mon, 06 Mar 2023 07:46:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678117615; cv=none; d=google.com; s=arc-20160816; b=YRMQwqGX4dAXq2l3NJUoV7Iw0gXFmSRuk6zsYavul/+yvITiMCBrhJtXygVD9GfaNV +taX7o1sB1Q6I4KNqRriETu7y9DZzSMr9pwHx8nRpTQRal5bFseFBtN5EfLgOgfigaQ1 1Kp2U69uSdBEmzdKxityq/FCD8cFlRZe9GPUeFPz7TcgPEMpICeakyFxn20bqNmINUHR 2B2ywCWxMft+3FPhwJCCkKt5a+m+MASMm1yGbh+9SY/coHmYly1pW+wz3Vq4P3vluD/m s5wxkm4y2DljXsQhYlaP/8t1vCi/mY9xlELZYoc9QiQU0iHF+RRmWvlYjv6XddZApjMt u/nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-disposition:mime-version :message-id:subject:to:from:date:dkim-signature; bh=AlwQUP9a476TtBaxKZD+CXVKMkY2Nzv3reJlZt/fGJU=; b=n7ovt6zp3oRdi46mnTWiDyhszgwinkVCpmEHyxGI+t/ItV48P4Os4Oz5cD2gyX2uV+ 76DnwmXpqWZA2b1hP5U56DYQbHNxBwYBTS4C+xHH9KsuHQScQ4YxVfIU5yvoBpUkJ/Md gW82yQL6xhLMiD93wJ5sKi4BQCGGsU5fR3Th6F6IyCGh/6hunrkL07mm4gNxM93Wew0h 0owsH9NIRkd7E9BEqJtpR7TNiNyjNUG0DGDTW2SvvPuh2SzFP1/8y6PCv9vRXpZOp+Vn fF3/QZ67Gbfu2ogsJQ+NKlFybRVoBtAL4X3pJ11L2KDPPJb8HgjoSrKbTQpRjDLtA0cx IcHQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=ZjDX0lF4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net Original-Received: from mout02.posteo.de (mout02.posteo.de. [185.67.36.66]) by gmr-mx.google.com with ESMTPS id d29-20020a0565123d1d00b004dd84067a4asi490904lfv.4.2023.03.06.07.46.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 07:46:55 -0800 (PST) Received-SPF: pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) client-ip=185.67.36.66; Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 4BF4A240295 for ; Mon, 6 Mar 2023 16:46:55 +0100 (CET) Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PVjcZ6K2Wz9rxR for ; Mon, 6 Mar 2023 16:46:54 +0100 (CET) Content-Disposition: inline X-Original-Sender: bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@posteo.net header.s=2017 header.b=ZjDX0lF4; spf=pass (google.com: domain of bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org designates 185.67.36.66 as permitted sender) smtp.mailfrom=bastien.dumont-VwIFZPTo/vqsTnJN9+BGXg@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=posteo.net 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:32279 Archived-At: You can include the command directly in the resulting LaTeX document. This = filter should do the job: ``` function Image(image) local file =3D image.src if FORMAT =3D=3D 'latex' and string.match(file, '%.svg$') then return pandoc.RawInline('latex', '\\includesvg[scale=3D1.0]{' .. file .= . '}') end end ``` Le Monday 06 March 2023 =C3=A0 04:11:37PM, A A a =C3=A9crit : > I=E2=80=99d like to include SVG graphics in my LaTeX document using pando= c. I > understand this is currently [1]not supported so I have resorted to the i= dea of > performing the SVG to PDF conversion externally and then including in my > markdown using something like this: >=20 > ![whee](foo.pdf) >=20 > I would prefer not to do this conversion using raw inkscape because the s= vg > package in LaTeX has the added advantage of rendering LaTeX math within t= he > figure if it encounters LaTeX math in the SVG. This won=E2=80=99t happen = if I only use > inkscape. >=20 > Unfortunately, I haven=E2=80=99t found a way to ensure that the resulting= PDF is > cropped to the extents of the image after doing a LaTeX compilation. For > example: >=20 > \documentclass{article} >=20 > \usepackage{svg} >=20 > \begin{document} > \includesvg[scale=3D1.0]{idea.svg} >=20 > \end{document} >=20 > will compile as a full A4 sized page with page number. If I then include = it in > my markdown as ![idea](idea.pdf) I=E2=80=99d get the whole page as my =E2= =80=9Cfigure=E2=80=9D and not > only the SVG. >=20 > How can include SVGs with LaTeX math in Pandoc ? >=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 [2]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit [3]https://groups.google.com/d/m= sgid/ > pandoc-discuss/ > CAMwawgPKcXu-CapB6d_vSWc7%3DvfA_sQSzFnnv4nGBurq6%2BMkEw%40mail.gmail.com. >=20 > References: >=20 > [1] https://github.com/jgm/pandoc/issues/265 > [2] mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > [3] https://groups.google.com/d/msgid/pandoc-discuss/CAMwawgPKcXu-CapB6d_= vSWc7%3DvfA_sQSzFnnv4nGBurq6%2BMkEw%40mail.gmail.com?utm_medium=3Demail&utm= _source=3Dfooter --=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 e= mail 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/ZAYK7Z%2BjpC9LlcAc%40localhost.