vertical spacing above/below a figure environment

16,926 views
Skip to first unread message

Ryo

unread,
Feb 15, 2010, 11:24:30 PM2/15/10
to LaTeX beamerposter
Hello all,

I'm wondering how to reduce the vertical spacing above or below an
figure environment. I have two figure environments one after the
other (because I want each to have its own caption). It works, except
that the vertical spacing between the two is too large. What
parameters should I adjust? I've looked at the beamer user's guide
but haven't found the information.

Cheers,
Ryo

P.S. All in all, I like beamerposter very much. Because I use beamer
for my oral presentations, I've found beamerposter easy to customize.

Thomas Deselaers

unread,
Feb 16, 2010, 2:54:17 AM2/16/10
to beamer...@googlegroups.com
Hi,

I generally do not use figure or table environments on posters but
rather used minipages or parboxes to group things. This gives more
flexibility.

e.g. to put two figures next to each other

\begin{minipage}{.499\linewidth}
\includegraphics{figure1}\\
and here I write the caption
\end{minipage}%
~%
\begin{minipage}{.499\linewidth}
\includegraphics{figure2}\\
and here I write the caption for the second figure
\end{minipage}


this then goes hand in hand with vspaces and hspaces (or invisible
rules) in order to get the spacing right.

Cheers,
thomas

> --
> You received this message because you are subscribed to the Google Groups "LaTeX beamerposter" group.
> To post to this group, send email to beamer...@googlegroups.com.
> To unsubscribe from this group, send email to beamerposter...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beamerposter?hl=en.
>
>

--
http://thomas.deselaers.de

Ryo

unread,
Feb 16, 2010, 10:12:00 PM2/16/10
to LaTeX beamerposter
Thanks for your comment!

On Feb 15, 9:54 pm, Thomas Deselaers <desela...@gmail.com> wrote:
[. . .]


> I generally do not use figure or table environments on posters but
> rather used minipages or parboxes to group things. This gives more
> flexibility.

[. . .]


> \begin{minipage}{.499\linewidth}
> \includegraphics{figure1}\\
> and here I write the caption
> \end{minipage}%

That works of course. I'm not disparaging your method, but that's
exactly the reason why I prefer the figure environment. For example,
why do we prefer the itemize environment to the following?

$\bullet$ This is first item;\\[1ex]
$\bullet$ This is second item;\\[1ex]
. . . .

This is more flexible. :-) There are two reasons why the itemize
environment is superior: 1) The itemize environment is less tedious;
2) You can change the style consistently throughout the document. You
want \triangle instead of \bullet? Sure. Do you want to change the
indentations of all "itemize"s? Sure. Each of these changes is
accomplished by a single line (using \setbeamerstyle and friends).

The figure environment with \caption{} has exactly the same benefits
over the manual minipage method. Do you want to center the captions?
Sure. Do you want to set the captions in \bf? Sure. Etc., etc.

Anyway, I'm currently using the following ugly method to adjust the
spacing between figures:

\begin{figure} . . . \end{figure}
\vskip-2ex
\begin{figure} . . . \end{figure}

Regards,
Ryo

Thomas Deselaers

unread,
Feb 17, 2010, 2:02:04 AM2/17/10
to beamer...@googlegroups.com
Hi Ryo,

[figure vs. hacking]


> This is more flexible. :-) There are two reasons why the itemize
> environment is superior: 1) The itemize environment is less tedious;
> 2) You can change the style consistently throughout the document. You
> want \triangle instead of \bullet? Sure. Do you want to change the
> indentations of all "itemize"s? Sure. Each of these changes is
> accomplished by a single line (using \setbeamerstyle and friends).

I fully agree with all of your arguments about. And on posters I even
use itemize. ;-)

However, for the posters I create I end up manually positioning lots
of the elements manually because I want them to be at exactly that
spot.

Also in a poster I typically do not need a figure number and a figure
caption. Please check the poster I uploaded to the group:
http://groups.google.com/group/beamerposter/web/vidzoom-poster.pdf to
see what I mean.

For me, creating a poster typically does hardly invovle copy and
pasting from a paper but rather designing it from scratch.
Furthermore, the figure environment is a float and is really meant to
be used in multi-page documents, whereas posters often involve so many
figures that the float placing mechanism fails anyway.

If you worry about consistently in changing the layout, you could
easily define new environments and use these
Actually, if you want to, you could also change the figure environment
to do `evil' hacks.

I also uploaded the source of the poster
(http://groups.google.com/group/beamerposter/web/vidzoom-poster.tex)
and there are other hacks in, e.g. to make the poster be aligned at
the bottom (\myshrinkyleft,...) which for me help to make the poster
look good in the end... while making the sources really ugly.

> The figure environment with \caption{} has exactly the same benefits
> over the manual minipage method.  Do you want to center the captions?
> Sure.  Do you want to set the captions in \bf?  Sure.  Etc., etc.
>
> Anyway, I'm currently using the following ugly method to adjust the
> spacing between figures:
>
> \begin{figure} . . . \end{figure}
> \vskip-2ex
> \begin{figure} . . . \end{figure}

In that case I would recommend creating a \myfigureshrinky macro so
that you can consistently change it over the entire poster.

Cheers,
thomas

--
http://thomas.deselaers.de

Philippe Dreuw

unread,
Feb 17, 2010, 4:30:18 AM2/17/10
to beamer...@googlegroups.com
Hi Ryo,

a "clean" solution for floating environments would be to simply adjust
the above and below caption skips to your needs:

%%%%%%
...
\setlength{\abovecaptionskip}{-2ex}
\setlength{\belowcaptionskip}{-2ex}
...
\begin{document}
...
%%%%%%

Best,
Philippe

> --
> You received this message because you are subscribed to the Google Groups "LaTeX beamerposter" group.
> To post to this group, send email to beamer...@googlegroups.com.
> To unsubscribe from this group, send email to beamerposter...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beamerposter?hl=en.
>
>

--
http://www-i6.informatik.rwth-aachen.de/~dreuw/

Dipl.-Inform. Philippe Dreuw
RWTH Aachen University - Department of Computer Science - Germany
Phone: +49 (241) 80-21613

Donglian Xu

unread,
Jun 14, 2014, 12:46:18 PM6/14/14
to beamer...@googlegroups.com
Hey Philippe,

I find this very helpful in grouping my 8 figures (4x2, so essentially 4 figure environments) together while writing my dissertation. 
The most awesomeness of these commands is that they can be used locally. For instance, if one needs to adjust multiple figures, just put 

\setlength{\abovecaptionskip}{-2ex}
\setlength{\belowcaptionskip}{-2ex}

right before you start your figure 1 environment. Once you're done with it, put these commands on top of the last figure and reconfigure it to 

%\setlength{\abovecaptionskip}{0
ex}
\setlength{\belowcaptionskip}{2ex} 

then one can continue the document with the default settings. How neat.

Cheers,
Donglian 
Reply all
Reply to author
Forward
0 new messages