From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Malone Subject: Re: org-latex and figures Date: Thu, 27 Jan 2011 15:35:00 -0500 Message-ID: References: <29E1F9F4-5F76-45FE-9F02-2DB658597A07@tsdye.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1145356024==" Return-path: Received: from [140.186.70.92] (port=46395 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PijD6-0004Sx-3h for emacs-orgmode@gnu.org; Fri, 28 Jan 2011 02:57:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PijD2-0000p3-Fq for emacs-orgmode@gnu.org; Fri, 28 Jan 2011 02:57:33 -0500 Received: from mail-iy0-f169.google.com ([209.85.210.169]:44831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PijD2-0000ov-7x for emacs-orgmode@gnu.org; Fri, 28 Jan 2011 02:57:32 -0500 Received: by iyj17 with SMTP id 17so2712308iyj.0 for ; Thu, 27 Jan 2011 23:57:31 -0800 (PST) In-Reply-To: <29E1F9F4-5F76-45FE-9F02-2DB658597A07@tsdye.com> 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: "Thomas S. Dye" Cc: emacs-orgmode@gnu.org, Andrea Crotti --===============1145356024== Content-Type: multipart/alternative; boundary=90e6ba53aa6633e7a9049ad9e21f --90e6ba53aa6633e7a9049ad9e21f Content-Type: text/plain; charset=ISO-8859-1 Hi Andrea, I'm inclined to agree with Tom - there is no default that will work in all instances. That being said, you can use an #ATTR_LATEX line to modify the placement for each image - see here: http://orgmode.org/org.html#Images-in-LaTeX-export Alternatively, (and this is very much a hack, which I can't guarantee will work) you could make the org-mode default behaviour be [ptb] by replacing the =(floatp "[htb]")= line with =(floatp "[ptb]")= in the =org-export-latex-format-image= function definition in the file org/lisp/org-latex.el ... you would have to do something similar to the =org-export-latex-tables= function for tables. HTH, Chris On Thu, Jan 27, 2011 at 11:53 AM, Thomas S. Dye wrote: > Hi Andrea, > > There is no default that will work in all situations. A default of [ptb] > will typically generate some pages with just a figure and lots of white > space. I make a lot of latex documents and I find the path of least > resistance is to use a default of [htb!] and pay attention to the large > figures so they don't float to the end and take the other figures with them. > > All the best, > Tom > > On Jan 27, 2011, at 4:04 AM, Andrea Crotti wrote: > > I could not understand why on earth my pdf had all the images after the >> whole document. >> Then I found this: >> >> http://www.eng.cam.ac.uk/help/tpl/textprocessing/float_hint.html >> >> and found out that the default for a figure was >> \begin{figure}[ptb] >> >> while in the generated latex file from org I had >> \begin{figure}[htb] >> >> So I changed to the default and now it works fine... >> Isn't that default maybe a bit dangerous? >> >> The fact is that if the first image doesn't fit "here" it will be >> printed late and all the others after. >> >> I might also just use the latex code here for these things, I don't care >> to export to other formats, it's just nicer to look if it's in org syntax >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Please use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode >> > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --90e6ba53aa6633e7a9049ad9e21f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Andrea,

I'm inclined to agree with Tom - there is no default = that will work in all instances.=A0 That being said, you can use an #ATTR_L= ATEX line to modify the placement for each image - see here:=A0 http://orgmode.org/org.= html#Images-in-LaTeX-export

Alternatively, (and this is very much a hack, which I can't guarant= ee will work) you could make the org-mode default behaviour be [ptb] by rep= lacing the =3D(floatp "[htb]")=3D line with =3D(floatp "[ptb= ]")=3D in the =3Dorg-export-latex-format-image=3D function definition = in the file org/lisp/org-latex.el ... you would have to do something simila= r to the =3Dorg-export-latex-tables=3D function for tables.

HTH,
Chris


On Thu, Jan 27, 201= 1 at 11:53 AM, Thomas S. Dye <tsd@tsdye.com> wrote:
Hi Andrea,

There is no default that will work in all situations. =A0A default of [ptb]= will typically generate some pages with just a figure and lots of white sp= ace. =A0I make a lot of latex documents and I find the path of least resist= ance is to use a default of [htb!] and pay attention to the large figures s= o they don't float to the end and take the other figures with them.

All the best,
Tom

On Jan 27, 2011, at 4:04 AM, Andrea Crotti wrote:

I could not understand why on earth my pdf had all the images after the
whole document.
Then I found this:

http://www.eng.cam.ac.uk/help/tpl/textprocessing/float_= hint.html

and found out that the default for a figure was
\begin{figure}[ptb]

while in the generated latex file from org I had
\begin{figure}[htb]

So I changed to the default and now it works fine...
Isn't that default maybe a bit dangerous?

The fact is that if the first image doesn't fit "here" it wil= l be
printed late and all the others after.

I might also just use the latex code here for these things, I don't car= e
to export to other formats, it's just nicer to look if it's in org = syntax


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gn= u.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

--90e6ba53aa6633e7a9049ad9e21f-- --===============1145356024== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============1145356024==--