Generalplace float inbetween paragraphs

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
otoomet
Posts: 15
Joined: Sun Apr 01, 2007 9:39 am

place float inbetween paragraphs

Post by otoomet »

Hi,

is there any way I can force all the floats to be placed only in between paragraphs, not on top/bottom of page? I know I can play around with [h], [h!] and [H] but aren't there any easier way to get the effect for all the figures at once?

Thanks in advance,
Ott

BTW -- please do not blame me about this stupid rule for our department proceedings :evil:

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

place float inbetween paragraphs

Post by localghost »

If your pictures (and tables) aren't allowed to float, don't use a float environment. Just use the caption package to get a corresponding caption and place the objects in a center environment.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage[english]{babel}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[bindingoffset=1cm,centering,includeheadfoot,margin=2cm]{geometry}
\usepackage{array,booktabs}
\usepackage{blindtext}
\usepackage{txfonts}

\begin{document}
  \blindtext
  \begin{center}
    \rule{12.8cm}{7.2cm}
    \captionof{figure}[Dummy figure LoF entry]{Dummy figure}\label{fig:dummy}
  \end{center}
  \blindtext
  \begin{center}
    \begin{tabular}{m{3cm}m{5cm}m{5cm}}\toprule
      Column 1 & Column 2 & Column 3 \\\toprule
     The quick brown fox jumps over the lazy dog. &
      The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. &
      The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. \\\midrule
     The quick brown fox jumps over the lazy dog. &
      The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. &
      The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. \\\bottomrule        \end{tabular}
    \captionof{table}[Dummy table LoT entry]{Dummy table}\label{tab:dummy}
  \end{center}
  \blindtext
\end{document}
Information about the use packages and their documentations can be found on CTAN.


Best regards
Thorsten
Post Reply