cline在多行中的问题,彩色表格

问题描述 投票:0回答:1

我在表格中使用\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}

the hidden clines show with blue circles

latex
1个回答
0
投票

colortblcline之间存在冲突。

The colortbl package*

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}

Displayed Latex image

© www.soinside.com 2019 - 2024. All rights reserved.