# [texhax] controlling table locations

Reinhard Kotucha reinhard.kotucha at web.de
Wed May 14 09:58:37 CEST 2014

On 2014-05-13 at 23:35:51 -0400, Thomas Schneider wrote:

> Folks:
>
> One normally controls table locations like this:
>
> \begin{table}[p] % the table goes to a page at the end of the document
> ...
> \end[table}
>
> \begin{table}[h] % the table goes to the location on the current page.
> ...
> \end[table}
>
> I wanted to be able to switch between these two for many tables at
> once, so I made a command:
>
> \newcommand{\tablelocation}{p}
>
> and used it:
>
> \begin{table}[\tablelocation] % the table goes to the top of the current page!
> ...
> \end[table}
>
> Switching to
>
> \newcommand{\tablelocation}{h}
>
> LaTeX still put the table at the top of the current page.
>
> Is there a way to do this?

You can set a default value and omit the optional argument:

\makeatletter
\def\fps at table{h}
\makeatother

http://ctan.org/tex-archive/info/epslatex/english/epslatex.pdf p. 58ff

Regards,
Reinhard

--
----------------------------------------------------------------------------
Reinhard Kotucha                                      Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                              mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------