我在表格中使用\cline
和\multirow
时遇到问题,但是当我过去在表中着色时clines
变得隐藏了。请帮助我修复它。
\documentclass{article}
\usepackage{multirow}
\usepackage{enumitem}
\usepackage{colortbl}
\usepackage{graphicx}
\newcommand{\key}{\rotatebox{90}}
\begin{document}
\begin{tabular}{!{\color{black}\vrule width 1.5pt} >{\columncolor[gray]{.95}}
p{0.2cm} | p{7.5cm}} \cline{1-1}
\multirow{5}{*}{\centering\key {AAAAAAAA}} & \vspace*{-0.2cm}\begin{itemize}[leftmargin=0.4cm]
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\end{itemize} \\ \cline{1-1}
\multirow{21}{*}{\key{BBBBBBB}} & \vspace*{-0.2cm}\begin{itemize}[leftmargin=0.4cm]
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\end{itemize} \\ \cline{1-1}
\multirow{6}{*}{\key{CCC}} & \vspace*{-0.2cm}\begin{itemize}[leftmargin=0.4cm]
\item Mendeley Data Repository is free-to-use and open access.
\end{itemize} \\ \cline{1-1}
\end{tabular}
\end{document}
colortbl
和cline
之间存在冲突。
10用\ cline减少乐趣
如果使用\ arrayrulecolor,则\ cline产生的行是有颜色的,但是您可能不会注意到,因为它们被下一行的任何颜色面板覆盖。这是\ cline的“功能”。如果使用此软件包,则最好在\ hhline参数中而不是\ cline中使用-规则类型。
我添加了hhline
程序包,并调整了一些值,并进行了一些格式化。 [请注意,在某些情况下,由hhline
产生的线似乎消失了,这是显示细线时出现的问题,请使用更高的放大倍数。]
\documentclass{article}
\usepackage{multirow}
\usepackage{enumitem}
\usepackage{colortbl}
\usepackage{graphicx}
\usepackage{hhline}
\newcommand{\key}{\rotatebox{90}}
\begin{document}
\begin{tabular}{!{\color{black}\vrule width 1.5pt}
>{\columncolor[gray]{.95}} p{0.2cm} | p{7.5cm}} \hhline{-}
\multirow{6}{*}{\key{AAAAAAAA}} &
\vspace*{-0.2cm}
\begin{itemize}[leftmargin=0.4cm]
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\end{itemize} \\ \hhline{-}
\multirow{14}{*}{\key{BBBBBBB}} &
\vspace*{-0.2cm}
\begin{itemize}[leftmargin=0.4cm]
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\item Mendeley Data Repository is free-to-use and open access.
\end{itemize} \\ \hhline{-}
\multirow{4}{*}{\key{CCC}} &
\vspace*{-0.2cm}
\begin{itemize}[leftmargin=0.4cm]
\item Mendeley Data Repository is free-to-use and open access.
\end{itemize} \\ \hhline{-}
\end{tabular}
\end{document}