2

does someone know how to control the distance between a table and the head of a document page defined by the actual textheight? Somehow it only works for figures (figure 3.4) not for tables. As I usually place the tables on top of the text pages I do have different starting points of on text pages and pages that start with a table.

Thanks for any hint!

\documentclass[10pt,final]{scrbook}

\usepackage{framed, xcolor, graphicx}

\usepackage[english,ngerman]{babel}
\usepackage[latin1]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{times}
\usepackage{helvet}


\usepackage{fix-cm}

\makeatletter
\g@addto@macro\normalsize{\fontsize{9.5pt}{13.5pt}\selectfont}
\g@addto@macro\footnotesize{\fontsize{8.5pt}{13pt}\selectfont}
\g@addto@macro\footnoterule{\vskip0.5\baselineskip}
\makeatother


\usepackage[paperheight=22.5cm,paperwidth=14.8cm,showframe]{geometry} 
\geometry{includeheadfoot,top=1.5cm,headsep=6mm,bottom=0.5cm,footskip=13mm,
textwidth=11.3cm,inner=1.6cm,dvips,twoside}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancypagestyle{plain}{\fancyhf{}\renewcommand{\headrulewidth}{0.0pt}}
\renewcommand{\sectionmark}[1]{}
\renewcommand{\subsectionmark}[1]{}
\fancyhead[LE]{\footnotesize\thepage\sffamily{ }|{ }\footnotesize{\leftmark}}
\fancyhead[RO]{\footnotesize\sffamily{\rightmark}{ }|{ }\rmfamily\thepage} 
\renewcommand{\headrulewidth}{0.5pt}

\setlength{\parindent}{0.5cm} 
\setlength{\parskip}{0pt} 

\usepackage{xspace}
\usepackage{lipsum}

\usepackage{ctable}
\usepackage{array}
\usepackage[labelfont=it,textfont=it,singlelinecheck=off,justification=raggedright]{caption}

\begin{document}
\ctable[cap = Regionen Ranking (\textit{Foreign News}-Studie),caption = Regionen Ranking (\textit{Foreign News}-Studie),label = tab:RegionalRankingForeignNews, doinside = \tiny, pos=t, captionskip = 2ex]     {lcccccccc}
{\tnote[]{\scriptsize Quelle:} \tnote[a]{\scriptsize Die Darstellung der Ränge entspricht folgender Lesart: Rang \textsubscript{Berichtsregion}/Rang\textsubscript{Akteursursprungsregion}.}}
{\toprule 
& \multicolumn{8}{c}{Medienberichtsregion/ Akteurursprungsregion\tmark} \\
\cmidrule(rl){2-9}
Weltregion & Nordamerika & Lateinamerika & Afrika & Naher Osten & Asien& Osteuropa & Westeuropa & Int. Allg. \\ 
\cmidrule(r){1-1}\cmidrule(rl){2-2}\cmidrule (rl){3-3}\cmidrule (rl){4-4}\cmidrule (rl){5-5}\cmidrule (rl){6-6}\cmidrule (rl){7-7}\cmidrule (rl){8-8}\cmidrule (rl){9-9}
Nordamerika \tmark & 1/1 & 6/7 & 5/5 & 2/2 & 4/4 & 7/3 & 2/6 & 8/8 \\
Lateinamerika & 3/3 & 1/1 & 6/6 & 4/4 & 5/6 & 6/6 & 2/2 & 8/6 \\
Afrika & 5/5 & 8/8 & 1/1 & 2/2 & 5/6 & 7/7 & 3/3 & 5/4 \\
Naher Osten & 3/2 & 6/8 & 4/4 & 1/1 & 5/5 & 7/3 & 2/6 & 8/7 \\
Asien & 3/3 & 8/8 & 5/6 & 4/2 & 1/1 & 6/7 & 2/3 & 7/5 \\
Osteuropa & 6/6 & 8/8 & 7/7 & 4/6 & 3/4 & 1/1 & 2/2 & 4/3 \\
Westeuropa & 2/2 & 8/8 & 5/7 & 3/3 & 5/6 & 4/4 & 1/1 & 7/5 \\
Rang \textsubscript{Region/Akteur} & 3/2 & 7/8 & 5/6 & 2/1 & 4/5 & 6/4 & 1/3 & 8/7 \\
Rang \textsubscript{Gesamt} & 3 & 7 & 6 & 1 & 4 & 5 & 2 & 8 \\
 \bottomrule}

\begin{figure}[ht] 
\captionsetup{margin=1cm}
\captionabove[Internationale Informations- und Kommunikationsbeziehungen {Internationale Informations- und Kommunikationsbeziehungen}
\begin{center}
\includegraphics[draft, width=9.3cm]{CommunicationFlow}\\
\end{center}
\noindent \hspace*{1cm}Quelle:
\label{fig:CommunicationFlow}
\end{figure}
\lipsum
\end{document}
  • What type of control are you looking for? – Werner Oct 13 '15 at 19:17
  • 2
    Can you show a minimal working example which show this behavior? A float doesn't care for its content. If figure work as expected, the table also should. – Zarko Oct 13 '15 at 19:19
  • A command that defines the space above the caption. I know that there are a lot to define the distance between paragraphs and tables, tables and texts ect. Here it seems that there is a spacing is special for a ctable and the top headline. – Horst Oct 13 '15 at 19:20
1

It seems that you are searching for the document class option captions=tableheading:

\documentclass[10pt,final,captions=tableheading]{scrbook}
...

Captions in KOMA-Script will be leaded by \abovecaptionskip (default value = 10pt) and followed by \belowcaptionskip (default value = 0pt), but only if the caption is below the content. If the caption is above the content, both skips will be swapped.

How does KOMA-Script knows if the caption is above or below the content? You have either use global document class options like captions=tableheading to tell KOMA-Script that captions in tables should be treated as if they are above the table. Or you have to use the commands \captionabove or \captionbelow. However, you can't use \captionabove with ctables, so you have to use the global document class option instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.