Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

koma + color: Abstand Bild -> caption

11 views
Skip to first unread message

Arne Michaelsen

unread,
Feb 3, 2005, 9:57:56 AM2/3/05
to
Hallo Newsgroup,

folgendes Verhalten konnte ich feststellen: Abhängig davon, ob ich
\usepackage{color} einbinde, ändert sich der Abstand einer mehrzeiligen
Bildunterschrift zum Bild. Sie wird genau in dem Fall größer, wenn es a)
eine Koma-Klasse ist, b) 'color' eingebunden ist und c) die caption mehr
als eine Zeile hat. Ob latex oder pdftex ist egal.

Kann das jemand erklären?

Grüße,
Arne

-------------
Beispiel:

\documentclass[a4paper]{scrbook}
\usepackage{color}
\listfiles

\begin{document}
\begin{figure}
\centering
Test 2
\caption{Test 2 Test 2 Test 2 Test 2 Test 2 Test 2 Test 2
Test 2 Test 2 Test 2 Test 2 Test 2 Test 2 Test 2 Test 2
Test 2 Test 2 Test 2 Test 2 Test 2 Test 2 Test 2 Test 2 }
\end{figure}

\begin{figure}
\centering
Test
\caption{Test}
\end{figure}
\end{document}

System: Miktex

ohne 'color', latex: *File List*
scrbook.cls 2004/09/16 v2.9t LaTeX2e KOMA document class
scrlfile.sty 2004/09/16 v2.9t LaTeX2e KOMA package
bk11.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
typearea.sty 2004/09/16 v2.9t LaTeX2e KOMA package


mit 'color', latex: *File List*
scrbook.cls 2004/09/16 v2.9t LaTeX2e KOMA document class
scrlfile.sty 2004/09/16 v2.9t LaTeX2e KOMA package
bk11.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
typearea.sty 2004/09/16 v2.9t LaTeX2e KOMA package
color.sty 1999/02/16 v1.0i Standard LaTeX Color (DPC)
color.cfg 2003/03/08 v1.0 MiKTeX 'color' configuration
dvips.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
dvipsnam.def 1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)

mit 'color', pdftex: *File List*
scrbook.cls 2004/09/16 v2.9t LaTeX2e KOMA document class
scrlfile.sty 2004/09/16 v2.9t LaTeX2e KOMA package
bk11.clo 2004/02/16 v1.4f Standard LaTeX file (size option)
typearea.sty 2004/09/16 v2.9t LaTeX2e KOMA package
color.sty 1999/02/16 v1.0i Standard LaTeX Color (DPC)
color.cfg 2003/03/08 v1.0 MiKTeX 'color' configuration
pdftex.def 2002/06/19 v0.03k graphics/color for pdftex
supp-pdf.tex

Markus Kohm

unread,
Feb 3, 2005, 12:25:39 PM2/3/05
to
Arne Michaelsen wrote:

> Kann das jemand erklären?

Ja. Ich Idiot habe irgendwann \vtop statt \vbox an entscheidender Stelle
verwendet. Da color (logischerweise) \normalcolor umdefiniert und in
hängenden captions das unmittelbar vor \@hangfrom eingefügt wird, gibt es
den unerwünschten Effekt.

Die von mir nicht erwartete Auswirkung des color Pakets auf eine \vtop kann
man hier sehen:

\documentclass{article}
\usepackage{color}
\begin{document}

\makeatletter
\sbox\@tempboxa{\vtop{\normalcolor\@hangfrom{A}B\par}}%
with color + \texttt{\string\vtop}:\par
\begin{tabular}[t]{ll}
Height: & \the\ht\@tempboxa\\
Depth: & \the\dp\@tempboxa
\end{tabular}

\sbox\@tempboxa{\vtop{\relax\@hangfrom{A}B\par}}%
without color + \texttt{\string\vtop}:\par
\begin{tabular}[t]{ll}
Height: & \the\ht\@tempboxa\\
Depth: & \the\dp\@tempboxa
\end{tabular}

\sbox\@tempboxa{\vbox{\normalcolor\@hangfrom{A}B\par}}%
with color + \texttt{\string\vbox}:\par
\begin{tabular}[t]{ll}
Height: & \the\ht\@tempboxa\\
Depth: & \the\dp\@tempboxa
\end{tabular}

\sbox\@tempboxa{\vbox{\relax\@hangfrom{A}B\par}}%
without color + \texttt{\string\vbox}:\par
\begin{tabular}[t]{ll}
Height: & \the\ht\@tempboxa\\
Depth: & \the\dp\@tempboxa
\end{tabular}
\makeatother

\end{document}

Damit rechnet man nun normalerweise nicht gerade ... sollte man aber
natürlich zumindest testen. Erstaunlich, dass das erst jetzt auffällt.
Langsam beginne ich das color-Paket wirklich zu fürchten.

Gruß
Markus
--
Fragen zu LaTeX? --> http://www.dante.de/faq/de-tex-faq/
Fragen zu KOMA-Script? --> Anleitung z. B. auf CTAN (--> FAQ);
--> http://www.komascript.de
Die Verwendung einer falschen From-Angabe wäre ein Verstoß gegen rfc1036.

0 new messages