我目前正在尝试构建一个具有多列和多行的表格。我的代码如下:
\blindtext
\newcolumntype{L}{>{\centering\arraybackslash}m{.6cm}}
\begin{table}[ht]
\small
\begin{tabular}{|p{5cm}|L|L|L|L|L|L|L|L|L|L}
\hline
\multirow{3}{*}{Activities} & \multicolumn{10}{c|}{This is the title} \\ \cline{2-11}
& \multicolumn{2}{c|}{16/17} & \multicolumn{2}{c|}{17/18} & \multicolumn{2}{c|}{18/19} & \multicolumn{2}{c|}{19/20} & \multicolumn{2}{c|}{20/21} \\ \cline{2-11}
& \multicolumn{2}{c|}{\nth{2} S.} &\nth{1} S. & \nth{2} S. & \nth{1} S. & \nth{2} S. & \nth{1} S. & \nth{2} S. & \multicolumn{2}{c|}{\nth{1} S.} \\ \hline
1. First Text & \multicolumn{2}{c|}{\cellcolor{lightgray}} & \cellcolor{lightgray} & & & & & &\multicolumn{2}{c|}{} \\ \hline
\begin{tabular}{@{}}2. Second Text\\ 2.1 Text too big and should be wrapped\\ 2.2 Text too big and should be wrapped\\ 2.3 Text too big and should be wrapped\\ 2.4 Text too big and should be wrapped\\ \end{tabular} &\multicolumn{2}{c|}{} & & & \cellcolor{lightgray} & & & & \multicolumn{2}{c|}{} \\ \hline
\begin{tabular}{@{}}3 Third Text\\ 3.1 Third.1 Text \end{tabular} &\multicolumn{2}{c|}{} & & &\cellcolor{lightgray} &\cellcolor{lightgray} & & &\multicolumn{2}{c|}{} \\ \hline
\begin{tabular}{@{}}4 Fourth Text\\ 4.1 Fourth.1 Text that should be wrapped \end{tabular} &\multicolumn{2}{c|}{} & & & &\cellcolor{lightgray} &\cellcolor{lightgray} & &\multicolumn{2}{c|}{} \\ \hline
\begin{tabular}{@{}}5 Fifth Text\\ 5.1 Fifth.1 Text \end{tabular} &\multicolumn{2}{c|}{} & & & \cellcolor{lightgray} &\cellcolor{lightgray} & & &\multicolumn{2}{c|}{} \\ \hline
6. Another Text &\multicolumn{2}{c|}{} & & & & & &\cellcolor{lightgray} &\multicolumn{2}{c|}{} \\ \hline
7. Another Text &\multicolumn{2}{c|}{} & &\cellcolor{lightgray} &\cellcolor{lightgray} &\cellcolor{lightgray} &\cellcolor{lightgray} &\cellcolor{lightgray} &\multicolumn{2}{c|}{\cellcolor{lightgray}} \\ \hline
\begin{tabular}[c]{@{}l@{}}8 Another Text \\ 8.1 Another Text\\ 8.2 Another Text\\ 8.3 Another Text \end{tabular} &\multicolumn{2}{c|}{} & & & & & & &\multicolumn{2}{c|}{\cellcolor{lightgray}} \\ \hline
\end{tabular}
\caption{Activities Schedule}
\label{table:1}
\end{table}
现在我面临两个问题:
- 文本没有按预期换行。如果我为每个表格的第一列指定列宽,则会得到左填充,因为我删除了 @{}。
- 正如您从图片中看到的,每当我设置单元格颜色时,我都会丢失原始的边框颜色(这不是我的意图)。
有人可以帮助我吗,因为我是 Latex 的新手?
答案1
表格及其朋友
这是使用不同软件包的表格tabular
。灰色单元格背景后面消失的线条是查看器伪影。如果将缩放级别增加到 200%(或 300%),您通常会看到线条。如果这不是一个选项,您应该查看软件包卡路里它可以轻松处理带有背景颜色和线条的表格。
\documentclass{article}
\usepackage[left=3.1cm, right=3.1cm]{geometry} % narrow margins
\usepackage{multirow, array, caption}
\usepackage{graphicx}
\usepackage[table,xcdraw]{xcolor}
\renewcommand{\arraystretch}{1.2}
\setlength{\extrarowheight}{1pt}
\newcommand{\gray}{\cellcolor[HTML]{C0C0C0}}
\begin{document}
\begin{table}[!htb]
\caption{Activity Schedule}
\label{table-1}
\small % smaller text
\begin{tabular}{|l @{\hspace{0.7em}}>{\raggedright}p{3.5cm}|*{10}{l|}}
\hline
\multicolumn{2}{|l|}{} & \multicolumn{10}{c|}{This is the title} \\ \cline{3-12}
\multicolumn{2}{|c|}{Activities} & \multicolumn{2}{c|}{16/17} & \multicolumn{2}{c|}{17/18} & \multicolumn{2}{c|}{18/19} & \multicolumn{2}{c|}{19/20} & \multicolumn{2}{c|}{20/21} \\ \cline{3-12}
\multicolumn{2}{|l|}{} & 2\textsuperscript{nd} & \multicolumn{1}{c|}{S.} & \multicolumn{1}{c|}{1\textsuperscript{st} S.} & \multicolumn{1}{c|}{2\textsuperscript{nd} S.} & \multicolumn{1}{c|}{1\textsuperscript{st} S.} & \multicolumn{1}{c|}{2\textsuperscript{nd} S.} & \multicolumn{1}{c|}{1\textsuperscript{st} S.} & \multicolumn{1}{c|}{2\textsuperscript{nd} S.} & \multicolumn{1}{c|}{1\textsuperscript{st}} & \multicolumn{1}{c|}{S.} \\ \hline
1. & First text & \gray & \gray & \gray & & & & & & & \\ \hline
2. & Second text & & & & & \gray & & & & & \\ %\hline
2.1 & Text too big and should be wrapped & & & & & \gray & & & & & \\ %\hline
2.2 & Text too big and should be wrapped & & & & & \gray & & & & & \\ %\hline
2.3 & Text too big and should be wrapped & & & & & \gray & & & & & \\ %\hline
2.4 & Text too big and should be wrapped & & & & & \gray & & & & & \\ \hline
3. & Third text & & & & & \gray & \gray & & & & \\ %\hline
3.1 & Third 1. text & & & & & \gray & \gray & & & & \\ \hline
4. & Fourth text & & & & & & \gray & \gray & & & \\ %\hline
4.1 & Fourth 1. Text that should be wrapped & & & & & & \gray & \gray & & & \\ \hline
5. & Fifth text & & & & & \gray & \gray & & & & \\ %\hline
5.1 & Fifth 1. text & & & & & \gray & \gray & & & & \\ \hline
6. & Another text & & & & & & & & \gray & & \\ \hline
7. & Another text & & & & \gray & \gray & \gray & \gray & \gray & \gray & \gray \\ \hline
8. & Another text & & & & & & & & & \gray & \gray \\ %\hline
8.1 & Another text & & & & & & & & & \gray & \gray \\ %\hline
8.2 & Another text & & & & & & & & & \gray & \gray \\ %\hline
8.3 & Another text & & & & & & & & & \gray & \gray \\ \hline
\end{tabular}
\end{table}
\end{document}
卡路里
以下是使用该包构建的相同表格卡路里:
\documentclass[DIV=10]{scrartcl}
\usepackage{cals, xcolor, caption, ragged2e}
\usepackage[british]{babel}
\let\nc=\nullcell % Shortcuts
\let\sc=\spancontent
\begin{document}
\begin{table}[!htb]
\RaggedRight
\caption{Activity Schedule}\medskip
\label{table-1}
\begin{calstable}
% Defining column relativ to each other and relativ to the margins
\colwidths{{\dimexpr(\columnwidth)/128*6\relax}
{\dimexpr(\columnwidth)/128*32\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
}
% The tabular fills the text area if sum of all columns is 128
% Set up the tabular
\makeatletter
\def\cals@framers@width{0.4pt} % Outside frame rules, reduce if the rule is too heavy
\def\cals@framecs@width{0.4pt}
\def\cals@bodyrs@width{0.4pt}
\cals@setpadding{Ag}
\cals@setcellprevdepth{Al}
\def\cals@cs@width{0.4pt} % Inside rules, reduce if the rule is too heavy
\def\cals@rs@width{0.4pt}
\def\cals@bgcolor{}
\setlength{\cals@paddingL}{3pt}
\setlength{\cals@paddingR}{3pt}
\def\gray{\ifx\cals@bgcolor\empty
\def\cals@bgcolor{lightgray}
\else\def\cals@bgcolor{} \fi}
\def\tb{\ifx\cals@borderT\relax % Top border switch (off-on)
\def\cals@borderT{0pt}
\else\let\cals@borderT\relax\fi}
\def\bb{\ifx\cals@borderB\relax % Botton border switch (off-on)
\def\cals@borderB{0pt}
\else\let\cals@borderB\relax\fi}
\def\rb{\ifx\cals@borderR\relax % Right border switch (off-on)
\def\cals@borderR{0pt}
\else\let\cals@borderR\relax\fi}
\def\lb{\ifx\cals@borderL\relax % Left border switch (off-on)
\def\cals@borderL{0pt}
\else\let\cals@borderL\relax\fi}
\def\rp{\ifx\cals@paddingR\empty % Right padding switch (off-on)
\cals@setpadding{Ag}
\else\setlength{\cals@paddingR}{0pt}\fi}
% R1
\thead{\bfseries
\brow
\nc{lt}
\nc{rt}
\nc{ltb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{rtb}\alignC\sc{This is the title}
\erow
\brow
\nc{l}
\nc{r}
\nc{ltb}
\nc{rtb}\alignC\sc{16/17}
\nc{ltb}
\nc{rtb}\alignC\sc{17/18}
\nc{ltb}
\nc{rtb}\alignC\sc{18/19}
\nc{ltb}
\nc{rtb}\alignC\sc{19/20}
\nc{ltb}
\nc{rtb}\alignC\sc{20/21}
\erow
\mdseries
\brow
\nc{lb}
\nc{rb}\alignC\sc{\vfil \bfseries Activities}
\scriptsize\cell{\vfill 2\textsuperscript{nd}}
\cell{\vfill S.}
\cell{\vfill 1\textsuperscript{st} S.}
\cell{\vfill 2\textsuperscript{nd} S.}
\cell{\vfill 1\textsuperscript{st} S.}
\cell{\vfill 2\textsuperscript{nd} S.}
\cell{\vfill 1\textsuperscript{st} S.}
\cell{\vfill 2\textsuperscript{nd} S.}
\cell{\vfill 1\textsuperscript{st}}
\cell{\vfill S.}\normalsize
\erow
}
% R2 Body
\brow
\rb\alignL\cell{1.}\rb
\alignL\cell{First text}
\gray\cell{}
\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R3 Body
\brow
\bb\rb\alignL\cell{2.}\rb
\alignL\cell{Second text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R4 Body
\brow
\rb\alignL\cell{2.1}\rb
\alignL\cell{Text ist too long and should be wrapped}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R5 Body
\brow
\rb\alignL\cell{2.2}\rb
\alignL\cell{Text ist too long and should be wrapped}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R6 Body
\brow
\rb\alignL\cell{2.3}\rb
\alignL\cell{Text ist too long and should be wrapped}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}\bb
\erow
% R7 Body
\brow
\rb\alignL\cell{2.4}\rb
\alignL\cell{Text ist too long and should be wrapped}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R8 Body
\brow
\bb\rb\alignL\cell{3.}\rb
\alignL\cell{Third text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}\bb
\erow
% R9 Body
\brow
\rb\alignL\cell{3.1}\rb
\alignL\cell{Third 1. text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R10 Body
\brow
\bb\rb\alignL\cell{4.}\rb
\alignL\cell{Forth text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}\bb
\erow
% R11 Body
\brow
\rb\alignL\cell{4.1}\rb
\alignL\cell{Fourth 1. text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\erow
% R12 Body
\brow
\bb\rb\alignL\cell{5.}\rb
\alignL\cell{Fifth text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}\bb
\erow
% R13 Body
\brow
\rb\alignL\cell{5.1}\rb
\alignL\cell{Fifth 1. text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R14 Body
\brow
\rb\alignL\cell{6.}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\erow
% R15 Body
\brow
\rb\alignL\cell{7.}\rb
\alignL\cell{Another text}
\cell{}
\gray\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}\gray
\erow
% R16 Body
\brow
\bb\rb\alignL\cell{8.}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\erow
% R17 Body
\brow
\rb\alignL\cell{8.1}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\erow
% R18 Body
\brow
\rb\alignL\cell{8.2}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\erow
% R19 Body
\brow
\bb\rb\alignL\cell{8.3}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\erow
\makeatletter
\end{calstable}\par % \par to align the tabular
\end{table}
\end{document}
易碎卡路里
这是calstable
将在页面底部中断的。您可以填写继续消息,但在我的系统上,它显示在第二页的表格下。也许最好避免出现该消息,请参阅 的定义\tfoot{}
:
\documentclass[DIV=10]{scrartcl}
\usepackage{cals, xcolor, caption, ragged2e, lipsum}
\usepackage[british]{babel}
\let\nc=\nullcell % Shortcuts
\let\sc=\spancontent
\begin{document}
\section{First section}
\lipsum[1-2]
%\begin{table}[!htb]
{\RaggedRight
\captionaboveof{table}{Activity Schedule}\medskip
\label{table-1}
\begin{calstable}
% Defining column relativ to each other and relativ to the margins
\colwidths{{\dimexpr(\columnwidth)/128*6\relax}
{\dimexpr(\columnwidth)/128*32\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
{\dimexpr(\columnwidth)/128*9\relax}
}
% The tabular fills the text area if sum of all columns is 128
% Set up the tabular
\makeatletter
\def\cals@framers@width{0.4pt} % Outside frame rules, reduce if the rule is too heavy
\def\cals@framecs@width{0.4pt}
\def\cals@bodyrs@width{0.4pt}
\cals@setpadding{Ag}
\cals@setcellprevdepth{Al}
\def\cals@cs@width{0.4pt} % Inside rules, reduce if the rule is too heavy
\def\cals@rs@width{0.4pt}
\def\cals@bgcolor{}
\setlength{\cals@paddingL}{3pt}
\setlength{\cals@paddingR}{3pt}
\def\gray{\ifx\cals@bgcolor\empty
\def\cals@bgcolor{lightgray}
\else\def\cals@bgcolor{} \fi}
\def\tb{\ifx\cals@borderT\relax % Top border switch (off-on)
\def\cals@borderT{0pt}
\else\let\cals@borderT\relax\fi}
\def\bb{\ifx\cals@borderB\relax % Botton border switch (off-on)
\def\cals@borderB{0pt}
\else\let\cals@borderB\relax\fi}
\def\rb{\ifx\cals@borderR\relax % Right border switch (off-on)
\def\cals@borderR{0pt}
\else\let\cals@borderR\relax\fi}
\def\lb{\ifx\cals@borderL\relax % Left border switch (off-on)
\def\cals@borderL{0pt}
\else\let\cals@borderL\relax\fi}
\def\rp{\ifx\cals@paddingR\empty % Right padding switch (off-on)
\cals@setpadding{Ag}
\else\setlength{\cals@paddingR}{0pt}\fi}
% R1
\thead{\bfseries
\brow
\nc{lt}
\nc{rt}
\nc{ltb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{rtb}\alignC\sc{This is the title}
\erow
\brow
\nc{l}
\nc{r}
\nc{ltb}
\nc{rtb}\alignC\sc{16/17}
\nc{ltb}
\nc{rtb}\alignC\sc{17/18}
\nc{ltb}
\nc{rtb}\alignC\sc{18/19}
\nc{ltb}
\nc{rtb}\alignC\sc{19/20}
\nc{ltb}
\nc{rtb}\alignC\sc{20/21}
\erow
\mdseries
\brow
\nc{lb}
\nc{rb}\alignC\sc{\vfil \bfseries Activities}
\scriptsize\cell{\vfill 2\textsuperscript{nd}}
\cell{\vfill S.}
\cell{\vfill 1\textsuperscript{st} S.}
\cell{\vfill 2\textsuperscript{nd} S.}
\cell{\vfill 1\textsuperscript{st} S.}
\cell{\vfill 2\textsuperscript{nd} S.}
\cell{\vfill 1\textsuperscript{st} S.}
\cell{\vfill 2\textsuperscript{nd} S.}
\cell{\vfill 1\textsuperscript{st}}
\cell{\vfill S.}\normalsize
\erow
}
\tfoot{%
\lastrule%\nointerlineskip%
\textit{\strut Activity Schedule continues on next page% You may delete this line
}%
\par%
}
% R2 Body
\brow
\rb\alignL\cell{1.}\rb
\alignL\cell{First text}
\gray\cell{}
\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R3 Body
\brow
\bb\rb\alignL\cell{2.}\rb
\alignL\cell{Second text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R4 Body
\brow
\rb\alignL\cell{2.1}\rb
\alignL\cell{Text ist too long and should be wrapped}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R5 Body
\brow
\rb\alignL\cell{2.2}\rb
\alignL\cell{Text ist too long and should be wrapped}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R6 Body
\brow
\rb\alignL\cell{2.3}\rb
\alignL\cell{Text ist too long and should be wrapped}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}\bb
\erow
% R7 Body
\brow
\rb\alignL\cell{2.4}\rb
\alignL\cell{Text ist too long and should be wrapped}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R8 Body
\brow
\bb\rb\alignL\cell{3.}\rb
\alignL\cell{Third text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}\bb
\erow
% R9 Body
\brow
\rb\alignL\cell{3.1}\rb
\alignL\cell{Third 1. text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R10 Body
\brow
\bb\rb\alignL\cell{4.}\rb
\alignL\cell{Forth text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}\bb
\erow
% R11 Body
\brow
\rb\alignL\cell{4.1}\rb
\alignL\cell{Fourth 1. text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\erow
% R12 Body
\brow
\bb\rb\alignL\cell{5.}\rb
\alignL\cell{Fifth text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}\bb
\erow
% R13 Body
\brow
\rb\alignL\cell{5.1}\rb
\alignL\cell{Fifth 1. text}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R14 Body
\brow
\rb\alignL\cell{6.}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}\gray
\cell{}
\cell{}
\erow
% R15 Body
\brow
\rb\alignL\cell{7.}\rb
\alignL\cell{Another text}
\cell{}
\gray\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}\gray
\erow
% R16 Body
\brow
\bb\rb\alignL\cell{8.}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\erow
% R17 Body
\brow
\rb\alignL\cell{8.1}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\erow
% R18 Body
\brow
\rb\alignL\cell{8.2}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\erow
% R19 Body
\brow
\bb\rb\alignL\cell{8.3}\rb
\alignL\cell{Another text}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\gray\cell{}
\cell{}\gray
\erow
\makeatletter
\end{calstable}\par % \par to align the tabular
}%\end{table}
\end{document}