From mboxrd@z Thu Jan 1 00:00:00 1970 From: knubee Subject: Centering side-by-side images in latex/pdf export Date: Thu, 12 Jan 2017 18:24:25 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114761da2b95c80545e31fe2 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRcYW-0005WS-Sz for emacs-orgmode@gnu.org; Thu, 12 Jan 2017 05:24:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRcYV-0007Iv-HN for emacs-orgmode@gnu.org; Thu, 12 Jan 2017 05:24:28 -0500 Received: from mail-qt0-x234.google.com ([2607:f8b0:400d:c0d::234]:32782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cRcYV-0007Ik-Cp for emacs-orgmode@gnu.org; Thu, 12 Jan 2017 05:24:27 -0500 Received: by mail-qt0-x234.google.com with SMTP id v23so13623384qtb.0 for ; Thu, 12 Jan 2017 02:24:27 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --001a114761da2b95c80545e31fe2 Content-Type: text/plain; charset=UTF-8 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. --001a114761da2b95c80545e31fe2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
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.=C2=A0
Here is what used to work:

=C2=A0 =C2=A0 #= +BEGIN_center
=C2=A0 =C2=A0 #+ATTR_LaTeX: :height 0.2\textwidth
=C2= =A0 =C2=A0 [[image1.png]]
=C2=A0 =C2=A0 #+ATTR_LaTeX: :height 0.2\textwi= dth
=C2=A0 =C2=A0 [[image2.png]]
=C2=A0 =C2=A0 #+END_center

<= /div>
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:
=

=C2=A0 =C2=A0 \begin{center}
=C2=A0 =C2=A0 \b= egin{center}
=C2=A0 =C2=A0 \includegraphics[height=3D0.2\textwidt= h]{image1.png}
=C2=A0 =C2=A0 \end{center}
=C2=A0 =C2=A0= \begin{center}
=C2=A0 =C2=A0 \includegraphics[height=3D0.2\textw= idth]{image2.png}
=C2=A0 =C2=A0 \end{center}
=C2=A0 =C2= =A0 \end{center}

I assume this is related to recen= t change in org-mode where images are centered by default. However, the fol= lowing change to the org source does not solve the problem.

<= /div>
=C2=A0 =C2=A0 #+ATTR_LaTeX: :height 0.2\textwidth
=C2= =A0 =C2=A0 [[image1.png]]
=C2=A0 =C2=A0 #+ATTR_LaTeX: :height 0.2= \textwidth
=C2=A0 =C2=A0 [[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):
<= div>
=C2=A0 =C2=A0 \begin{center}
=C2=A0 =C2=A0 \in= cludegraphics[height=3D0.2\textwidth]{image1.png}
=C2=A0 =C2=A0 \= end{center}
=C2=A0 =C2=A0 \begin{center}
=C2=A0 =C2=A0 = \includegraphics[height=3D0.2\textwidth]{image2.png}
=C2=A0 =C2= =A0 \end{center}

I am able to get the images side = by side if I disable org-mode's automatic centering:

=C2=A0 =C2=A0 #+ATTR_LaTeX: :height 0.2\textwidth :center
= =C2=A0 =C2=A0 [[image1.png]]
=C2=A0 =C2=A0 #+ATTR_LaTeX: :height = 0.2\textwidth :center
=C2=A0 =C2=A0 [[image2.png]]

=
But how can I get side by side images centered? Perhaps the answ= er is very =C2=A0simple and obvious, but I have tried many other changes an= d been unable to accomplish this.

thanks in advanc= e.
--001a114761da2b95c80545e31fe2--