在我的论文中,我想在很长的表格中使用分页符,这些表格是用 tabularx 和 booktabs 包创建的。令人惊讶的是,到目前为止,我找不到任何适用于我的问题的解决方案,效果很好。
以下是我想分成两页的表格的 MWE:
\documentclass[10pt,a4paper]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{eurosym}
\begin{document}
\begin{table}[h!]
\caption{Overview of Key Variables}
\begin{tabularx}{\textwidth}{p{4cm}Xp{1.5cm}}
\toprule
Variable & Question& Scale\\
\midrule
\textit{Value of sporting success}\\
{WTP\_PR} & How much would you be willing to pay in total for fan bonds in the promotion scenario? (in \EUR) & Metric\\
{WTP\_PR\_log} & Log of WTP\_PR & Metric\\
{WTP\_PR\_bin} & Binary variable of WTP\_PR (0=no WTP, 1=positive WTP) & Dummy\\
{WTP\_RE} & How much would you be willing to pay in total for fan bonds in the relegation scenario? (in \EUR) & Metric\\
{WTP\_RE\_log} & Log of WTP\_RE & Metric\\
{WTP\_RE\_bin} & Binary variable of WTP\_RE (0=no WTP, 1=positive WTP) & Dummy\\
\textit{Sport related consumption capital}&&\\
SPORT& I regularly participate in sport (at least once per week) (0=fully disagree, 5=fully agree)& Ordinal\\
SPINT & I am generally interested in sport (0=fully disagree, 5=fully agree) & Ordinal\\
\textit{Football-specific consumption capital}& & \\
FOOTP & I regularly play football (at least once per week) (0=fully disagree, 5=fully agree) & Ordinal\\
FOOTINT & I am interested in football (0=fully disagree, 5=fully agree) & Ordinal\\
GAMESHOME & How many home games of club XY do you attend per season? (open question)& Metric\\
GAMESAWAY & How many away games of club XY do you attend per season? (open question)& Metric \\
ATTEND & Sum of GAMESHOME and GAMESAWAY& Metric\\
TV & How many games of club XY do you watch on TV per season? (open question)& Metric\\
TALK & How many days a week do you talk about club XY? (open question)& Metric\\
EXPMERCH & How much money do you spend on merchandise articles of club XY per season? (0=less than \EUR50, 1=more than \EUR50) & Dummy\\
WEARMERCH & How often do you wear merchandising articles of club XY? (0=less often, 1=at least once per month)& Dummy\\
\textit{Intangible factors}&&\\
IDC & I identify myself with club XY (0=fully disagree, 5=fully agree) & Ordinal\\
FAN & I am a fan of club XY (0=fully disagree, 5=fully agree)& Ordinal \\
REPUT & It is important for the reputation of city XY that club XY does well (0=fully disagree, 5=fully agree)& Ordinal\\
HERO & The players of club XY have a role model function (0=fully disagree, 5=fully agree) & Ordinal\\
HAPPY & It makes me happy if club XY wins (0=fully disagree, 5=fully agree) & Ordinal\\
SAD & It makes me sad if club XY looses (0=fully disagree, 5=fully agree) & Ordinal\\
INTANGIBLE & Index of IDC, FAN, REPUT, HERO, HAPPY, and SAD& Ordinal\\
\textit{Socio-economic factors} & &\\
SEX & What is your gender? (0=male, 1=female)& Dummy\\
AGE & How old are you? (open question)& Metric\\
YEARSLIV & For how many years have you been living in your city? (open question) & Metric \\
EDU & What is your highest educational attainment? (0=below A-levels, 1=at least A-levels)& Dummy\\
INC & What is your monthly net income? (1=up to \EUR500, 9=over \EUR4000)& Ordinal\\
\textit{Regional factors}&&\\
DISTANCE & How many km away from the stadium do you live? (0=less than 100km, 1=more than 100km)& Dummy \\
\bottomrule
\end{tabularx}
\label{tab:variables}
\end{table}
\end{document}
提前非常感谢您的帮助提示!
你的,马格努斯
答案1
\documentclass[10pt,a4paper]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{eurosym}
\begin{document}
\begin{longtable}{@{}p{4cm}p{\dimexpr\textwidth-5.5cm-4\tabcolsep}p{1.5cm}@{}}
\caption{Overview of Key Variables\label{tab:variables}}\\
\toprule
Variable & Question& Scale\\
\midrule
\endfirsthead
\caption[]{Overview of Key Variables (continued)}\\
\toprule
Variable & Question& Scale\\
\midrule
\endhead
\textit{Value of sporting success}\\
{WTP\_PR} & How much would you be willing to pay in total for fan bonds in the promotion scenario? (in \EUR) & Metric\\
{WTP\_PR\_log} & Log of WTP\_PR & Metric\\
{WTP\_PR\_bin} & Binary variable of WTP\_PR (0=no WTP, 1=positive WTP) & Dummy\\
{WTP\_RE} & How much would you be willing to pay in total for fan bonds in the relegation scenario? (in \EUR) & Metric\\
{WTP\_RE\_log} & Log of WTP\_RE & Metric\\
{WTP\_RE\_bin} & Binary variable of WTP\_RE (0=no WTP, 1=positive WTP) & Dummy\\
\textit{Sport related consumption capital}&&\\
SPORT& I regularly participate in sport (at least once per week) (0=fully disagree, 5=fully agree)& Ordinal\\
SPINT & I am generally interested in sport (0=fully disagree, 5=fully agree) & Ordinal\\
\textit{Football-specific consumption capital}& & \\
FOOTP & I regularly play football (at least once per week) (0=fully disagree, 5=fully agree) & Ordinal\\
FOOTINT & I am interested in football (0=fully disagree, 5=fully agree) & Ordinal\\
GAMESHOME & How many home games of club XY do you attend per season? (open question)& Metric\\
GAMESAWAY & How many away games of club XY do you attend per season? (open question)& Metric \\
ATTEND & Sum of GAMESHOME and GAMESAWAY& Metric\\
TV & How many games of club XY do you watch on TV per season? (open question)& Metric\\
TALK & How many days a week do you talk about club XY? (open question)& Metric\\
EXPMERCH & How much money do you spend on merchandise articles of club XY per season? (0=less than \EUR50, 1=more than \EUR50) & Dummy\\
WEARMERCH & How often do you wear merchandising articles of club XY? (0=less often, 1=at least once per month)& Dummy\\
\textit{Intangible factors}&&\\
IDC & I identify myself with club XY (0=fully disagree, 5=fully agree) & Ordinal\\
FAN & I am a fan of club XY (0=fully disagree, 5=fully agree)& Ordinal \\
REPUT & It is important for the reputation of city XY that club XY does well (0=fully disagree, 5=fully agree)& Ordinal\\
HERO & The players of club XY have a role model function (0=fully disagree, 5=fully agree) & Ordinal\\
HAPPY & It makes me happy if club XY wins (0=fully disagree, 5=fully agree) & Ordinal\\
SAD & It makes me sad if club XY looses (0=fully disagree, 5=fully agree) & Ordinal\\
INTANGIBLE & Index of IDC, FAN, REPUT, HERO, HAPPY, and SAD& Ordinal\\
\textit{Socio-economic factors} & &\\
SEX & What is your gender? (0=male, 1=female)& Dummy\\
AGE & How old are you? (open question)& Metric\\
YEARSLIV & For how many years have you been living in your city? (open question) & Metric \\
EDU & What is your highest educational attainment? (0=below A-levels, 1=at least A-levels)& Dummy\\
INC & What is your monthly net income? (1=up to \EUR500, 9=over \EUR4000)& Ordinal\\
\textit{Regional factors}&&\\
DISTANCE & How many km away from the stadium do you live? (0=less than 100km, 1=more than 100km)& Dummy \\
\bottomrule
\end{longtable}
\end{document}
答案2
感谢 David Carlisle 的回答。最后我使用了环境longtabu
。代码如下:
\begin{longtabu} to \textwidth{p{4cm}Xp{1.5cm}}
\caption{Overview of Key Variables\label{tab:variables}}\\
\toprule
Variable & Question& Scale\\
\midrule
\endfirsthead
\caption[]{Overview of Key Variables (continued)}\\
\toprule
Variable & Question& Scale\\
\midrule
\endhead
\textit{Value of sporting success}\\
{WTP\_PR} & How much would you be willing to pay in total for fan bonds in the promotion scenario? (in \EUR) & Metric\\
{WTP\_PR\_log} & Log of WTP\_PR & Metric\\
{WTP\_PR\_bin} & Binary variable of WTP\_PR (0=no WTP, 1=positive WTP) & Dummy\\
{WTP\_RE} & How much would you be willing to pay in total for fan bonds in the relegation scenario? (in \EUR) & Metric\\
{WTP\_RE\_log} & Log of WTP\_RE & Metric\\
{WTP\_RE\_bin} & Binary variable of WTP\_RE (0=no WTP, 1=positive WTP) & Dummy\\
\textit{Sport related consumption capital}&&\\
SPORT& I regularly participate in sport (at least once per week) (0=fully disagree, 5=fully agree)& Ordinal\\
SPINT & I am generally interested in sport (0=fully disagree, 5=fully agree) & Ordinal\\
\bottomrule
\end{longtabu}