# [texhax] (no subject)

Steenbakkers, R.J.A. R.J.A.Steenbakkers at student.tue.nl
Thu Apr 14 15:46:08 CEST 2005

Hi,

I'm having a problem with captions of landscape tables in PDF. I use KTeXMaker2 under Linux to compile my DVI files, convert them into PS files, and finally convert these into PDF files.

The problem is that, when I choose to display the caption text in italic style, it is not placed on one line. Try the example tex file below and you will see in the PDF file that the caption text at one point jumps to a higher position. Well, at least if you compile and convert the same way I did, you should.

This is not a viewer problem; it also shows up in print. Everything is OK in the PS file though, so something must go wrong in the PS->PDF conversion. The problem never occurs when:

1) the table is on a page with portrait layout;
2) the caption text is displayed in any other than italic style;
3) the DVI file is directly converted to PDF instead of to PS first and then to PDF.

But I found that the length of the caption also matters. When I replaced it by

<This annoying italic caption text should be on one line.>

the jump disappeared, but then the end of the text was messed up. And with the caption

<This unbelievably annoying italic caption text should be on one line.>

there were two jumps plus a messed-up text.

So far, I haven't been able to find any information on this problem. Does anyone have an idea?

Greetings, Rudi

THE EXAMPLE TEX FILE:

\documentclass[a4paper]{article}
\usepackage[textfont=it]{caption}
\usepackage{lscape}
\begin{document}
\begin{landscape}
\begin{table}
\begin{center}
\caption{This text should be on one line.}
\begin{tabular}{|c|c|c|}
\hline
cell contents & cell contents & cell contents
\\\hline
cell contents & cell contents & cell contents
\\\hline
\end{tabular}
\end{center}
\end{table}
\end{landscape}
\end{document}