我目前正在为我的报告构建一个评分方案表。
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{hhline}
\usepackage{afterpage}
\usepackage{caption}
\usepackage{lscape}
\usepackage[table,xcdraw]{xcolor}
\usepackage{multirow}
\usepackage{mathtools}
\begin{document}
\afterpage{
\begin{landscape}
\begin{center}
\textbf{MARKING RUBICS}
\end{center}
\begin{table}[!htb]
\centering
\scalebox{0.75}{
\begin{tabular}{|c|l|l|l|l|c|c|}
\hline
\cellcolor[HTML]{5DA6F1}\textbf{\begin{tabular}[c]{@{}c@{}}Component\\ Title\end{tabular}} &
\multicolumn{3}{c|}{\textbf{}} &
\multicolumn{1}{c|}{\cellcolor[HTML]{5DA6F1}\textbf{\begin{tabular}[c]{@{}c@{}}Total\\ (out of 70)\end{tabular}}} &
\multicolumn{2}{c|}{\textbf{}} \\ \hline
\rowcolor[HTML]{5DA6F1}
\cellcolor[HTML]{5DA6F1} &
\multicolumn{4}{c|}{\cellcolor[HTML]{5DA6F1}\textbf{Score(s)}} &
\cellcolor[HTML]{5DA6F1} &
\cellcolor[HTML]{5DA6F1} \\ \cline{1-5}\hhline{|>{\arrayrulecolor{white}}->{\arrayrulecolor{black}}|-|}
\rowcolor[HTML]{5DA6F1}
\multirow{-2}{*}{\cellcolor[HTML]{5DA6F1}\textbf{Criteria}} &
\multicolumn{1}{c|}{\cellcolor[HTML]{5DA6F1}\textbf{$4$}} &
\multicolumn{1}{c|}{\cellcolor[HTML]{5DA6F1}\textbf{$3$}} &
\multicolumn{1}{c|}{\cellcolor[HTML]{5DA6F1}\textbf{$2$}} &
\multicolumn{1}{c|}{\cellcolor[HTML]{5DA6F1}\textbf{$1$}} &
\multirow{-2}{*}{\cellcolor[HTML]{5DA6F1}\textbf{\begin{tabular}[c]{@{}c@{}}Weightage\\ ($w$)\end{tabular}}} &
\multirow{-2}{*}{\cellcolor[HTML]{5DA6F1}\textbf{\begin{tabular}[c]{@{}c@{}}Marks\\ ($s\times w$)\end{tabular}}} \\ \hline
\textbf{Game} &
\textbf{\begin{tabular}[c]{@{}l@{}}The game is\\fully functional.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}The game can be played \\ but with some oversights.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}The game cannot\\be played.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}An idea for a \\ game is presented.\end{tabular}} &
\textbf{$1.5$} &
\textbf{} \\ \hline
\textbf{Instructions} &
\textbf{\begin{tabular}[c]{@{}l@{}}Instructions are\\clear and easy to follow. \\ The game can be played \\ by others without \\ the help of the creator.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Instructions are somewhat \\ clear and easy to follow. \\ The game can be played by\\ others with minimal help \\ from the creator.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Instructions are unclear\\ and a verbal description \\ of the game is necessary.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Instructions are\\ incomplete.\end{tabular}} &
\textbf{$2.5$} &
\textbf{} \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}Probability\\ Analysis\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Analysis is complex and\\ presented accurately.\\The idea of fair game\\is clearly explained.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Analysis is somewhat\\ complex and presented\\ accurately. The idea of \\fair game is clearly\\explained.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Analysis is simple and\\ presented accurately.\\The idea of fair game\\is clearly explained.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Analysis is presented\\inaccurately or the\\idea of fair game is\\not explained clearly.\end{tabular}} &
\textbf{$10$} &
\textbf{} \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}\\Difficulties\\ and \\ Improvements\\[10pt]\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Difficulties and\\ improvements\\ are well described.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Difficulties and\\ improvements\\ are mentioned.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Difficulties or\\ improvements\\ are included.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}Both difficulties and\\ improvements are\\left out.\end{tabular}} &
\textbf{$1.5$} &
\textbf{} \\ \hline
\textbf{\begin{tabular}[c]{@{}c@{}}Neatness and\\ Organisation\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}The work is presented\\in a neat, clear, and\\ organised way that is\\easy to read.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}The work is presented\\in a neat and organised\\way that is usually\\ easy to read.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}The work is organised\\but may be hard to\\ read at times.\end{tabular}} &
\textbf{\begin{tabular}[c]{@{}l@{}}The work is sloppy\\and unorganised. It\\ is hard to know what\\information goes\\ together.\end{tabular}} &
\textbf{$1$} &
\textbf{} \\ \hline
\multicolumn{6}{|r|}{\textbf{\begin{tabular}[c]{@{}l@{}}TOTAL\\[5pt]\end{tabular}}} &
\textbf{} \\ \hline
\end{tabular}}
\end{table}
\end{landscape}}
\end{document}
如果放大“条件”区域,就会看到合并单元格中有一条线,而且间隙内的颜色没有填充。我该如何修复这个问题?
谢谢你的帮助。
答案1
我建议使用简化的代码,基于tabularx
和stackengine
用于普通单元格中的多行内容(避免所有那些嵌套的表格),将X
列类型重新定义为m
类型,因此其内容垂直居中,very cellspace
为单元格添加一些垂直填充,和hhline
。您提到的空白行可以用一个简单的技巧删除:我将彩色行稍微抬高一点\\[-0.5pt]
(略高于规则厚度)。最后,在X
带有较长文本的单元\small
格中,我使用字体大小代替命令adjustbox
,该命令应在表格中使用,因为它会产生不一致的字体大小。
\documentclass{report}
\usepackage[a4paper, margin=2cm]{geometry}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{enumitem}
\usepackage{graphicx}
\usepackage{hhline}
\usepackage{caption}
\usepackage{multirow}
\usepackage{tabularx}
\renewcommand{\tabularxcolumn}[1]{ >{\small}m{#1}}
\usepackage[column=O]{cellspace}
\addparagraphcolumntypes{X}
\setlength{\cellspacetoplimit}{4pt}
\setlength{\cellspacebottomlimit}{4pt}
\usepackage{ragged2e}
\usepackage{afterpage}
\usepackage{lscape}
\usepackage[table,xcdraw]{xcolor}
\usepackage[usestackEOL]{stackengine}
\definecolor{bgcolour}{HTML}{5DA6F1}
\begin{document}
\afterpage{
\begin{landscape}
\begin{center}
\textbf{MARKING RUBICS}
\end{center}
\begin{table}[!htb]
\centering \bfseries\boldmath
% \scalebox{0.75}{
\begin{tabularx}{\linewidth}{|>{\bfseries}Oc|*{4}{>{\RaggedRight\arraybackslash}O{X}|}Oc|Oc|}%
\hline
\cellcolor{bgcolour} \Centerstack{\\ Component\\ Title} &
\multicolumn{3}{c|}{} &
\cellcolor{bgcolour}\centering\Centerstack{Total\\ (out of 70)} &
\multicolumn{2}{c|}{} \\ \hline
\rowcolor{bgcolour} &
\multicolumn{4}{Oc|}{ Score(s) } & & \\[-0.5pt]%
\hhline{~|-|-|-|-|~~}
\rowcolor{bgcolour}
\multirow{-2}{*}{Criteria} & \centering 4 & \centering 3 & \centering 2 &\centering 1 &
\multirow{-2}{*}{\Centerstack{Weightage\\ ($w$)}} &
\multirow{-2}{*}{\Centerstack{Marks\\ ($s\times w$)}} \\ \hline
Game & The game is fully functional. & The game can be played but with some oversights. &
The game cannot be played. & An idea for a game is presented. & 1.5 & \\ \hline
Instructions &
Instructions are clear and easy to follow. \newline The game can be played by others without the help of the creator. &
Instructions are somewhat clear and easy to follow. \newline The game can be played by others with minimal help from the creator &
Instructions are unclear and a verbal description of the game is necessary. &
Instructions are incomplete. & 2.5 & \\ \hline
\Centerstack{Probability\\ Analysis} &
Analysis is complex and presented accurately. The idea of fair game is clearly explained. &
Analysis is somewhat complex and presented accurately. The idea of fair game is clearly explained. &
Analysis is simple and presented accurately. The idea of fair game is clearly explained. &
Analysis is presented inaccurately or the idea of fair game is not explained clearly. & 10 & \\ \hline
\Centerstack{Difficulties\\ and \\ Improvements} &
Difficulties and improvements are well described. & Difficulties and improvements are mentioned. &
Difficulties or improvements are included. & Both difficulties and improvements are left out. & 1.5 & \\ \hline
\Centerstack{Neatness\\ and\\ Organisation} &
The work is presented in a neat, clear, and organised way that is easy to read. &
The work is presented in a neat and organised way that is usually easy to read. &
The work is organised but may be hard to read at times. &
The work is sloppy and unorganised. It is hard to know what information goes together. & 1 & \\ \hline
\multicolumn{6}{|Or|}{TOTAL} & \\ \hline
\end{tabularx}%}
\end{table}
\end{landscape}}
\end{document}