Re: [O] Latex image placement (...again. H vs. h!)

2011-08-21 Thread Ista Zahn
On Sun, Aug 21, 2011 at 10:00 AM, John Hendy  wrote:
> On Sun, Aug 21, 2011 at 1:28 AM, Stefan Nobis  wrote:
>> John Hendy  writes:
>>
>>> Was just rediscovering how to properly get floats to drop in where I
>>> want them in LaTeX export (right where I say vs. where LaTeX thinks
>>> is convenient).
>>
>> Another way to tackle this problem may be to just not use floats. As
>> the name suggests, these construct is meant to let things float. :)
>>
>> If you want a figure or table to be placed at exactly the point where
>> you place it, why are you using a float environment? Most people
>> answer at this point, because they want the captions and all examples
>> with captions use the float environment. Thats because with captions
>> and in the general case it makes sense to let LaTeX find the right
>> place for these things.
>
> Huh. I didn't realize the captions triggered something than just using
> [[./path/to/image]] with attr_latex options passed. I just duplicated
> the same section and removed all captions as well as placement=[H]
> options and they exported right where I would have wanted them. That's
> interesting -- learned something new!
>
>>
>> If you want exact, controlled placements and also a caption, have a
>> look at the package 'caption' (version 3.1, author Axel
>> Sommerfeldt). Then you can get rid of floats and don't have to bother
>> with obscure placement rules. :)
>
> I'll definitely take a look at that. I may also just use descriptive
> intros prior to each picture, as that would do the same as a caption,
> I suppose. It's just weird to me that sometimes the floats don't drop
> until a later section, in which case I think that's definitely *too*
> late. Sure, if they dump at the end of Section 1.1, fine -- that's
> where they are discussed. But now they're showing up in 1.2?

The placeins package offers a solution to this problem.

Best,
Ista

>
>
> Thanks,
> John
>
>>
>> --
>> Until the next mail...,
>> Stefan.
>>
>
>



-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org



Re: [O] Latex image placement (...again. H vs. h!)

2011-08-21 Thread John Hendy
> Hi John,
>
> I think of [h!] as "try really hard to place the float here" and [H] as
> "place the float here regardless of the consequences."
>

Great way to put it!

Thanks,
John

> All the best,
> Tom
> --
> Thomas S. Dye
> http://www.tsdye.com
>



Re: [O] Latex image placement (...again. H vs. h!)

2011-08-21 Thread John Hendy
On Sun, Aug 21, 2011 at 1:28 AM, Stefan Nobis  wrote:
> John Hendy  writes:
>
>> Was just rediscovering how to properly get floats to drop in where I
>> want them in LaTeX export (right where I say vs. where LaTeX thinks
>> is convenient).
>
> Another way to tackle this problem may be to just not use floats. As
> the name suggests, these construct is meant to let things float. :)
>
> If you want a figure or table to be placed at exactly the point where
> you place it, why are you using a float environment? Most people
> answer at this point, because they want the captions and all examples
> with captions use the float environment. Thats because with captions
> and in the general case it makes sense to let LaTeX find the right
> place for these things.

Huh. I didn't realize the captions triggered something than just using
[[./path/to/image]] with attr_latex options passed. I just duplicated
the same section and removed all captions as well as placement=[H]
options and they exported right where I would have wanted them. That's
interesting -- learned something new!

>
> If you want exact, controlled placements and also a caption, have a
> look at the package 'caption' (version 3.1, author Axel
> Sommerfeldt). Then you can get rid of floats and don't have to bother
> with obscure placement rules. :)

I'll definitely take a look at that. I may also just use descriptive
intros prior to each picture, as that would do the same as a caption,
I suppose. It's just weird to me that sometimes the floats don't drop
until a later section, in which case I think that's definitely *too*
late. Sure, if they dump at the end of Section 1.1, fine -- that's
where they are discussed. But now they're showing up in 1.2?


Thanks,
John

>
> --
> Until the next mail...,
> Stefan.
>



Re: [O] Latex image placement (...again. H vs. h!)

2011-08-20 Thread Stefan Nobis
John Hendy  writes:

> Was just rediscovering how to properly get floats to drop in where I
> want them in LaTeX export (right where I say vs. where LaTeX thinks
> is convenient).

Another way to tackle this problem may be to just not use floats. As
the name suggests, these construct is meant to let things float. :)

If you want a figure or table to be placed at exactly the point where
you place it, why are you using a float environment? Most people
answer at this point, because they want the captions and all examples
with captions use the float environment. Thats because with captions
and in the general case it makes sense to let LaTeX find the right
place for these things.

If you want exact, controlled placements and also a caption, have a
look at the package 'caption' (version 3.1, author Axel
Sommerfeldt). Then you can get rid of floats and don't have to bother
with obscure placement rules. :)

-- 
Until the next mail...,
Stefan.


pgpbWvwGJsXom.pgp
Description: PGP signature


Re: [O] Latex image placement (...again. H vs. h!)

2011-08-20 Thread Thomas S. Dye
John Hendy  writes:

> Was just rediscovering how to properly get floats to drop in where I
> want them in LaTeX export (right where I say vs. where LaTeX thinks is
> convenient). I knew I'd posted on this about a year ago and was trying
> to search for the thread. In the process, I came across this from the
> manual [1]:
>
> ,---
> | To modify the placement option of the floating environment,
> | add something like ‘placement=[h!]’ to the attributes.
> `---
>
> Now, I'm not sure what all the options are, but this didn't work for
> me. Only [H] properly dropped my floats in where I wanted them. Is
> there a reason for this? In looking in wikibooks, they seem to
> indicate that there are a few variants on the "here" option: [2]
>
> ,---
> | h: Place the float here, i.e., approximately at the same point it occurs
> | in the source text (however, not exactly at the spot)
> |
> | !: Override internal parameters Latex uses for determining "good"
> float positions.
> |
> | H: Places the float at precisely the location in the LaTeX code.
> | Requires the float package,[1] e.g., \usepackage{float}.
> | This is somewhat equivalent to h!.
> `---
>
> So, does my need for [H] mean that LaTeX just really, really, really
> wanted to space my images differently than I wanted? It does seem like
> h! *should* work based on the wikibooks description, but it didn't. Is
> [H] the only absolutely positive way to make sure floats are right
> where you want them based on the surrounding text?
>
> Thanks,
> John
>
> ---
> [1] http://orgmode.org/manual/Images-in-LaTeX-export.html
> [2] http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
>
>

Hi John,

I think of [h!] as "try really hard to place the float here" and [H] as
"place the float here regardless of the consequences."

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



[O] Latex image placement (...again. H vs. h!)

2011-08-20 Thread John Hendy
Was just rediscovering how to properly get floats to drop in where I
want them in LaTeX export (right where I say vs. where LaTeX thinks is
convenient). I knew I'd posted on this about a year ago and was trying
to search for the thread. In the process, I came across this from the
manual [1]:

,---
| To modify the placement option of the floating environment,
| add something like ‘placement=[h!]’ to the attributes.
`---

Now, I'm not sure what all the options are, but this didn't work for
me. Only [H] properly dropped my floats in where I wanted them. Is
there a reason for this? In looking in wikibooks, they seem to
indicate that there are a few variants on the "here" option: [2]

,---
| h: Place the float here, i.e., approximately at the same point it occurs
| in the source text (however, not exactly at the spot)
|
| !: Override internal parameters Latex uses for determining "good"
float positions.
|
| H: Places the float at precisely the location in the LaTeX code.
| Requires the float package,[1] e.g., \usepackage{float}.
| This is somewhat equivalent to h!.
`---

So, does my need for [H] mean that LaTeX just really, really, really
wanted to space my images differently than I wanted? It does seem like
h! *should* work based on the wikibooks description, but it didn't. Is
[H] the only absolutely positive way to make sure floats are right
where you want them based on the surrounding text?

Thanks,
John

---
[1] http://orgmode.org/manual/Images-in-LaTeX-export.html
[2] http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions