Debian Codegraph @

texmf-dist/doc/latex/ftcap/ftcap.tex

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