大家好:)我是论坛新手。
我试图用 LaTeX 来表示该表:
但结果很糟糕(正如您所见,第二行的第一个单元格太宽,而且我不知道如何自动开始新行):
下面是我使用过的代码的最小工作示例:
\documentclass{article}
\usepackage{rotating}
\usepackage{pdflscape}
\usepackage{rotating}
\usepackage{trig}
\usepackage{tabu}
\usepackage{caption}
\usepackage{pdflscape}
\usepackage{tabulary}
\usepackage{array}
\begin{document}
\begin{sidewaystable}
\begin{tabular}{lllllllllllllllllll}
\hline
& \begin{sideways}Atkinson (1998)\end{sideways} & \begin{sideways}Atkinson et al. (1997)\end{sideways} & \begin{sideways}Bititci et al (1997)\end{sideways} & \begin{sideways}Bourne et al (2002)\end{sideways} & \begin{sideways}Forza \& Salvador (2000)\end{sideways} & \begin{sideways}Gates (1999)\end{sideways} & \begin{sideways}Ittner et al (2003)\end{sideways} & \begin{sideways}Kaplan \& Norton (1996)\end{sideways} & \begin{sideways}Kerssens-van Drongelen \& Fisscher (2003)\end{sideways} & \begin{sideways}Lebas (1995)\end{sideways} & \begin{sideways}Lynch \& Cross (1990)\end{sideways} & \begin{sideways}Maisel (2001)\end{sideways} & \begin{sideways}McGee (1992)\end{sideways} & \begin{sideways}Neely (1998)\end{sideways} & \begin{sideways}Neely et al. (1995)\end{sideways} & \begin{sideways}Otley (1999)\end{sideways} & \begin{sideways}Rogers (1990)\end{sideways} & \begin{sideways}PERCENTUALE SUL TOTALE\end{sideways} \\
\hline
Metriche di performance (multidimensionali, di efficienza/efficacia, interne/esterne, verticalmente e orizzontalmente integrate, multilivello) & & & & X & & & X & & X & & X & X & & X & X & X & X & 53\\
\hline
\end{tabular}
\end{sidewaystable}
\end{document}
提前感谢您的帮助!
答案1
类似以下内容?下面建议的解决方案使用sidewaystable
环境,使用环境tabularx
(将宽度设置为\textwidth
,将第一列类型设置为(略微修改的)类型),限制旋转标题单元格的高度,并使用包 -- 、、和--X
的宏使表格具有更开放的“外观”。booktabs
\toprule
\midrule
\addlinespace
\bottomrule
请注意,我还用 替换了所有 18 个 [!]\begin{sideways} ... \end{sideways}
实例\rotatebox{90}{...}
。
\documentclass{article}
\usepackage[italian]{babel}
\usepackage{rotating,caption,booktabs,calc}
\captionsetup{skip=0.333\baselineskip}
\usepackage{tabularx,ragged2e}
\newcolumntype{L}{>{\RaggedRight\hspace{0pt}}X}
\renewcommand\tabularxcolumn[1]{m{#1}}
\newcommand\mybox[1]{\parbox{\widthof{Kaplan \& Norton (1996)}}{\RaggedRight #1}}
\begin{document}
\begin{sidewaystable}
\caption{Some caption}
\setlength\tabcolsep{4pt} % default: 6pt
\begin{tabularx}{\textwidth}{@{} L *{18}{c} @{}}
\toprule
& \rotatebox{90}{Atkinson (1998)}
& \rotatebox{90}{Atkinson et al. (1997)}
& \rotatebox{90}{Bititci et al (1997)}
& \rotatebox{90}{Bourne et al (2002)}
& \rotatebox{90}{Forza \& Salvador (2000)}
& \rotatebox{90}{Gates (1999)}
& \rotatebox{90}{Ittner et al (2003)}
& \rotatebox{90}{Kaplan \& Norton (1996)}
& \rotatebox{90}{\mybox{Kerssens-van Drongelen \& Fisscher (2003)}}
& \rotatebox{90}{Lebas (1995)}
& \rotatebox{90}{Lynch \& Cross (1990)}
& \rotatebox{90}{Maisel (2001)}
& \rotatebox{90}{McGee (1992)}
& \rotatebox{90}{Neely (1998)}
& \rotatebox{90}{Neely et al. (1995)}
& \rotatebox{90}{Otley (1999)}
& \rotatebox{90}{Rogers (1990)}
& \rotatebox{90}{\mybox{\scshape Percentuale sul totale}} \\
\midrule
\textbf{Metriche di \textit{performance}} (multidimensionali, di efficienza\slash efficacia, interne\slash esterne, verticalmente e orizzontalmente integrate, multilivello)
& & & & $\times$ & & & $\times$ & & $\times$ & & $\times$ & $\times$ & & $\times$ & $\times$ & $\times$ & $\times$ & 53\\
\addlinespace
\textbf{Obiettivi} (spesso riferito a obiettivi strategichi)
& \dots \\
\addlinespace
\textbf{Infrastruttura a supporto} (acquisizione dati, ordinamento, \dots)
& \dots \\
\addlinespace
\dots \\
\bottomrule
\end{tabularx}
\end{sidewaystable}
\end{document}
答案2
除了不旋转整个表格、使用booktabs
包中的水平线并tabularx
确保表格适合可用空间之外,我还建议减小标题行和第一列的字体大小。我还会将第一列单元格中的附加文本移到包tablenotes
的环境中threeparttable
。作为替代方案,我还包含了一个使用数字而不是作者年份引用样式的表格版本。
\documentclass{article}
\usepackage{rotating}
\usepackage{caption}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{threeparttable}
\usepackage{booktabs}
\begin{document}
\begin{table}
\setlength{\tabcolsep}{2.5pt}
\settowidth\rotheadsize{\theadfont Kaplan \& Norton (1996)}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\begin{threeparttable}
\caption{caption text}
\label{key}
\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash\theadfont}X*{18}{c}}
\toprule
& \rothead{Atkinson (1998)}
& \rothead{Atkinson et al. (1997)}
& \rothead{Bititci et al (1997)}
& \rothead{Bourne et al (2002)}
& \rothead{Forza \& Salvador (2000)}
& \rothead{Gates (1999)}
& \rothead{Ittner et al (2003)}
& \rothead{Kaplan \& Norton (1996)}
& \rothead{Kerssens-van Drongelen \& Fisscher (2003)}
& \rothead{Lebas (1995)}
& \rothead{Lynch \& Cross (1990)}
& \rothead{Maisel (2001)}
& \rothead{McGee (1992)}
& \rothead{Neely (1998)}
& \rothead{Neely et al. (1995)}
& \rothead{Otley (1999)}
& \rothead{Rogers (1990)}
& \rothead{PERCENTUALE SUL TOTALE}\\
\midrule
Metriche di performance\tnote{1}
& & & & X & & & X & & X & & X & X & & X & X & X & X & 53\\ \addlinespace
Obiettivi\tnote{2}
& X & & & & & & X & X & & & & X & X & & & X & & 35\\ \addlinespace
Infrastruttura a supporto\tnote{3}
& & & & X & & & X & & X & & X & X & & X & X & X & X & 53\\ \addlinespace
text
& & & & X & & & X & & X & & X & X & & X & X & X & X & 53\\
\bottomrule
\end{tabularx}
\begin{tablenotes} \footnotesize
\item[1] multidimensionali, di efficienza/efficacia, interne/esterne, verticalmente e orizzontalmente integrate, multilivello
\item[2] spesso riferito a obiettivi strategichi
\item[3] acquisizione dati, ordinamento,
\end{tablenotes}
\end{threeparttable}
\end{table}
\begin{table}
\setlength{\tabcolsep}{2.5pt}
\settowidth\rotheadsize{\theadfont Kerssens-van Drongelen \& Fisscher (2003)}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\begin{threeparttable}
\caption{caption text}
\label{key}
\begin{tabularx}{\linewidth}{>{\raggedright\arraybackslash\theadfont}X*{18}{c}}
\toprule
& \thead{[1]}
& \thead{[2]}
& \thead{[3]}
& \thead{[4]}
& \thead{[5]}
& \thead{[6]}
& \thead{[7]}
& \thead{[8]}
& \thead{[9]}
& \thead{[10]}
& \thead{[11]}
& \thead{[12]}
& \thead{[13]}
& \thead{[14]}
& \thead{[15]}
& \thead{[16]}
& \thead{[17]}
& \thead{\%\tnote{1}}\\
\midrule
Metriche di performance\tnote{2}
& & & & X & & & X & & X & & X & X & & X & X & X & X & 53\\ \addlinespace
next category\tnote{3}
& X & & & & & & X & X & & & & X & X & & & X & & 35\\ \addlinespace
another category with a longer name\tnote{4}
& & & & X & & & X & & X & & X & X & & X & X & X & X & 53\\ \addlinespace
text
& & & & X & & & X & & X & & X & X & & X & X & X & X & 53\\
\bottomrule
\end{tabularx}
\begin{tablenotes} \footnotesize
\item{}
[1] Atkinson (1998),
[2] Atkinson et al. (1997),
[3] Bititci et al (1997),
[4] Bourne et al (2002),
[5] Forza \& Salvador (2000),
[6] Gates (1999),
[7] Ittner et al (2003),
[8] Kaplan \& Norton (1996),
[9] Kerssens-van Drongelen \& Fisscher (2003),
[10] Lebas (1995),
[11] Lynch \& Cross (1990),
[12] Maisel (2001),
[13] McGee (1992),
[14] Neely (1998),
[15] Neely et al. (1995),
[16] Otley (1999),
[17] Rogers (1990)
\item[1] PERCENTUALE SUL TOTALE
\item[2] multidimensionali, di efficienza/efficacia, interne/esterne, verticalmente e orizzontalmente integrate, multilivello
\item[3] more explanatory text for the second category
\item[4] table note for the third category
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}