From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31619 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "ni...-k13cyrtlpCBBDLzU/O5InQ@public.gmane.org" Newsgroups: gmane.text.pandoc Subject: Centering oversized figures (md to tex to pdf)? Date: Tue, 18 Oct 2022 03:01:40 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_752_1081660606.1666087300067" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31018"; 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:47 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oi1-f189.google.com ([209.85.167.189]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1olujP-0007ql-4C for gtp-pandoc-discuss@m.gmane-mx.org; Fri, 21 Oct 2022 18:18:47 +0200 Original-Received: by mail-oi1-f189.google.com with SMTP id s26-20020a056808209a00b003552ae56102sf1155734oiw.12 for ; Fri, 21 Oct 2022 09:18:47 -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=58lU3TqB3Rm9PSRnl2+Sj5nqCnNiitdamExkDKcyCAU=; b=Nn1bbwfM1BAUxDnqqVLODjmMeHwb6rHlufK8WgYJ2mTcKqjj2C6hYbqxkrTcmKYh0u iV5HLY/kBp7J106icwwl8Na2dZkXwmPrR82CPywZf50RYfZoGOUWVBJ1XUSXjUW+A8Hn d5+4PAzrfD8slNjGBVTPXDXlS10CAdE9loqXZVoLQ99u/i5Yirlmej/RPtuYty2oD5i8 NgewYJqDGcIFvZ/TEa3laAGX9WjSJTNPPV4GFz+L7owebH+I5k7hrTXf93AfVEQXdld6 wwOWtLHh0SNvVGf1vTKIVN9hFHhx7qPqi60aRNhs8qcSeUi+TQyLAQi5efqp1Dj3LKdj 7Ekg== 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=58lU3TqB3Rm9PSRnl2+Sj5nqCnNiitdamExkDKcyCAU=; b=Ir7/l9tp4v/TKPPw1E+2H/zP1x1Y0g8O9lwm1hU7XocFPnm5xl5Oc8En64Apjz+Bvz Uo6mE6csy0c+A1zV6OcAu+NdY4Zy3LryewlYRoG2c6dnHae4GTeZChQXiItLCk7pV8yg b7I1HSm1FUUAxS7ms5+DRnGdRYMk+SaiPEWFRRD/ScOPiZ0OGyOJL2q15lXBw1vdGfW3 78OzXd2CKh0nsDhOnsPpu/wJKtYuhpNUX/j72pM+UjsWdFL+Wdw81HWtU1UJ23XOKwju rdaxR54G9Y4+hNaxEEOHTsgd+vSQJraGXe7JQ+wDcqs2NBvNPMfhucfS6k3VZwfYqSCb ruoQ== 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=58lU3TqB3Rm9PSRnl2+Sj5nqCnNiitdamExkDKcyCAU=; b=76rti129VMnVvxhZP4ULfVmgF6gZmYbv9piDQU9YaySo+1aIb7+t7KRGL98PkALbE2 sUS8eCo978lON+MjRUh3PSd85XBssQ2WnLFwdtApoLKiRKgU7zjWkR1/2+rfiwSrM3uC ufC+fX1n8KebBIeqHyONCcyLUdGPUXUKvcH1HNpCd7XWFovlF24Fvp4OPGo3j/vgEeJj nVeIeaZ/Lx+Ph5mFQOmvanl6C9WeTIoPNG5deLlR1gqMnKrV/dsOgkmLTvPwV857puBI TXG8wChTT6VPIg/5OPlr726ODoDWo7ihFkCXScF2qOu3fA2Rb6ftIEVSicfdNr0QnkGm 2Xjg== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf1zvW15Tc5IB6UCVH1YM52W2mcWLfzhmJKINkzw42gvP4tbUgrR /r4f0su/Lxhx4+whfbvSZcw= X-Google-Smtp-Source: AMsMyM5JZhZvBpaRMKeR00QVm9BBvn0tYvFpeZFSmVQl1k9EKV8KwPrfdApr7SCc5dyyZ6hTs2YtdA== X-Received: by 2002:a05:6871:794:b0:12c:4bff:341d with SMTP id o20-20020a056871079400b0012c4bff341dmr12618779oap.127.1666369115232; Fri, 21 Oct 2022 09:18:35 -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-20020a05687093d100b001318180091als1119626oal.8.-pod-prod-gmail; Fri, 21 Oct 2022 09:18:32 -0700 (PDT) X-Received: by 2002:a05:6870:c88d:b0:137:11e7:12e9 with SMTP id er13-20020a056870c88d00b0013711e712e9mr13525266oab.220.1666369112858; Fri, 21 Oct 2022 09:18:32 -0700 (PDT) Original-Received: by 2002:aca:ef05:0:b0:354:34c:2d62 with SMTP id 5614622812f47-3551788840emsb6e; Tue, 18 Oct 2022 03:01:41 -0700 (PDT) X-Received: by 2002:a05:6870:3485:b0:12b:df60:622d with SMTP id n5-20020a056870348500b0012bdf60622dmr1084485oah.25.1666087300822; Tue, 18 Oct 2022 03:01:40 -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:31619 Archived-At: ------=_Part_752_1081660606.1666087300067 Content-Type: multipart/alternative; boundary="----=_Part_753_797491318.1666087300067" ------=_Part_753_797491318.1666087300067 Content-Type: text/plain; charset="UTF-8" Hi all, I have markdown file, main.md with following content: ![some text](some-figure.png){width=166% #fig:figlabel} It produces following example.tex: \begin{figure} \hypertarget{fig:figlabel}{% \centering \includegraphics[width=1.66\textwidth,height=\textheight]{some-figure.png} \caption{some text}\label{fig:figlabel} } \end{figure} It would otherwise be okay, but the figure is not centered. I read from here a possible solution, using \usepackage[export]{adjustbox}[2011/08/13] in latex preamble and adding "center" argument to \includegraphics, like this: \begin{figure} \hypertarget{fig:figlabel}{% \centering \includegraphics[ width=1.66\textwidth,height=\textheight, *center * ]{some-figure.png} \caption{some text}\label{fig:figlabel} } \end{figure} This works. Now, my question is: *Is there some way to add this "center" there automatically? * Another option I'm thinking of is redefining the \includegraphics command in LaTeX, but it feels more like a hack to me. One problem would be: How to *not* add the center tag if includegraphics is redefined? (In my case, all figures will probably be centered, but, I think there should be 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/e208fa35-d90a-48b4-b25f-2d0ec10aaec9n%40googlegroups.com. ------=_Part_753_797491318.1666087300067 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi all, 

I have markdown file, main.md with followi= ng content:

![some text= ](some-figure.png){width=3D166%  #fig:figlabel}
<= br>
It produces following example.tex:

<= font face=3D"Courier New">\begin{figure}
\hypertarget{fig:figlabel}{%\centering
\includegraphics[width=3D1.66\textwidth,height=3D\textheight= ]{some-figure.png}
\caption{some text}\label{fig:figlabel}
}
\end{= figure}

It would otherwise be okay, but= the figure is not centered. I read from here= a possible solution, using

\usepackage[export]{adjustbox}[2011/08/13]

in latex preamble and adding "center" argument to \includegraphics= , like this:

\begin{fig= ure}
\hypertarget{fig:figlabel}{%
\centering
\includegraphics[ width=3D1.66\textwidth,height=3D\textheight, center ]{some-figure.png}
\caption{some text}\label{fi= g:figlabel}
}
\end{figure}



This works. Now, my question is: Is there some way to add this = "center" there automatically? 

Another op= tion I'm thinking of is redefining the \includegraphics command in LaTeX, b= ut it feels more like a hack to me. One problem would be: How to not=  add the center tag if includegraphics is redefined? (In my case, all = figures will probably be centered, but, I think there should be a better wa= y)

Regards,

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/e208fa35-d90a-48b4-b25f-2d0ec10aaec9n%40googlegroups.= com.
------=_Part_753_797491318.1666087300067-- ------=_Part_752_1081660606.1666087300067--