Longtable 和 scrreport - 标题太小

Longtable 和 scrreport - 标题太小

我让表格的标题由 定义scrreport。我跳过了captioncaption2包,因为它们不允许我调整标题和表格之间的距离。我对结果很满意。但是,当使用 时\longtable,标题会更小,并且设置为与表格其余部分相同的大小。

我尝试了几种解决方案,包括如何在不改变标题字体大小的情况下改变长表行的字体大小?https://tex.stackexchange.com/a/308135/193730。第一个没有起作用,第二个使用了\usepackage[font=normalsize]{caption},如上所述,我想避免这种情况。

有人知道如何解决这个问题吗?

谢谢

我的 MWE:(不幸的是产生了一个小错误)


\documentclass[a4paper,
                DIV=10,
                BCOR=5mm,
                headsepline,
                fontsize=11pt,captions=tableheading]
                {scrreprt}

\usepackage[onehalfspacing]{setspace}

\pagestyle{headings}

%
\makeatletter
\let\origps@plain\ps@plain
\newcommand\MakePlainPagestyleEmpty{\let\ps@plain\ps@empty}
\newcommand\MakePlainPagestylePlain{\let\ps@plain\origps@plain}
\makeatother


% Für das Handling von deutscher Sprache
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[]{url}
\usepackage[babel]{csquotes} %Anführungszeichen
\usepackage{textcomp}
\usepackage{dcolumn}
\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{amsmath}
% Für schönere Listen
\usepackage[]{mdwlist}

% Für griechisches Alphabet
\usepackage{pxfonts}

%Hurenkinder/Schusterjungen/allein stehende Überschriften
\clubpenalty = 10000 
\widowpenalty = 10000 
\displaywidowpenalty = 10000

% Zum Referenzieren, --> Buch S. 72-74
\usepackage[english]{varioref}
\usepackage[english]{hyperref}
\usepackage[english,noabbrev]{cleveref}



%Fortlaufende Nummerierung der Fußnote
\usepackage{chngcntr}
\counterwithout{footnote}{chapter}


%Schrift
\usepackage{lmodern}
\usepackage{lettrine}
\addtokomafont{disposition}{\rmfamily}
\let\oldpercent=\%
\renewcommand{\%}{\ifmmode\oldpercent\else\,\oldpercent\fi}
% CM-Modern Sans-Serif Command
%\renewcommand{\familydefault}{\sfdefault} 
\usepackage{changepage}

%Grafik
\usepackage{graphicx}
\usepackage{multicol}
\usepackage{float}
\usepackage[export]{adjustbox}
\makeatletter
\g@addto@macro\@floatboxreset\centering
\makeatother
\usepackage[export]{adjustbox} %Horizontale Anordnung von Grafiken innerhalb des Befehls \includegraphics

%table
\renewcommand{\caplabelfont}{\bfseries} 
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{afterpage}
\usepackage[table,xcdraw,dvipsnames]{xcolor}
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
\usepackage{tabu}
\usepackage{tabularx}
\usepackage{multirow,bigdelim}
\usepackage{array}
\usepackage{arydshln}
\usepackage{threeparttable}
\usepackage{threeparttablex}
\usepackage{pdflscape}
\usepackage{lscape}
\usepackage{colortbl}
\definecolor{light-gray}{gray}{0.92}
\definecolor{light-red}{RGB}{255,174,174}
\definecolor{light-green}{cmyk}{0.4,0,0.4,0}
\usepackage{siunitx}
%\usepackage[format=hang,margin=10pt,font=small,labelfont=bf]{caption}
\usepackage{makecell}

\begin{document}
\pagestyle{myheadings}
\markright{Appendix}
\pagebreak
\renewcommand{\thetable}{A.\arabic{table}}
\begin{scriptsize}
\renewcommand{\theadalign}{cc}
\begin{longtable}[c]{crrcrrc}
\caption{Agglomeration Schedule, Average Linkage Within Groups}
\label{tab:1} \\
% Definition des Tabellenkopfes auf der ersten Seite
\toprule
 \textbf{Stage} & \multicolumn{2}{c}{\textbf{Cluster Combined}} & \textbf{Coefficients} & \multicolumn{2}{c}{\textbf{\thead{Stage Cluster \\ First Appears}}} & \textbf{Next Stage}\\
 \cmidrule(lr){2-3}\cmidrule(lr){5-6}
    ~ & \textbf{Cluster} 1 & \textbf{Cluster 2} & ~ & \textbf{Cluster} 1 & \textbf{Cluster 2} & ~\\
    \midrule\\
\endfirsthead % Erster Kopf zu Ende
% Definition des Tabellenkopfes auf den folgenden Seiten
\caption*{Continuation of \vref{tab:1}}\\
\toprule
 \textbf{Stage} & \multicolumn{2}{c}{\textbf{Cluster Combined}} & \textbf{Coefficients} & \multicolumn{2}{c}{\textbf{\thead{Stage Cluster \\ First Appears}}} & \textbf{Next Stage}\\
 \cmidrule(lr){2-3}\cmidrule(lr){5-6}
    ~ & \textbf{Cluster} 1 & \textbf{Cluster 2} & ~ & \textbf{Cluster} 1 & \textbf{Cluster 2} & ~\\
    \midrule
\endhead % Zweiter Kopf ist zu Ende
\endfoot
\bottomrule
\endlastfoot
% Ab hier kommt der Inhalt der Tabelle
1 & 2840 &  2842 &  1 & 0 & 0 & 3\\
2 & 2839 &  2841 &  1 & 0 & 0 & 4\\
3 & 1 & 2840 &  1 & 0 & 1 & 11\\
\end{longtable}
\end{scriptsize}

\begin{landscape}
    \centering
\begin{table}[p]
\begin{tiny}
\renewcommand{\arraystretch}{1.3}
\newcommand{\STAB}[1]{\begin{tabular}{@{}c@{}}#1\end{tabular}}
\caption{Results of multinomial logistic regression analysis, estimating the effects of a complete model on cluster membership in odds ratios}
\label{tab:2}
\begin{threeparttable}
\begin{tabular}{llD{.}{.}{4}D{.}{.}{4}D{.}{.}{4}D{.}{.}{4}D{.}{.}{4}D{.}{.}{4}D{.}{.}{4}D{.}{.}{4}D{.}{.}{4}D{.}{.}{4}D{.}{.}{4}}
\toprule
& \multicolumn{1}{r}{\textit{cluster...}} & \multicolumn{1}{c}{Cluster 2} & \multicolumn{1}{c}{Cluster 3} & \multicolumn{1}{c}{Cluster 4} & \multicolumn{1}{c}{Cluster 5} & \multicolumn{1}{c}{Cluster 6} & \multicolumn{1}{c}{Cluster 7} & \multicolumn{1}{c}{Cluster 8} & \multicolumn{1}{c}{Cluster 3} & \multicolumn{1}{c}{Cluster 4} & \multicolumn{1}{c}{Cluster 5} & \multicolumn{1}{c}{Cluster 6} \\
& \multicolumn{1}{r}{\textit{compared to...}} & \multicolumn{7}{c}{\textbf{Voters (1)}} & \multicolumn{4}{c}{\textbf{(Hyperactives 2)}}\\
 \cmidrule(lr){1-9} \cmidrule(lr){10-13}
\multirow{10}{*}{\STAB{\rotatebox[origin=c]{90}{\textbf{GIM}}}} & Selective-outcome & 1.018      & 1.192      & .900      & 1.126      & .839      & .917      & .917      & 1.171      & .884      & 1.106      & .824  \\
    & Selective-process & .902      & 1.217      & 1.113      & .986      & .976      & 2.572 ^{\ast\ast}    & 2.572 ^{\ast\ast}    & 1.350      & 1.234      & 1.093      & 1.082  \\
    & Collective-political & 1.109      & 1.145      & .903      & .953      & .979      & 1.228      & 1.228      & 1.033      & .815      & .860      & .883  \\
    & Normative & .933      & .788      & .987      & .965      & 1.086      & 1.112      & 1.112      & .845      & 1.058      & 1.035      & 1.164  \\
    & Altruistic & 1.223 ^{\ast}    & 1.045      & 1.149 ^{\ast}    & .971      & 1.016      & 1.389 ^{\ast}    & 1.389 ^{\ast}    & .855      & .939      & .793 ^{\ast}    & .830  \\
    & Ideological & .581 ^{\ast\ast\ast}    & 1.083      & 1.137      & .910      & 1.130      & .767      & .767      & 1.864 ^{\ast\ast}    & 1.956 ^{\ast\ast\ast}    & 1.566 ^{\ast\ast}    & 1.945 ^{\ast\ast\ast}\\
    & Expressive & 1.914 ^{\ast\ast\ast}    & 1.115      & 1.030      & 1.356 ^{\ast}    & .940      & 1.302      & 1.302      & .583 ^{\ast}    & .538 ^{\ast\ast\ast}    & .709      & .491 ^{\ast\ast\ast}\\
    & Opp. Costs (n) & .868      & 1.094      & .913      & .980      & .919      & 1.166      & 1.166      & 1.261      & 1.052      & 1.130      & 1.060  \\
    & Disutility (n) & 1.223 ^{\ast}    & .960      & 1.119      & 1.031      & 1.134      & 1.519 ^{\ast\ast}    & 1.519 ^{\ast\ast}    & .785      & .915      & .843      & .927  \\
    & Financial (n) & 1.227      & 1.174      & .999      & .960      & 1.162      & 1.004      & 1.004      & .956      & .814      & .782      & .947  \\
\bottomrule
\end{tabular}
\begin{tablenotes}
\item bla
\end{tablenotes}
\end{threeparttable}
\end{tiny}
\end{table}
\end{landscape}
\end{document}`

答案1

使用 KOMA-Script 类,您可以使用

\addtokomafont{caption}{\normalsize}

梅威瑟:

\documentclass[captions=tableheading]{scrreprt}
\usepackage[onehalfspacing]{setspace}

\usepackage{array}
\usepackage{booktabs}
\usepackage{longtable}

\addtokomafont{caption}{\normalsize}
\addtokomafont{captionlabel}{\bfseries}

\usepackage{blindtext}
\begin{document}
\blindtext

\begingroup\par\scriptsize
\begin{longtable}{ll}
  \caption{A caption}\\
  \toprule
  \textbf{Column 1}&\textbf{Column 2}\\
  \midrule
  \endfirsthead
  Text&Text\\
  \bottomrule
\end{longtable}
\par\endgroup

\blindtext

\begingroup\par\tiny
\begin{longtable}{ll}
  \caption{A caption}\\
  \toprule
  \textbf{Column 1}&\textbf{Column 2}\\
  \midrule
  \endfirsthead
  Text&Text\\
  \bottomrule
\end{longtable}
\par\endgroup

\blindtext[2]
\end{document}

结果:

在此处输入图片描述

相关内容