我为 Overleaf 创建了下表。但是,我想使用\tiny
或,\scriptsize
因为此表跨越多页。我还必须保持配色方案。我尝试过无数次,并向 ChatGPT 寻求帮助,但都没有奏效。有没有什么方法可以既不失去表格外观,又能缩小尺寸。
\begin{longtable}{
|c
|>{\columncolor{blue!10}}p{2cm}
|>{\columncolor{blue!10}}p{4cm}
|>{\columncolor{green!10}}p{2cm}
|>{\columncolor{green!10}}p{4cm}|
}
% Apply the caption and label outside of the tiny environment
\caption{Automation Challenges and Solution framework for containerized applications in multi-cloud environment}\label{tab:Automation-solutions} \\
\hline
\rowcolor{gray!50}
\textbf{ID} &
\textbf{Challenge} &
\textbf{Challenge Description} &
\textbf{Solution} &
\textbf{Solution Description} \\
\hline
\endfirsthead
% The content above will serve as the header for the first page.
% Content below will serve as the header for the continuation pages.
\multicolumn{5}{c}%
{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\hline
\rowcolor{gray!50}
\textbf{ID} &
\textbf{Challenge} &
\textbf{Challenge Description} &
\textbf{Solution} &
\textbf{Solution Description} \\
\hline
\endhead
% Footer for all pages except the last, if you want one.
\hline
\multicolumn{5}{|r|}{{Continued on next page}} \\
\hline
\endfoot
% Footer for the last page, if you want one.
\hline
\endlastfoot
% Now insert your table rows here, with the tiny size applied
\tiny % Apply the font size to the content starting from here
\rowcolor{gray!25} \multicolumn{5}{|c|}{\textbf{Category 1: Multi-Cloud Automation}} \\
\hline
% ... more rows of content ...
% End the tiny environment before the table ends
\normalsize % Switch back to normal size text if needed after the table
\end{longtable}