我已将其放入 LaTeX 中以获取另一页中的表格:
\afterpage{
\begin{landscape}
\begin{table}[h!]
\begin{center}
\begin{tabular}{| c ||l | l |l | l | l |l | l |l|l |l |l |l | l|l |}
\hline
Interval & \begin{sideways} Unison & Minor 2nd & Major 2nd & Minor 3rd & Major 3rd & Perfect 4th & Diminished 5th & Augmented 4th & Perfect 5th & Minor 6th and Major 6th & Minor 7th & Major 7th & Octave \end{sideways} \\
\hline
Ratios & $\frac{1}{1}$ & $\frac{256}{243}$ & $\frac{9}{8}$ & $\frac{32}{27}$ & $\frac{81}{64}$ & $\frac{4}{3}$ & $\frac{1024}{729}$ & $\frac{729}{512}$ & $\frac{3}{2}$ & $\frac{128}{81}$ & $\frac{27}{16}$ & $\frac{16}{9}$ & $\frac{243}{128}$ & $\frac{2}{1}$ \\
\hline
Note & C & D\$flat$ & D & E\$flat$ & E & F & G\$flat$ & F$\sharp$& G & A\$flat$ & A & B\$flat$ & B & C \\
\hline
\end{tabular}
\caption{The Pythagorean Chromatic Scale$}
\end{center}
\end{table}
\end{landscape}
}
但我一直收到错误消息。是因为它太大了吗?!
答案1
这样的表格读起来很不方便:它横向放置,列标题也横向放置。
最好将其转置:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\begin{table}[htp]
\centering
\begin{tabular}{lcc}
\toprule
Interval & Ratio & Note \\
\midrule
Unison & $\frac{1}{1}$ & C \\
\addlinespace
Minor 2nd & $\frac{256}{243}$ & D$\flat$ \\
\addlinespace
Major 2nd & $\frac{9}{8}$ & D \\
\addlinespace
Minor 3rd & $\frac{32}{27}$ & E$\flat$ \\
\addlinespace
Major 3rd & $\frac{81}{64}$ & E \\
\addlinespace
Perfect 4th & $\frac{4}{3}$ & F \\
\addlinespace
Diminished 5th & $\frac{1024}{729}$ & G$\flat$ \\
\addlinespace
Augmented 4th & $\frac{729}{512}$ & F$\sharp$ \\
\addlinespace
Perfect 5th & $\frac{3}{2}$ & G \\
\addlinespace
Minor 6th & $\frac{128}{81}$ & A$\flat$ \\
\addlinespace
Major 6th & $\frac{27}{16}$ & A \\
\addlinespace
Minor 7th & $\frac{16}{9}$ & B$\flat$ \\
\addlinespace
Major 7th & $\frac{243}{128}$ & B \\
\addlinespace
Octave & $\frac{2}{1}$ & C \\
\bottomrule
\end{tabular}
\caption{The Pythagorean Chromatic Scale}
\end{table}
\end{document}
答案2
您的代码(至少是发布的代码)包含很多错误,无法编译。我已尽力将其清理干净。除其他外,我已删除所有垂直线;在我看来,垂直线只会造成混乱。我还用 、 和 替换了各种指令,\hline
这三个包命令可产生更好的间距。一个问题是\toprule
\midrule
\bottomrule
booktabs
不是但似乎存在的问题是表格太宽,无法放入文本块。
\documentclass{article}
\usepackage{graphicx,booktabs}
\newcommand{\rot}[1]{\rotatebox{90}{#1}} % shorthand macro to rotate items by 90 degrees
\begin{document}
\begin{table}
\centering
\begin{tabular}{ @{} l *{14}{c} }
\toprule
Interval & \rot{Unison} & \rot{Minor 2nd} & \rot{Major 2nd} &
\rot{Minor 3rd} & \rot{Major 3rd} & \rot{Perfect 4th} &
\rot{Diminished 5th} & \rot{Augmented 4th\ } & \rot{Perfect 5th} &
\rot{Minor 6th} & \rot{Major 6th} & \rot{Minor 7th} & \rot{Major 7th} &
\rot{Octave} \\
\midrule
Ratio & $\frac{1}{1}$ & $\frac{256}{243}$ & $\frac{9}{8}$ &
$\frac{32}{27}$ & $\frac{81}{64}$ & $\frac{4}{3}$ &
$\frac{1024}{729}$ & $\frac{729}{512}$ & $\frac{3}{2}$ &
$\frac{128}{81}$ & $\frac{27}{16}$ & $\frac{16}{9}$&
$\frac{243}{128}$ & $\frac{2}{1}$ \\[1ex]
Note & C & D$\flat$ & D & E$\flat$ & E & F & G$\flat$ & F$\sharp$& G & A$\flat$ & A & B$\flat$ & B & C \\
\bottomrule
\end{tabular}
\caption{The Pythagorean Chromatic Scale}
\end{table}
\end{document}