From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: LaTeX export of images Date: Sat, 3 Oct 2009 09:05:38 +0200 Message-ID: References: <87pr9jf68i.fsf@missioncriticalit.com> <87d45hoizp.fsf@mundaneum.com> <878wg5mkq1.fsf@mundaneum.com> <0782250F-567A-4B4A-82D5-EE1EF8FE65A7@gmail.com> <4ac5fa81.47c2f10a.45ee.0746@mx.google.com> <31946.1254497000@gamaville.dokosmarshall.org> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mtygl-0000QD-1Y for emacs-orgmode@gnu.org; Sat, 03 Oct 2009 03:05:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mtygg-0000NA-6l for emacs-orgmode@gnu.org; Sat, 03 Oct 2009 03:05:54 -0400 Received: from [199.232.76.173] (port=55870 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mtygg-0000N7-1V for emacs-orgmode@gnu.org; Sat, 03 Oct 2009 03:05:50 -0400 Received: from mx20.gnu.org ([199.232.41.8]:57410) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mtygf-0003bc-CU for emacs-orgmode@gnu.org; Sat, 03 Oct 2009 03:05:49 -0400 Received: from mail-ew0-f208.google.com ([209.85.219.208]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mtyge-0005zU-8v for emacs-orgmode@gnu.org; Sat, 03 Oct 2009 03:05:48 -0400 Received: by ewy4 with SMTP id 4so1425588ewy.31 for ; Sat, 03 Oct 2009 00:05:42 -0700 (PDT) In-Reply-To: <31946.1254497000@gamaville.dokosmarshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: =?ISO-8859-1?Q?S=E9bastien_Vauban?= , emacs-orgmode@gnu.org On Oct 2, 2009, at 5:23 PM, Nick Dokos wrote: > Darlan Cavalcante Moreira wrote: > >> At Fri, 2 Oct 2009 08:55:22 +0200, >> Carsten Dominik wrote: >>> Do we need to implement a way so that text can be made to flow >>> around >>> a figure, just as it is possible in HTML export? What would be the >>> right LaTeX package to use for this purpose? >>> >> The Latex wikibook >> http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Wrapping_text_around_figures >> suggests the wrapfigure package, but it also warns that some manual >> adjustments >> is often required. Therefore, if this is implemented in the latex >> exporter it is >> probably a good idea to provide options to include latex commands >> that will be >> put before and after the \includegraphics command. See the example >> in the >> section "Tip for figures with too much white space" of the wikibook >> where some >> \vspace were used to adjust white space around the figure. >> > > ... and the TeX FAQ seems to agree that wrapfig is probably the best > option: > > http://www.tex.ac.uk/cgi-bin/texfaq2html?label=textflow > > It also mentions some additional limitations. > > Nick > OK, I have now modified image placement in LaTeX. 1. Image in text [[./img/x.png]] 2. Floating image with caption and modified size and placement #+CAPTION: My caption #+ATTR_LATEX: placement=[H] width=0.6\textwidth [[./img/x.png]] 3. Wrapping text around the image #+ATTR_LaTeX: wrap #+ATTR_HTML: align="left" [[./img/x.png]] 4. Wrapping text around the image with modified size and wrapfigure placement #+ATTR_LaTeX: wrap width=0.38\textwidth placement={r}{0.4\textwidth #+ATTR_HTML: align="right" width="250" [[./img/x.png]] Even if there is a caption, wrap will work and force the image to be non-floating with text wrapped around. Comments? - Carsten P.S. if you have customized org-export-latex-classes, you might have to undo, then redo this customization, or add the float and wrapfigure environments by hand to all classes you want to use.