From: "ni...-k13cyrtlpCBBDLzU/O5InQ@public.gmane.org" <niko-k13cyrtlpCBBDLzU/O5InQ@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Centering oversized figures (md to tex to pdf)?
Date: Tue, 18 Oct 2022 03:01:40 -0700 (PDT) [thread overview]
Message-ID: <e208fa35-d90a-48b4-b25f-2d0ec10aaec9n@googlegroups.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1702 bytes --]
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
<https://tex.stackexchange.com/questions/16582/center-figure-that-is-wider-than-textwidth>
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.
[-- Attachment #1.2: Type: text/html, Size: 2592 bytes --]
reply other threads:[~2022-10-18 10:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=e208fa35-d90a-48b4-b25f-2d0ec10aaec9n@googlegroups.com \
--to=niko-k13cyrtlpcbbdlzu/o5inq@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).