1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
\documentclass[german, american, parskip=half, pagesize=auto]{scrartcl}
\usepackage{fixltx2e}
\usepackage{etex}
\usepackage{xspace}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{babel}
\usepackage[svgnames]{xcolor}
\usepackage{listings}
\usepackage{microtype}
\usepackage{hyperref}
\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
\newcommand*{\pkg}[1]{\textsf{#1}}
\newcommand*{\env}[1]{\texttt{#1}}
\addtokomafont{title}{\rmfamily}
\lstset{%
language=[LaTeX]TeX,%
columns=fullflexible,%
numbers=left,%
basicstyle=\ttfamily,%
keywordstyle=\color{Navy},%
commentstyle=\color{DimGray},%
numberstyle=\footnotesize\color{SlateGray}%
}
\title{The \pkg{ftcap} package}
\author{Hans Friedrich Steffani\\\mail{hans.steffani@e-technik.tu-chemnitz.de}}
\date{1999/10/16}
\begin{document}
\maketitle
\begin{quote}
\footnotesize
Copyright \textcopyright\ 1999 Hans Friedrich Steffani
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\@. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING\@. If not, write to
the Free Software Foundation, Inc., 59 Temple Place~-- Suite 330,
Boston, MA 02111--1307, USA.
\end{quote}
\noindent
Lamport places the \verb|\caption| below tables and figures. That is ok
for figures but not for tables, as tables may be longer than one
page. In this case the reader has to search for the \verb|\caption|
until he finds it after a couple of pages. If you have the
\verb|\caption| at the top of the table there is no such problem.
And as the \verb|\caption| of a table should always be at the same place,
we have to place the \verb|\caption| \emph{always} at the top of
the table If you want \verb|\caption| above tabular, you cannot
use the normal \verb|\caption|, because the spaces above and below
\verb|\caption| are wrong. Some stys (e.\,g. \pkg{topcapt.sty}) recommend
to have a special makro like \verb|\topcaption| for captions above
an object. I prefer to have ONE caption and changing the spaces
whenever we are within a \env{table} environment. That's what this sty
does.
\begin{otherlanguage}{german}
Lamport plaziert seine \verb|\caption| ueber Tabellen und Bildern.
Bei Bildern ist das ok. Bei mehrseitigen Tabellen muss man
allerdings nach der \verb|\caption| suchen, so dass es guenstiger
erscheint, die \verb|\caption| \emph{oberhalb} der Tabelle zu
setzen. Und das sollte natuerlich um der Einheitlichkeit willen
dann auch bei kuerzeren Tabellen so sein.
Wenn die \verb|\caption| bei Tabellen ueber der Tabelle, bei
Bildern aber daruntersteht, braucht man verschiedene Werte fuer
\verb|\abovecaptionskip| und \verb|\belowcaptionskip|.
Gelegentlich werden dazu zwei makros, \verb|\tablecaption| und
\verb|\figurecaption| oder auch \verb|\topcaption| vorgeschlagen,
aber das finde ich umstaendlich und fehleranfaellig.
\verb|\caption| ist \verb|\caption| und der Nutzer soll sich nicht
um Details kuemmern. Daher also:
\end{otherlanguage}
\begin{lstlisting}
% from book.cls
%% \renewenvironment{figure}
%% {\@float{figure}}
%% {\end@float}
%% \newenvironment{table}
%% {\@float{table}}
%% {\end@float}
\newcommand{\@ldtable}{}
\let\@ldtable\table
\renewcommand{\table}{%
\setlength{\@tempdima}{\abovecaptionskip}%
\setlength{\abovecaptionskip}{\belowcaptionskip}%
\setlength{\belowcaptionskip}{\@tempdima}%
\@ldtable}%
\end{lstlisting}
\section*{List of Changes}
\begin{otherlanguage}{german}
\begin{labeling}[\hspace{\labelsep}--]{Version: 1.4}
\item[Version: 1.4] Die optionalen Parameter von \env{table} sollten nun gehen
\item[Version: 1.3] Einige Versuche rueckgaengig gemacht
\item[Version: 1.2] Es heisst nun \verb|\ProvidesPackage{ftcap}| ohne \verb|sty|\\
ausserdem stimmt das Datum
\item[Version: 1.1]
\end{labeling}
\end{otherlanguage}
\end{document}
|