From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31640 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: How to center an oversized figure (md to tex to pdf)? Date: Mon, 24 Oct 2022 11:06:30 -0700 Message-ID: <0D15DED9-6919-491B-A635-A08F7DC42693@gmail.com> References: <6268051b-bc26-4c5a-a1ba-32790dbc8271n@googlegroups.com> <247E0FC5-5E0D-4EAD-8D9D-07DDD5732E02@gmail.com> <92231fef-1dff-4799-b934-eaf85de4dec8n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) 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="30631"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBBKNI3ONAMGQE4RX2TXQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Oct 24 20:06:37 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-vs1-f64.google.com ([209.85.217.64]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1on1qP-0007lz-5j for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 24 Oct 2022 20:06:37 +0200 Original-Received: by mail-vs1-f64.google.com with SMTP id q68-20020a675c47000000b003aa20e77e27sf779548vsb.21 for ; Mon, 24 Oct 2022 11:06:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1666634796; cv=pass; d=google.com; s=arc-20160816; b=yigzIlNA99U1jjSGChdt8BJIDY9cP1PMp/DsLQQq1eR3QsR+e/6g+wefIChx+0QgHA Bhg8A7cWladwQ3GQn5iD2WulzAoot6A4LHLtvmHwuwTnd8ZHZAHPP3wVeOd1cIPJiy20 ctfVQ49DzT7xDNHC6uE8qr0B07Pqp+l2TvTgNirl9UBUl9NYO4fORSUQcs46a0o+4cga tw4KS5TPlryeI5meY5388ZDhheragrzOIVwe5znfctGWHyJjGgYtTeorjvu8RoFc9BRh 3gdVuNQv0cAckrOyeSp9Jutf6T4Ek7O1LZYMV0NPhvKzmCPA4gNorolJAiM3dr3HXDJW ZS5Q== 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:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=YZi5Ze37abtb4GnUTDj3W7xVtie8u40yVw/OV5v0UUw=; b=y7C42iEDssgEbWWOr8WIIkZek5hsEpr7ePS8vx7mW5VKzhTzRpI0Lyd+mUpvrJQVTs IOZi88/NX8i8YbunQL0/ZKyntSZLJuu5aLvFxQ7y73Jc7Ao43wPvI9+3BmtpR/ZNbHMz yNHgqwfBrOgbo+o0LD4iohMwKbyQtOfg0y8tS23YqYL4VTDdFiLG331FuTT+fNlbtzEq qSvJT0sPNU7Bvmj0dMEtcnWmEFMw9eEI2vhY6hE/RdlgmXxffAeZ7kmPm4DwfvVtdlSa nQ91SK05MVMgBT5Ebzx/+zR6Jbdl5VQG7O3TBxA3zuH2n0IFc2Vwj8+dsbkwlODoqhg1 LqXw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y6eJKyf+; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::631 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=YZi5Ze37abtb4GnUTDj3W7xVtie8u40yVw/OV5v0UUw=; b=DOhw9mgiXQmboNJi8m/7w3nZm34Nzvfp6XGOtrqx449xA3dXX3FjHdTvITO2YUy5Qt HKV72dWZDtHEpO6m5laEwByQQ62OILj2asATFL9DdLPzuYCiTVQEEWET+Sm++qA0dkop 5Ci36cknKOjLh5fTPfzpgYFL/Cn9BcacbPN9K1YyfKhM9tf1fMgf6tDSIZYJVD/mo/8A 2mBZU1p/fW+jbJ/hTp//gQZj+TebXtTLtbgc+JmW3MF2ecmxETtAZEhjxzG1ojgT9Nm+ kcMMH/Wi3W4opW2kEvFHnSP85EVIUnokHKaSehjXOIwA20vOn2G4NG9/cT29mJha4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=YZi5Ze37abtb4GnUTDj3W7xVtie8u40yVw/OV5v0UUw=; b=LBJW/PLw6PdqBZWLsUOowxB04J10CeQkF6XRBshxbSOyIVGUEjyPQP9aT17Oiln1Oi wgPOO7zKiAsmjW0Z4n0SMbPzUxpKUiHLufq1birvrcgEo9QKI8JdyBw0XZxBA9jGPGAQ F3O11gD7u+hLZga/G2WQxCxs/ed/LvTKLotIMDtKZDjAm1ptHpvm87LrBsy+8PignQno DKusS8sbk/rh++byB68QZhvDHOqib6fKR7O0X+GGeZtqcgusPpJ8s+yT9BMG1HDEaJ+X LrCdCqInGYr144utUPg1Sn8fh7ZPnl7ZVLIij6hB5R+k9EQjrxj5qkCpfEGrAfwtXcaM s X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=YZi5Ze37abtb4GnUTDj3W7xVtie8u40yVw/OV5v0UUw=; b=EW9W3PHlTpvFNynolWPv1ik2bioQyntpkJbH9PyN/LCg0ksNuMwM0fTuRGCfhqXIJ0 zLi+76FCHlf7JWSEjLaDQ+84ir7Bc4v7mjr6JPgFsmdzIMG6V1tTZ5N9XW2RhPQEH2U1 gwl72p8uyvBZHj0iadLzl8x7mv4yilcdVj/h4hAZoMUSaPDMiMfDfFbCPmN3y3qGpXi0 B+dC4s7rO6G49Uw9oI7fDERFpsTSD8vcbfTUYUpKIumNTvhjhTHnBVC/saFgTpKck5H/ PqxidVanWOqP3oYO+R9M Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf2QpuGfBlcBnv58YqrVRw7FDZYjrXKMxwWBUz8k3w/SF5aWLtlT tB6kKztCDQqi3IpwePzjbKU= X-Google-Smtp-Source: AMsMyM4LvmjJNafjhH49re/ExoMmH5OhEUf8paaxCTVXcHiMn73IifsDiubVC24i68miVx8DLhDkBg== X-Received: by 2002:a05:6102:74c:b0:3a7:92f9:a9b8 with SMTP id v12-20020a056102074c00b003a792f9a9b8mr21139393vsg.41.1666634796161; Mon, 24 Oct 2022 11:06:36 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6102:23cd:b0:390:7ede:5884 with SMTP id x13-20020a05610223cd00b003907ede5884ls1902672vsr.2.-pod-prod-gmail; Mon, 24 Oct 2022 11:06:33 -0700 (PDT) X-Received: by 2002:a67:15c5:0:b0:3aa:2234:9773 with SMTP id 188-20020a6715c5000000b003aa22349773mr2994666vsv.76.1666634793240; Mon, 24 Oct 2022 11:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666634793; cv=none; d=google.com; s=arc-20160816; b=rlRkEislZYiRDSpFw3QPqgF0Yr+fhdwOLYdtxWcX9RnO8axnAi3nK9kp/dieWCjCqX cCFtcE7KbnGLB4ttLxm7VVUiWRa2cXCw1MJz1vHfkOVgjj0IKTxFU5rfpI3ZYsyFPX6P iltsSemzhSV20+S8gbMcTjQd/vzH7Wp4lUsPQSAT/AC6y+TNyJSHfHWhUGbRlfNP25AX KSaT2a+m6FcYq/j9GBKafrC46P0N+h9OjWgYHXTwevm+ih3I5zuhYlkX7hSVNOpyAZSa pqUyaKpHZ9HcsOApAKUCfOuIMRgPyaFYJaK0pp2nfk5GzafxFAx48Gwbm5x24OhUsEQZ Xrrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=oGDt5tBptztg7341lPIDvx7o/TMkcbIhldg0+KiA5Fo=; b=wYnUp8Q+YHnDW4Z8aWayCsHtKMOqYabvh3a/nsybdOL//youaAgzWOyswyx2eOd4Re HEjExQweSlUcBFNoMY6dBCcoRe5gCZrKkxQx0vI4My/HCAsViLeEEyEIMnwhbVTpR7BX sguB5a2Uj80kSgoqx7s1ZmGvRFw6hGSgQK3U+5b47a7aSmiHmTskWn0uOXkKsoFpsoSk js1nASTEiB7JHvRhEcLnHXVqW04Oxw3d/+gGR/zl/kHq1FANtHr1LMwPz6B56ukIfFKE 2ciKivThCIO/TM7t6uBURE9HHiYcgxrpJbfjxpyZDsUXawRcT6e26dHlANrr3BXj5xgO xoJQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y6eJKyf+; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::631 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com. [2607:f8b0:4864:20::631]) by gmr-mx.google.com with ESMTPS id 204-20020a1f02d5000000b003b3b114b8ffsi17778vkc.1.2022.10.24.11.06.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 11:06:33 -0700 (PDT) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::631 as permitted sender) client-ip=2607:f8b0:4864:20::631; Original-Received: by mail-pl1-x631.google.com with SMTP id y4so9133034plb.2 for ; Mon, 24 Oct 2022 11:06:33 -0700 (PDT) X-Received: by 2002:a17:902:ea06:b0:185:3d64:8d55 with SMTP id s6-20020a170902ea0600b001853d648d55mr33987431plg.7.1666634792469; Mon, 24 Oct 2022 11:06:32 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:644:400:7c40:fd6d:e541:74ba:6aa8]) by smtp.gmail.com with ESMTPSA id p3-20020a170902eac300b0017a032d7ae4sm47307pld.104.2022.10.24.11.06.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Oct 2022 11:06:31 -0700 (PDT) In-Reply-To: <92231fef-1dff-4799-b934-eaf85de4dec8n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Y6eJKyf+; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::631 as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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:31640 Archived-At: I haven't been able to get good results using adjustbox and center, in my t= ests. Either the aspect ratio is wrong or the whole thing is not 1.66 size. In any case, I wouldn't want to depend on adjustbox in the default template= . If this solution actually worked, I'd be tempted to allow a center attribut= e to propagate through (though there is risk that people will do this and then g= et confused because the custom template doesnt' contain adjustbox). But I can= 't get it to work well, even specifying the specific version of adjustbox as y= ou do. > On Oct 22, 2022, at 2:30 AM, Niko wrote: >=20 > If the figure is oversized (larger than \textwidth), it needs special han= dling. Otherwise, in the pdf the figure will start at the end of left margi= n, and only overflow to the right margin.=20 >=20 > On Friday, 21 October 2022 at 19:40:56 UTC+3 fiddlosopher wrote: > I'm confused. The code pandoc produces already contains \centering, which= should center the graphic.=20 > Did it not do this?=20 >=20 > > On Oct 18, 2022, at 3:17 AM, Niko wrote:=20 > >=20 > > Hi all,=20 > >=20 > > I am trying to center figures on pdf. The main.md has:=20 > >=20 > > ![some text](some-figure.png){width=3D166% #fig:figlabel}=20 > >=20 > > The created .tex file has=20 > >=20 > > \begin{figure}=20 > > \hypertarget{fig:figlabel}{%=20 > > \centering=20 > > \includegraphics[width=3D1.66\textwidth,height=3D\textheight]{some-figu= re.png}=20 > > \caption{some text}\label{fig:figlabel}=20 > > }=20 > > \end{figure}=20 > >=20 > > I read from here that a possible solution is to use=20 > >=20 > > \usepackage[export]{adjustbox}[2011/08/13]=20 > >=20 > > in latex preamble and add "center" argument to includegraphics, like so= :=20 > >=20 > > \includegraphics[width=3D1.66\textwidth,height=3D\textheight, center]{s= ome-figure.png}=20 > >=20 > > I tested it and it works. Now, how would one add arguments to includegr= aphics from within markdown? Another solution I came up with would include = redefining includegraphics in latex preamble to always have the "center" ad= ded, but I feel that is a bit hacky. Is there a better way?=20 > >=20 > > Regards,=20 > >=20 > > Niko=20 > >=20 > > --=20 > > You received this message because you are subscribed to the Google Grou= ps "pandoc-discuss" group.=20 > > To unsubscribe from this group and stop receiving emails from it, send = an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 > > To view this discussion on the web visit https://groups.google.com/d/ms= gid/pandoc-discuss/6268051b-bc26-4c5a-a1ba-32790dbc8271n%40googlegroups.com= .=20 >=20 >=20 > --=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-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit https://groups.google.com/d/msgi= d/pandoc-discuss/92231fef-1dff-4799-b934-eaf85de4dec8n%40googlegroups.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 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/0D15DED9-6919-491B-A635-A08F7DC42693%40gmail.com.