From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31618 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Niko Newsgroups: gmane.text.pandoc Subject: How to center an oversized figure (md to tex to pdf)? Date: Tue, 18 Oct 2022 03:17:42 -0700 (PDT) Message-ID: <6268051b-bc26-4c5a-a1ba-32790dbc8271n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_696_450047394.1666088262523" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30150"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCP7DLV7XYJBBWMMZONAMGQEIWLWR3I-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Oct 21 18:18:38 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f59.google.com ([209.85.210.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1olujE-0007W2-FM for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 21 Oct 2022 18:18:36 +0200 Original-Received: by mail-ot1-f59.google.com with SMTP id v23-20020a9d7d17000000b006622e45ddf9sf716536otn.18 for ; Fri, 21 Oct 2022 09:18:36 -0700 (PDT) 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-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=y0pPVa56dg/H92Suv5Liq5Q2NaD71LG/2uXcOy5RAZo=; b=TiYTIaWU1rOMsJJb6EMGtE/n/1vSIjEOUqSWxd/5HzdeiJVjRMkezm36QTzR6MjZHM IuyccMbQ+1SfVRwS321wBBuxuNWhlHfeDC4jhZbMsWcQV+mESpapSq28CKE+cCjVlKDE 89CTImUhsEu2XdjBByllps2ARs/ffQyErnCOLNP4MsZiWXu7pKg/gaVQ6BNc2GTjbaaa SglxUy1fzfGAU8Iu5e7NQ8+dj8mimpqGOh0S2BZlV55WHyp6Wfr1PHT5Lyu2CHJQs5ZD 4DgAAAHM32b/aDEc+VzwjJjitY8zFfJ1kZAYUDGvAyU7lGlL2eUwoEVgXwa5SWrR/aif rSCw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pasanen-me.20210112.gappssmtp.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=y0pPVa56dg/H92Suv5Liq5Q2NaD71LG/2uXcOy5RAZo=; b=ZKQm0d11Gkv8mRn1gNTXrjMFSb/GMzHj7JXG04VNTeqDV3pIGOXZQWJeyDycwcYsT7 uznoQGg8mnJqjcGip7YBgMXWFK+7Yuzyc2sfEcFYGhYFqbMEYqIX5TViCd4eHHafjx4S HJBUxL1MbcgBS3DWQYMTE3QfQCYZyh+kEgJxZ0vE8EDG63dgeYh5VHTGZv/quGiuXVEb Whv+3Hhky1AmnSudjVh4DKtL6qqJSnPVHUtHzXdwIHC3jrW1Aj+/3NvMOhyArR2ospRM MWkOhbSu8jPW07wOT5WtA2kb5xKFUrT0vn0wPPnNnkp34n7+CDhQ/M5ZHKH7/OyBtGKI anng== 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 :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=y0pPVa56dg/H92Suv5Liq5Q2NaD71LG/2uXcOy5RAZo=; b=PxsEwwjS5pWL9w7As+Y8q0XIdkpcStWn2/fpy7+ZwSRMxPmGb5aw5EXeZwEOiMuE2P VKl2dhcpeuSOznBXcXwtb4poWIUkQe6u0VQ9fq1XF+C6Bu5X1J7mMAVWbWEWWnLxNMS/ wEOW/BoVJoCOBE1hJNwdqOW1twRR1TfoNLXwsVpExCvRhts6aUD5bvd/TXAUp0YKdC2L 0VbB2zW4H7NDTRLgNXSWGmzJh4Sxyll3xl0XGexHCGTavYY1r/Log27Ytga92kMp78cK +JPD0qP49vkGtJrTvVMGgH+zdwQGs0zNlZywoO5iZfDq2TtXiBK75JRAQESq5uEoh1ku /Fnw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf34qrw0LLXkfRMxDT/qwWXuDXmgTPLKrIcFx80YStENTrAP9uea yentZMgVeNE2NcIsuyGRf4s= X-Google-Smtp-Source: AMsMyM4lbTTtgKHLeUsI00YKmZ2lIk+nUyTU2sdop71Xq9BpfhgOKzgTp6XSHskEwEbJUaT9pak1Eg== X-Received: by 2002:a05:6808:1513:b0:355:8d6c:448d with SMTP id u19-20020a056808151300b003558d6c448dmr1136501oiw.216.1666369115092; Fri, 21 Oct 2022 09:18:35 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:6295:b0:127:568b:5cc9 with SMTP id s21-20020a056870629500b00127568b5cc9ls1148669oan.0.-pod-prod-gmail; Fri, 21 Oct 2022 09:18:32 -0700 (PDT) X-Received: by 2002:a05:6870:ac28:b0:132:d3fe:fd42 with SMTP id kw40-20020a056870ac2800b00132d3fefd42mr29887101oab.7.1666369112832; Fri, 21 Oct 2022 09:18:32 -0700 (PDT) Original-Received: by 2002:aca:4b51:0:b0:354:1b3:f3f with SMTP id 5614622812f47-355177f156emsb6e; Tue, 18 Oct 2022 03:17:43 -0700 (PDT) X-Received: by 2002:a54:4090:0:b0:354:94a9:e7f9 with SMTP id i16-20020a544090000000b0035494a9e7f9mr14482230oii.104.1666088263144; Tue, 18 Oct 2022 03:17:43 -0700 (PDT) X-Original-Sender: niko-k13cyrtlpCBBDLzU/O5InQ@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:31618 Archived-At: ------=_Part_696_450047394.1666088262523 Content-Type: multipart/alternative; boundary="----=_Part_697_1655851994.1666088262523" ------=_Part_697_1655851994.1666088262523 Content-Type: text/plain; charset="UTF-8" Hi all, I am trying to center figures on pdf. The main.md has: ![some text](some-figure.png){width=166% #fig:figlabel} The created .tex file has \begin{figure} \hypertarget{fig:figlabel}{% \centering \includegraphics[width=1.66\textwidth,height=\textheight]{some-figure.png} \caption{some text}\label{fig:figlabel} } \end{figure} I read from here that a possible solution is to use \usepackage[export]{adjustbox}[2011/08/13] in latex preamble and add "center" argument to includegraphics, like so: \includegraphics[width=1.66\textwidth,height=\textheight, *center* ]{some-figure.png} I tested it and it works. Now, how would one add arguments to includegraphics from within markdown? Another solution I came up with would include redefining includegraphics in latex preamble to always have the "center" added, but I feel that is a bit hacky. Is there a better way? Regards, Niko -- 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/6268051b-bc26-4c5a-a1ba-32790dbc8271n%40googlegroups.com. ------=_Part_697_1655851994.1666088262523 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi all, 

I am trying to center figures on pdf. The = main.md has:

![some tex= t](some-figure.png){width=3D166%  #fig:figlabel}
=
The created .tex file has

\begin{figure}
\hypertarget{fig:figlabel}{%
\center= ing
\includegraphics[width=3D1.66\textwidth,height=3D\textheight]{some-f= igure.png}
\caption{some text}\label{fig:figlabel}
}
\end{figure}<= /font>

I read from h= ere that a possible solution is to use

\usepackage[export]{adjustbox}[2011/08/13]<= br>

in latex preamble and add "center" argument to= includegraphics, like so:

 \includegraphics[width=3D1.66\textwidth,height=3D\textheight, = center]{some-figure.png}

I tested it an= d it works. Now, how would one add arguments to includegraphics from within= markdown?  Another solution I came up with would include redefining i= ncludegraphics in latex preamble to always have the "center" added, but I f= eel that is a bit hacky. Is there a better way?

Re= gards,

Niko

--
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/6268051b-bc26-4c5a-a1ba-32790dbc8271n%40googlegroups.= com.
------=_Part_697_1655851994.1666088262523-- ------=_Part_696_450047394.1666088262523--