Document Classescaption and nonfloat package: disabling position

Information and discussion about specific document classes and how to create your own document classes.
l0calh05t
Posts: 19
Joined: Fri Jul 04, 2008 2:57 pm

caption and nonfloat package: disabling position

Post by l0calh05t »

If i put it in the preamble it would also put space after figure captions (below the figure), correct? And using it for each table individually is highly impractical.

As I said, this works:

Code: Select all

\documentclass[tablecaptionabove]{scrartcl}
\usepackage[labelfont=bf]{caption}

\begin{document}
\begin{table}
\centering
\caption{Correctly placed caption}
\begin{tabular}{|c|}
\hline
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\\
\hline
\end{tabular}
\end{table}
\end{document}
As does this (just to show that it really is a problem caused by using KOMA-Script):

Code: Select all

\documentclass{article}
\usepackage[labelfont=bf,position=auto]{caption}

\begin{document}
\begin{table}
\centering
\caption{Correctly placed caption}
\begin{tabular}{|c|}
\hline
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.\\
\hline
\end{tabular}
\end{table}
\end{document}

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
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

caption and nonfloat package: disabling position

Post by Stefan Kottwitz »

The caption packaged was designed to work with the standard document classes article, report and book (and derived classes), but supports other classes like KOMA classes too. Because KOMA classes already provide possibilities for customization of captions there may be conflicts. In my opinion that's not really a problem, you just have to be aware of the features of KOMA and caption. Further both KOMA classes and the caption package are very well documented.

The documentation of the caption package describes the class support in 5 Document classes, in 5.4 KOMA - Script scrartcl, scrreprt, and scrbook the tablecaptionabove and position options are particularly mentioned.

Stefan
LaTeX.org admin
Post Reply