答案1
以下是calstable
您可以继续处理的三个 s。查看列的定义,这些列分布在整个文本宽度上。接下来检查跨度。跨度需要覆盖至少两个单元格,字母表示单元格在跨度中的哪个位置 - t(顶部)b(底部)l(左侧)和 r(右侧)。因此,带有字母的跨度中的单元格ltb
是水平跨度(一行跨度)中跨度的开始单元格。此类跨度中的最后一个单元格是\nc{rtb}
(研究这个文件):
示例 2:
- 我在示例 1 中的最后一列右侧添加了六个新列。计算列宽的除数必须从 74 增加到 78,并且列宽需要进行微调才能覆盖所有新列。
- 我“删除”了 2015 年(第 1 学期)的一列,只需删除跨度
- 第 1 行的跨度从 6 个单元格增加到 12 个单元格
- 2017 年、2018 年、2019 年和 2020 年的第 2 行添加了跨越
- 复制 2016 至 217、2018、2019 和 2020 年的学期
- 清理了最后一行增加的跨度,将关闭规则(边框)的命令修剪到最后一列
示例 1
\documentclass[DIV=13, landscape]{scrartcl}
\usepackage{cals, ragged2e, lmodern}
\usepackage{pdflscape}
\usepackage[sgvnames]{xcolor}
\let\nc=\nullcell % Shorthands
\let\sc=\spancontent
\begin{document}
%\begin{landscape}
\RaggedRight
\captionaboveof{table}{Activity Schedule}\medskip
\label{table-1}
\begin{calstable}[c]
% Defining column relative to each other and relative to the margins
\colwidths{{\dimexpr(\columnwidth)/72*3\relax}
{\dimexpr(\columnwidth)/72*33\relax}
{\dimexpr(\columnwidth)/36*3\relax}
{\dimexpr(\columnwidth)/36*3\relax}
{\dimexpr(\columnwidth)/36*3\relax}
{\dimexpr(\columnwidth)/36*3\relax}
{\dimexpr(\columnwidth)/36*3\relax}
{\dimexpr(\columnwidth)/36*3\relax}
}
% The tabular fills the text area if sum of all columns is 72
% 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}
\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\cals@AtBeginCell{\vfil}
\def\cred{\ifx\cals@bgcolor\empty
\def\cals@bgcolor{red!70}
\else\def\cals@bgcolor{} \fi}
\def\cblue{\ifx\cals@bgcolor\empty
\def\cals@bgcolor{blue!75}
\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 % Bottom 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}
% R1
\thead{\bfseries
\brow
\nc{lt}
\nc{rt}
\nc{ltb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{tb}
\nc{rtb}\alignC\sc{TRIMESTRES}
\erow
\brow
\nc{lb}
\nc{rb}\sc{}
\nc{ltb}
\nc{rtb}\sc{2015}
\nc{ltb}
\nc{rtb}\sc{2016}
\nc{ltb}
\nc{rtb}\sc{2017}
\erow
% R3 Head
\brow
\nc{ltb}
\nc{rtb}\sc{Ativadades}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\cell{3\textsuperscript{o}}
\cell{4\textsuperscript{o}}
\cell{5\textsuperscript{o}}
\cell{6\textsuperscript{o}}
\erow
} % Heading end
\mdseries
%\tfoot{%
% \lastrule\nointerlineskip%
% \textit{\strut Activity Schedule continues on next page%
% }%
% \par%
% }
% R4 Body
\brow
\cell{\bfseries 1}
\alignL\cell{\vfil Pesquisa Bibliográfica}
\cblue\cell{}
\cell{}
\cell{}\cblue
\cred\cell{}
\cell{}
\cell{}\cred
\erow
% R4 Body
\brow
\brow
\alignC\cell{\bfseries 2}
\alignL\cell{}
\cblue\cell{}
\cell{}
\cell{}\cblue
\cred\cell{}
\cell{}
\cell{}\cred
\erow
% R5 Body
\brow
\alignC\cell{\bfseries 3}
\alignL\cell{}
\cblue\cell{}
\cell{}
\cell{}\cblue
\cred\cell{}
\cell{}\cred
\cell{}
\erow
% R6 Body
\brow
\alignC\cell{\bfseries 4}
\alignL\cell{}
\cblue\cell{}
\cell{}
\cell{}\cblue
\cred\cell{}
\cell{}\cred
\cell{}
\erow
% R7 Body
\brow
\alignC\cell{\bfseries 5}
\alignL\cell{}
\cblue\cell{}
\cell{}
\cell{}\cblue
\cred\cell{}\cred
\cell{}
\cell{}
\erow
% R8 Body
\brow
\alignC\cell{\bfseries 6}
\alignL\cell{}
\cblue\cell{}
\cell{}
\cell{}\cblue
\cred\cell{}
\cell{}\cred
\cell{}
\erow
% R9 Body
\brow
\alignC\cell{\bfseries 7}
\alignL\cell{}
\cblue\cell{}
\cell{}
\cell{}\cblue
\cred\cell{}
\cell{}\cred
\cell{}
\erow
% R10 Body
\brow
\alignC\cell{\bfseries 8}
\alignL\cell{}
\cell{}
\cell{}
\cblue\cell{}\cblue
\cred\cell{}\cred
\cell{}
\cell{}
\erow
% R11 Body
\brow
\alignC\cell{\bfseries 9}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}
\cell{}\cred
\cell{}
\erow
% R12 Body
\brow
\alignC\cell{\bfseries 10}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}
\cell{}\cred
\cell{}
\erow
% R14 Body
\brow
\alignC\cell{\bfseries 11}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}
\cell{}\cred
\erow
% R15 Body
\brow
\alignC\cell{\bfseries 12}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}
\cell{}\cred
\erow
% R16 Body
\brow
\alignC\cell{\bfseries 13}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}
\cell{}\cred
\erow
% R17 Body
\brow
\alignC\cell{\bfseries 14}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}
\cell{}\cred
\erow
% R18 Body 15
\brow
\alignC\cell{\bfseries 15}
\alignL\cell{Producão de dios artigos cientifigos na base lSl}
\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}
\cell{}\cred\bb\lb\rb
\erow
% R19 Footer
\brow
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R20 Footer
\brow
\cell{}
\cell{}
\cblue\cell{}\cblue
\nc{ltb}
\nc{rtb}\alignL\sc{\footnotesize atividades realizadas}
\cred\cell{}\cred
\nc{ltb}
\nc{rtb}\alignL\sc{\footnotesize atividades previstas}\bb\lb\rb
\erow
\makeatletter
\end{calstable}\par % \par to align the tabular
%\end{landscape}
\end{document}
示例 2
\documentclass[DIV=13, landscape]{scrartcl}
\usepackage{cals, ragged2e, lmodern}
\usepackage{pdflscape}
\usepackage[sgvnames]{xcolor}
\let\nc=\nullcell % Shortcuts
\let\sc=\spancontent
\begin{document}
%\begin{landscape}
\RaggedRight\small
\captionaboveof{table}{Activity Schedule}\medskip
\label{table-1}
\begin{calstable}[c]
% Defining column relative to each other and relative to the margins
\colwidths{{\dimexpr(\columnwidth)/78*3\relax}
{\dimexpr(\columnwidth)/78*27\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
}
% The tabular fills the text area if sum of all columns is 78
% 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}
\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\cals@AtBeginCell{\vfil}
\def\cred{\ifx\cals@bgcolor\empty
\def\cals@bgcolor{red!70}
\else\def\cals@bgcolor{} \fi}
\def\cblue{\ifx\cals@bgcolor\empty
\def\cals@bgcolor{blue!75}
\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 % Bottom 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}
% 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{tb}
\nc{tb}
\nc{rtb}\alignC\sc{TRIMESTRES}
\erow
\brow
\nc{lb}
\nc{rb}\sc{}
\alignC\cell{2015}
\nc{ltb}
\nc{tb}
\nc{rtb}\sc{2016}
\nc{ltb}
\nc{tb}
\nc{rtb}\sc{2017}
\nc{ltb}
\nc{tb}
\nc{rtb}\sc{2018}
\nc{ltb}
\nc{rtb}\sc{2019}
\erow
% R3 Head
\brow
\nc{ltb}
\nc{rtb}\sc{Ativadades}
\cell{3\textsuperscript{o}}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\cell{3\textsuperscript{o}}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\cell{3\textsuperscript{o}}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\cell{3\textsuperscript{o}}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\erow
} % Heading end
\mdseries
%\tfoot{%
% \lastrule\nointerlineskip%
% \textit{\strut Activity Schedule continues on next page%
% }%
% \par%
% }
% R4 Body
\brow
\cell{\bfseries 1}
\alignL\cell{\vfil Pesquisa Bibliográfica}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R4 Body
\brow
\brow
\alignC\cell{\bfseries 2}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R5 Body
\brow
\alignC\cell{\bfseries 3}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R6 Body
\brow
\alignC\cell{\bfseries 4}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R7 Body
\brow
\alignC\cell{\bfseries 5}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R8 Body
\brow
\alignC\cell{\bfseries 6}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R9 Body
\brow
\alignC\cell{\bfseries 7}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R10 Body
\brow
\alignC\cell{\bfseries 8}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R11 Body
\brow
\alignC\cell{\bfseries 9}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R12 Body
\brow
\alignC\cell{\bfseries 10}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R14 Body
\brow
\alignC\cell{\bfseries 11}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R15 Body
\brow
\alignC\cell{\bfseries 12}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R16 Body
\brow
\alignC\cell{\bfseries 13}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R17 Body
\brow
\alignC\cell{\bfseries 14}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R18 Body 15
\brow
\alignC\cell{\bfseries 15}
\alignL\cell{Producão de dios artigos cientifigos na base lSl}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}\bb\lb\rb
\erow
% R19 Footer
\brow
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R20 Footer
\brow
\cell{}
\cell{}
\cblue\cell{}\cblue
\nc{ltb}
\nc{tb}
\nc{rtb}\alignL\sc{\footnotesize atividades realizadas}
\cell{}
\cred\cell{}\cred
\nc{ltb}
\nc{tb}
\nc{rtb}\alignL\sc{\footnotesize atividades previstas}
\cell{}
\cell{}
\cell{}\bb\lb\rb
\erow
\makeatletter
\end{calstable}\par % \par to align the tabular
%\end{landscape}
\end{document}
示例 3
\documentclass[DIV=13, landscape]{scrartcl}
\usepackage{cals, ragged2e, lmodern}
\usepackage{pdflscape}
\usepackage[sgvnames]{xcolor}
\let\nc=\nullcell % Shortcuts
\let\sc=\spancontent
\begin{document}
%\begin{landscape}
\RaggedRight\small
\captionaboveof{table}{Activity Schedule}\medskip
\label{table-1}
\begin{calstable}[c]
% Defining column relative to each other and relative to the margins
\colwidths{{\dimexpr(\columnwidth)/78*3\relax}
{\dimexpr(\columnwidth)/78*27\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
{\dimexpr(\columnwidth)/78*4\relax}
}
% The tabular fills the text area if sum of all columns is 78
% 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}
\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\cals@AtBeginCell{\vfil}
\def\cred{\ifx\cals@bgcolor\empty
\def\cals@bgcolor{red!70}
\else\def\cals@bgcolor{} \fi}
\def\cblue{\ifx\cals@bgcolor\empty
\def\cals@bgcolor{blue!75}
\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 % Bottom 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}
% 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{tb}
\nc{tb}
\nc{rtb}\alignC\sc{TRIMESTRES}
\erow
\brow
\nc{lb}
\nc{rb}\sc{}
\alignC\cell{2016}
\nc{ltb}
\nc{tb}
\nc{rtb}\sc{2017}
\nc{ltb}
\nc{tb}
\nc{rtb}\sc{2018}
\nc{ltb}
\nc{tb}
\nc{rtb}\sc{2019}
\nc{ltb}
\nc{rtb}\sc{2020}
\erow
% R3 Head
\brow
\nc{ltb}
\nc{rtb}\sc{Ativadades}
\cell{3\textsuperscript{o}}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\cell{3\textsuperscript{o}}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\cell{3\textsuperscript{o}}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\cell{3\textsuperscript{o}}
\cell{1\textsuperscript{o}}
\cell{2\textsuperscript{o}}
\erow
} % Heading end
\mdseries
%\tfoot{%
% \lastrule\nointerlineskip%
% \textit{\strut Activity Schedule continues on next page%
% }%
% \par%
% }
% R4 Body
\brow
\cell{\bfseries 1}
\alignL\cell{\vfil Disiplinas}
\cblue\cell{}\cblue
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R4 Body
\brow
\brow
\alignC\cell{\bfseries 2}
\alignL\cell{}
\cell{}
\cblue\cell{}\cblue
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R5 Body
\brow
\alignC\cell{\bfseries 3}
\alignL\cell{}
\cell{}
\cell{}
\cblue\cell{}
\cell{}\cblue
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R6 Body
\brow
\alignC\cell{\bfseries 4}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cblue\cell{}
\cell{}
\cell{}\cblue
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R7 Body
\brow
\alignC\cell{\bfseries 5}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cblue\cell{}\cblue
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R8 Body
\brow
\alignC\cell{\bfseries 6}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cblue\cell{}
\cell{}\cblue
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R9 Body
\brow
\alignC\cell{\bfseries 7}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cblue\cell{}
\cell{}\cblue
\cell{}
\cell{}
\cell{}
\erow
% R10 Body
\brow
\alignC\cell{\bfseries 8}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cblue\cell{}\cblue
\cell{}
\cell{}
\cell{}
\erow
% R11 Body
\brow
\alignC\cell{\bfseries 9}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}\cred
\cell{}
\cell{}
\erow
% R12 Body
\brow
\alignC\cell{\bfseries 10}
\alignL\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}
\cell{}\cred
\cell{}
\erow
% R18 Body 15
\brow
\alignC\cell{\bfseries 11}
\alignL\cell{Versão Final da Tese e sua Apresentcão}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cred\cell{}\cred\bb\lb\rb
\erow
% R19 Footer
\brow
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\cell{}
\erow
% R20 Footer
\brow
\cell{}
\cell{}
\cblue\cell{}\cblue
\nc{ltb}
\nc{tb}
\nc{rtb}\alignL\sc{\footnotesize Atividades Realizadas}
\cell{}
\cred\cell{}\cred
\nc{ltb}
\nc{tb}
\nc{rtb}\alignL\sc{\footnotesize Atividades Previstas}
\cell{}
\cell{}
\cell{}\bb\lb\rb
\erow
\makeatletter
\end{calstable}\par % \par to align the tabular
%\end{landscape}
\end{document}
答案2
因为你正在努力,所以calstable
我也用以下方式排版了你的活动计划表格型。但是,正如您所看到的,如果您在 PDF 查看器中查看表格,则通过彩色单元格的规则并不令人满意。规则部分消失,因为它们被单元格颜色覆盖。在打印输出中,它们可能会正常显示。
通过使用线,请参阅 hhline-manual 和这个答案。
以下是 MWE:
\documentclass[DIV=13, landscape]{scrartcl}
\usepackage{tabularx, ragged2e, lmodern, bigstrut}
\usepackage{pdflscape}
\usepackage[sgvnames, table]{xcolor}
\setlength{\extrarowheight}{2pt}
\newcommand{\blue}{\cellcolor{blue!75}}
\newcommand{\red}{\cellcolor{red!75}}
\begin{document}
\RaggedRight\small
\captionaboveof{table}{Activity Schedule}\medskip
\label{table-1}
\noindent\begin{tabularx}{\linewidth}{|>{\bfseries}l|l|*{11}{>{\centering\arraybackslash}X|}>{\centering\arraybackslash}X<{\bigstrut}|}
\hline
\multicolumn{2}{|l|}{}&\multicolumn{12}{c|}{\bfseries TRIMESTRES\bigstrut}\\
\cline{3-14}
\multicolumn{2}{|l|}{}&\bfseries 2016&\multicolumn{3}{c|}{\bfseries 2017}&\multicolumn{3}{c|}{\bfseries 2018}&\multicolumn{3}{c|}{\bfseries 2019}&\multicolumn{2}{c|}{\bfseries 2020\bigstrut}\\
\hline
\multicolumn{2}{|c|}{\bfseries Ativadades}&\bfseries1\textsuperscript{o}&\bfseries1\textsuperscript{o}&\bfseries2\textsuperscript{o}&\bfseries3\textsuperscript{o}&\bfseries1\textsuperscript{o}&\bfseries2\textsuperscript{o}&\bfseries3\textsuperscript{o}&\bfseries1\textsuperscript{o}&\bfseries2\textsuperscript{o}&\bfseries3\textsuperscript{o}&\bfseries1\textsuperscript{o}&\bfseries2\textsuperscript{o}\\
\hline
1&Disiplinas&\blue&&&&&&&&&&&\\
\hline
2&&&\blue&&&&&&&&&&\\
\hline
3&&&&\blue&\blue&&&&&&&&\\
\hline
4&&&&&\blue&\blue&\blue&&&&&&\\
\hline
5&&&&&&\blue&&&&&&&\\
\hline
6&&&&&&&\blue&\blue&&&&&\\
\hline
7&&&&&&&&&\blue&\blue&&&\\
\hline
8&&&&&&&&&&\blue&&&\\
\hline
9&&&&&&&&&&&\red&&\\
\hline
10&&&&&&&&&&&\red&\red&\\
\hline
11&Versão Final da Tese e sua Apresentcão&&&&&&&&&&&&\red\\
\hline
\multicolumn{14}{l}{}\\[-1.5ex]
\multicolumn{4}{l}{}&\multicolumn{1}{l}{\blue}&\multicolumn{3}{l}{\footnotesize Atividades Realizadas}&\multicolumn{1}{l}{\red}&\multicolumn{4}{l}{\footnotesize Atividades Previstas}\\
\end{tabularx}
\end{document}