From: knubee <knubee@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Centering side-by-side images in latex/pdf export
Date: Thu, 12 Jan 2017 18:24:25 +0800 [thread overview]
Message-ID: <CANgb744sG4=83oWhzVae2nP1N4f0_qHxmmVLUTzNo-qkXGL+kA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1961 bytes --]
I recently opened some .org files from a year ago and tried to generate new
PDFs from them. There have been significant updates to emacs, org-mode, and
the relevant LaTeX packages I use, so some parts of the source had to be
changed. Mostly, everything is working now except for generating PDFs with
centered, side by side images.
Here is what used to work:
#+BEGIN_center
#+ATTR_LaTeX: :height 0.2\textwidth
[[image1.png]]
#+ATTR_LaTeX: :height 0.2\textwidth
[[image2.png]]
#+END_center
I am currently using emacs 26.0.50, orgmode 9.0.3, with TeX Live 2016 on
Debian and the example above results in images that are stacked on top of
each other. When I examine the TeX source, this is the result:
\begin{center}
\begin{center}
\includegraphics[height=0.2\textwidth]{image1.png}
\end{center}
\begin{center}
\includegraphics[height=0.2\textwidth]{image2.png}
\end{center}
\end{center}
I assume this is related to recent change in org-mode where images are
centered by default. However, the following change to the org source does
not solve the problem.
#+ATTR_LaTeX: :height 0.2\textwidth
[[image1.png]]
#+ATTR_LaTeX: :height 0.2\textwidth
[[image2.png]]
The images are still stacked on top of each other (although the outer
"\center" calls are no longer present in resulting tex source):
\begin{center}
\includegraphics[height=0.2\textwidth]{image1.png}
\end{center}
\begin{center}
\includegraphics[height=0.2\textwidth]{image2.png}
\end{center}
I am able to get the images side by side if I disable org-mode's automatic
centering:
#+ATTR_LaTeX: :height 0.2\textwidth :center
[[image1.png]]
#+ATTR_LaTeX: :height 0.2\textwidth :center
[[image2.png]]
But how can I get side by side images centered? Perhaps the answer is very
simple and obvious, but I have tried many other changes and been unable to
accomplish this.
thanks in advance.
[-- Attachment #2: Type: text/html, Size: 2543 bytes --]
next reply other threads:[~2017-01-12 10:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-12 10:24 knubee [this message]
[not found] <708f08e1afcd4532b9916fb78df6028f@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-01-13 6:34 ` Centering side-by-side images in latex/pdf export Eric S Fraga
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='CANgb744sG4=83oWhzVae2nP1N4f0_qHxmmVLUTzNo-qkXGL+kA@mail.gmail.com' \
--to=knubee@gmail.com \
--cc=emacs-orgmode@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.