From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31620 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:19:54 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_826_1889238384.1666088394035" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31158"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCP7DLV7XYJBBY4MZONAMGQEN2BQQBY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Fri Oct 21 18:18:47 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-ot1-f60.google.com ([209.85.210.60]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1olujO-0007q5-Sn for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 21 Oct 2022 18:18:46 +0200 Original-Received: by mail-ot1-f60.google.com with SMTP id cy25-20020a056830699900b00661acac3847sf1980014otb.17 for ; Fri, 21 Oct 2022 09:18:46 -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=qSGFuSUSgEUTIwUWrVVKsQNUhFCvMl/DEFlZNqDo6Cs=; b=GDSIQQhnORey1zEEX2XqIhwVLapLCbwMf0DGA62bJTjBzA1gfRr6LvwR+oyG9KyWaF Fg+KY8j7w7X+wSxyCCeeRWJXsWYlyMMD6OPzOoYpYoGY2pB5EuHLsW0qm/TwJqQJodi7 BCu/H8PoVN49l5kASIy9hA1l5VGPL9FOHjeBuul84I2vKXTTvAeD+sjheC3KE4yrzqWP rK/dv1RdQ/dVRAG49WMM6M/drl9P5VrhJCRQt19vuEzAU3UHFT4S7NjR7Iie+QSg8DgI KrJLqwL4vS+5Zut7mEoDpV8nV1it39Nm6osLNSnCkyZujtvDqwVbBzcd/0qCdkNkw/hZ 7BPQ== 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=qSGFuSUSgEUTIwUWrVVKsQNUhFCvMl/DEFlZNqDo6Cs=; b=ZukyIUqpk97S47XM7F3ESMgl0rHSTlIhmSkfh4kHho4Uq/RuDaVISlhiXkJol3p9h0 tnfy/6N2I9H7rWTIZayfeyMDO0XUpHDIN84aBXKVDbSoe9xxdmczitBTQBR0+eTLDs9G KskAZsn3FSbA807Gqz7hutduneboWhd2VXn/XatV5H1WJoKe3dSMXRow0svRROA+Dbbt rj89imwhcpUKziB4r9U/kjpyadv2Ueh2s+Nh5UAWka6PYiqBRVPHK6c6y1r6DoOE+lob DoNcZ1Yq4VaFuCN/6tratdpdor1NxcOCgWRkBlkoodavYjBScBfCtZTW/iC5MYHfeIYt hJvg== 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=qSGFuSUSgEUTIwUWrVVKsQNUhFCvMl/DEFlZNqDo6Cs=; b=1aRKcjF+LX00lhbohXggCCNfY9idOV1aH7MbiQxUfQJelZDWU6TRx+T2ZSazZNhTD6 OO/Sryi+Sk+LEPvxLECd8VwVCy/uJYoCd2lrJXkqov7NVQcT06RJbi3OSkurOnUmF4ZR P1jm3cndQ45urRI2sE5dBCxpiwGJUasKiAdYA8RHUDeD9nHtPqGTEHebPDe26B3BHhyb i/lEVgpIYzwiCVVWcLikSAWWKanzV3JN2hckZs0tNeKrQ/WVAWN1NrgWTaU0y4fM9IYs LJ3TUnAIBAfhmLnFDE3eatNh8SvIlwxF0T7r7SDiEfCmb0TIOh/1hI+oj55+ZBozGTkJ 0CDg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf2uFgso5S4dYr4BIZlsZqQMmjFwB2y2SVpcvdHK7iH4+ssFE46D +mHSqNz7Rufgz1cFU7zMHSI= X-Google-Smtp-Source: AMsMyM4E1D3efryaS4+zPeqksnpA9z4TO0rKUI5HFJHvMWPq56FzlzKWLutRGqSx3u5tSoiwlzh3ng== X-Received: by 2002:a05:6871:412:b0:13b:f0f:ae6e with SMTP id d18-20020a056871041200b0013b0f0fae6emr4623855oag.251.1666369125764; Fri, 21 Oct 2022 09:18:45 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6870:93d1:b0:131:8180:91a with SMTP id c17-20020a05687093d100b001318180091als1119765oal.8.-pod-prod-gmail; Fri, 21 Oct 2022 09:18:43 -0700 (PDT) X-Received: by 2002:a05:6870:178e:b0:126:7055:fc78 with SMTP id r14-20020a056870178e00b001267055fc78mr13413749oae.58.1666369112831; Fri, 21 Oct 2022 09:18:32 -0700 (PDT) Original-Received: by 2002:aca:be82:0:b0:350:c1f3:d913 with SMTP id 5614622812f47-355179817fdmsb6e; Tue, 18 Oct 2022 03:19:55 -0700 (PDT) X-Received: by 2002:a05:6830:6388:b0:661:b5d0:49c4 with SMTP id ch8-20020a056830638800b00661b5d049c4mr938455otb.318.1666088394774; Tue, 18 Oct 2022 03:19:54 -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:31620 Archived-At: ------=_Part_826_1889238384.1666088394035 Content-Type: multipart/alternative; boundary="----=_Part_827_1707449418.1666088394035" ------=_Part_827_1707449418.1666088394035 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 SO (link removed) 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 (PS. For some reason my messages are getting removed automatically. Trying to post without links to see if that affects) -- 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/b18d68f1-e4d0-4b45-ab10-03f890838484n%40googlegroups.com. ------=_Part_827_1707449418.1666088394035 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 SO (link removed) that= a possible solution is to use

\usepackage[export]{adjustbox}[2011/08/13]
in latex preamble and add "center" argument to includegraphics,= like so:

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

I tested it and it works. = Now, how would one add arguments to includegraphics from within markdown?&n= bsp; Another solution I came up with would include redefining includegraphi= cs in latex preamble to always have the "center" added, but I feel that is = a bit hacky. Is there a better way?

Regards,
=

Niko

(PS. For some reason my m= essages are getting removed automatically. Trying to post without links to = see if that affects)

--
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/b18d68f1-e4d0-4b45-ab10-03f890838484n%40googlegroups.= com.
------=_Part_827_1707449418.1666088394035-- ------=_Part_826_1889238384.1666088394035--