对齐 LaTeX 表中的旋转标题

对齐 LaTeX 表中的旋转标题

我有一张宽表,我想除了表标题之外,我已经完成了。在下面的例子中,我不得不旋转第 5、6 和 8 列的标题。我尝试了很多方法让这些标题与未旋转的标题对齐(大致居中),但都无济于事(例如,将可选参数parbox从更改c为并更改参数)。看起来解决方案btmultirow这里可能有用,但我无法让它发挥作用;似乎也不起作用。

非常感谢您的帮助。

\documentclass[fontsize=9pt, twoside, final, openright, c6paper]{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{scrextend}
\usepackage{moresize}
\usepackage{booktabs}                       
\usepackage{multirow}                       
\usepackage{array}                          
\usepackage{hanging}                        
\usepackage{dashrule}                       
\usepackage{longtable}                      
\usepackage{setspace}                       
\usepackage{makecell}                       
\usepackage{colortbl}   
\usepackage[dvipsnames]{xcolor}     
\usepackage{fancyhdr}       
\usepackage{ragged2e}   
\usepackage{rotating}   
\usepackage{here}       
\usepackage[colorlinks=true, hyperindex=true]{hyperref} 

% COLOR DEFINITION
\definecolor{darkred}{HTML}{AE0000}             
\newcommand{\cdr}{\color{darkred}}

\newcommand{\phz}{\phantom{0}}



\begin{document}

\setcounter{page}{60}
\thispagestyle{empty}
\setlength{\tabcolsep}{3pt}     % Default value: 6pt
\renewcommand{\arraystretch}{0.6}



\begin{Center}
{\large{festorum mobilium}}
\end{Center}

\begin{table}[H]
\centering
\scriptsize{
\begin{tabular}{ccccccc>{\color{darkred}}c} \toprule \midrule
Anno & \multirow{2}{*}{Ascensio} & \multirow{2}{*}{Pentecostes} & 
Corpus & \raisebox{3em}{\multirow{2}{*}{\begin{sideways}\parbox[c]{16ex}{\centering Indict.}\end{sideways}}} & 
\raisebox{3.4em}{\multirow{2}{*}{\begin{sideways}\parbox[c]{16ex}{\centering Dom.\ post \\ Pentec.}\end{sideways}}} & 
Dom.\ I & \raisebox{3.4em}{\multirow{2}{*}{\begin{sideways}\parbox[c]{16ex}{\centering Litt.\ Mart.}\end{sideways}}} \\
%
Dom. & & & Christi & & & Adventus & \\
%
\midrule
2024 & \phz9 maii & 19 maii & 30 maii & \phz2 & 27 & \phz1 dec. &  u \\
2025 & 29 maii & \phz8 iunii & 19 iunii & \phz3 & 24 & 30 nov. & P \\
2026 & 14 maii & 24 maii & \phz4 iunii & \phz4 & 26 & 29 nov. & l \\
2027 & \phz6 maii & 16 maii & 27 maii & \phz5 & 27 & 28 nov. & C \\
2028 & 25 maii & \phz4 iunii & 15 iunii & \phz6 & 25 & \phz3 dec. & c \\
\midrule
2029 & 10 maii & 20 maii & 31 maii & \phz7 & 27 & \phz2 dec. & p \\
2030 & 30 maii & \phz9 iunii & 20 iunii & \phz8 & 24 & \phz1 dec. & F \\
2031 & 22 maii & \phz1 iunii & 12 iunii & \phz9 & 25 & 30 nov. & f \\
2032 & \phz6 maii & 16 maii & 27 maii & 10 & 27 & 28 nov. & s \\
2033 & 26 maii & \phz5 iunii & 16 iunii & 11 & 24 & 27 nov. & N \\
\midrule 
2034 & 18 maii & 28 maii & \phz8 iunii & 12 & 26 & \phz3 dec. & k \\
2035 & \phz3 maii & 13 maii & 24 maii & 13 & 28 & \phz2 dec. & B \\
2036 & 22 maii & \phz1 iunii & 12 iunii & 14 & 25 & 30 nov. & b \\
2037 & 14 maii & 24 maii & \phz4 iunii & 15 & 26 & 29 nov. & n \\
2038 & \phz3 iunii & 13 iunii & 24 iunii & \phz1 & 23 & 28 nov. & E \\
\midrule
2039 & 19 maii & 29 maii & \phz9 iunii & \phz2 & 25 & 27 nov. & e \\
%
\bottomrule
\end{tabular}
}
\end{table}




\end{document}

答案1

我可能会避免旋转除红色标题之外的标题,或者旋转所有标题,但请求的形式如下

在此处输入图片描述

\documentclass[fontsize=9pt, twoside, final, openright]{book}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{scrextend}
\usepackage{moresize}
\usepackage{booktabs}                       
\usepackage{array}                          
\usepackage{makecell}                       
\usepackage[dvipsnames,table]{xcolor}     
\usepackage{ragged2e}   
\usepackage{graphicx}   
\usepackage[colorlinks=true, hyperindex=true]{hyperref} 

% COLOR DEFINITION
\definecolor{darkred}{HTML}{AE0000}             
\newcommand{\cdr}{\color{darkred}}

\newcommand{\phz}{\phantom{0}}



\begin{document}

\setcounter{page}{60}
\thispagestyle{empty}
\setlength{\tabcolsep}{3pt}     % Default value: 6pt




\begin{Center}
\large festorum mobilium
\end{Center}

\begin{table}[htp]
\centering
\scriptsize
\begin{tabular}{ccccccc>{\color{darkred}}c} \toprule \midrule
\makecell{Anno\\Dom.} &
\makecell{Ascen-\\sio} &
\makecell{Pente-\\costes} & 
\makecell{Corpus\\Christi} & 
\rotatebox[origin=c]{90}{Indict.} & 
\rotatebox[origin=c]{90}{\makecell{Dom.\ post \\ Pentec.}} & 
\makecell{Dom.\ I\\Adventus} &
\rotatebox[origin=c]{90}{Litt.\ Mart.}\\
%
\midrule
2024 & \phz9 maii & 19 maii & 30 maii & \phz2 & 27 & \phz1 dec. &  u \\
2025 & 29 maii & \phz8 iunii & 19 iunii & \phz3 & 24 & 30 nov. & P \\
2026 & 14 maii & 24 maii & \phz4 iunii & \phz4 & 26 & 29 nov. & l \\
2027 & \phz6 maii & 16 maii & 27 maii & \phz5 & 27 & 28 nov. & C \\
2028 & 25 maii & \phz4 iunii & 15 iunii & \phz6 & 25 & \phz3 dec. & c \\
\midrule
2029 & 10 maii & 20 maii & 31 maii & \phz7 & 27 & \phz2 dec. & p \\
2030 & 30 maii & \phz9 iunii & 20 iunii & \phz8 & 24 & \phz1 dec. & F \\
2031 & 22 maii & \phz1 iunii & 12 iunii & \phz9 & 25 & 30 nov. & f \\
2032 & \phz6 maii & 16 maii & 27 maii & 10 & 27 & 28 nov. & s \\
2033 & 26 maii & \phz5 iunii & 16 iunii & 11 & 24 & 27 nov. & N \\
\midrule 
2034 & 18 maii & 28 maii & \phz8 iunii & 12 & 26 & \phz3 dec. & k \\
2035 & \phz3 maii & 13 maii & 24 maii & 13 & 28 & \phz2 dec. & B \\
2036 & 22 maii & \phz1 iunii & 12 iunii & 14 & 25 & 30 nov. & b \\
2037 & 14 maii & 24 maii & \phz4 iunii & 15 & 26 & 29 nov. & n \\
2038 & \phz3 iunii & 13 iunii & 24 iunii & \phz1 & 23 & 28 nov. & E \\
\midrule
2039 & 19 maii & 29 maii & \phz9 iunii & \phz2 & 25 & 27 nov. & e \\
%
\bottomrule
\end{tabular}

\end{table}




\end{document}

相关内容