From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: Re: How to center an oversized figure (md to tex to pdf)?
Date: Fri, 21 Oct 2022 09:40:50 -0700 [thread overview]
Message-ID: <247E0FC5-5E0D-4EAD-8D9D-07DDD5732E02@gmail.com> (raw)
In-Reply-To: <6268051b-bc26-4c5a-a1ba-32790dbc8271n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
I'm confused. The code pandoc produces already contains \centering, which should center the graphic.
Did it not do this?
> On Oct 18, 2022, at 3:17 AM, Niko <niko-k13cyrtlpCBBDLzU/O5InQ@public.gmane.org> wrote:
>
> 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.
--
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/247E0FC5-5E0D-4EAD-8D9D-07DDD5732E02%40gmail.com.
next prev parent reply other threads:[~2022-10-21 16:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 10:17 Niko
[not found] ` <6268051b-bc26-4c5a-a1ba-32790dbc8271n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-10-21 16:40 ` John MacFarlane [this message]
[not found] ` <247E0FC5-5E0D-4EAD-8D9D-07DDD5732E02-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2022-10-22 9:30 ` Niko
[not found] ` <92231fef-1dff-4799-b934-eaf85de4dec8n-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2022-10-24 18:06 ` John MacFarlane
2022-10-18 10:19 Niko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=247E0FC5-5E0D-4EAD-8D9D-07DDD5732E02@gmail.com \
--to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).