기사 문서 클래스에 들어오지만 비머에는 표시되지 않는 테이블의 수평선

기사 문서 클래스에 들어오지만 비머에는 표시되지 않는 테이블의 수평선

다음 표(hhline으로 인해 테이블에 추가로 나타나는 검은 선을 제거하는 방법)은 문서 클래스에서 잘 작동 article하지만 테이블의 수평선이 beamer클래스에서 표시되지 않습니다.

\documentclass{article}
 \usepackage{hhline}
  \usepackage[table, svgnames]{xcolor}

  \usepackage{multirow}
 \usepackage{booktabs}

 \definecolor{Aliceblue}{rgb}{0.94, 0.97, 1.0}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}

\definecolor{babyblue}{rgb}{0.54, 0.81, 0.94}

 \begin{document}

  \begin{table}[ht]
\centering
\setlength\arrayrulewidth{1.3pt}
\footnotesize\setlength{\tabcolsep}{2.7 pt}
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{|c|c|c|c|c|c|c|}
    \hline
    \cellcolor{aliceblue}  & \multicolumn{2}{c|}{\cellcolor{babyblue}ISE} & \multicolumn{2}{c|}{\cellcolor{babyblue}IAE} & \multicolumn{2}{c|}{\cellcolor{babyblue}ITAE} \\ 
    \hhline{|>{\arrayrulecolor{aliceblue}}->{\arrayrulecolor{black}}|-|-|-|-|-|-|} % <==========================================
    \multirow{-2}{*}{\cellcolor{aliceblue}Methods}
    & \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%     & \cellcolor{aliceblue}-20\%        & \cellcolor{aliceblue}+20\%      & \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%        \\ \hhline{-|*6-}
    \rowcolor{babyblue}ABC                                                           & 0.5645      & 0.63     & 1.8       & 1.8      & 6.1       & 6.6       \\ \hhline{-|*6-}
    \rowcolor{aliceblue}XYZ                                                            & 2.1       & 2.3      & 0.881       & 9.82      & 9.2       & 28.9       \\ \hhline{-|*6-}
    \rowcolor{babyblue}MNO                                                                & 0.68      & 0.97     & 1.62       & 1.61      & 8.9       & 8.2       \\ \hhline{-|*6-}
    \rowcolor{aliceblue} PQR                                                                 & 0.65       & 0.753     & 2.064       & 2.231      & 28.04       & 28.56       \\ \hhline{-|*6-}
\end{tabular}
\end{table}
\end{document} 

환경 에서도 수평선이 보이도록 하려면 어떻게 해야 합니까 beamer?

답변1

다음의 중복 가능성이것, 따라서 찬성 투표하지 마십시오:

전체 솔루션:

\documentclass[xcolor=table]{beamer}
 \usepackage{hhline}
\makeatletter
\let\zz\reset@color
\def\reset@color{\kern\z@\zz}
\makeatother

  \usepackage{multirow}
 \usepackage{booktabs}

 \definecolor{Aliceblue}{rgb}{0.94, 0.97, 1.0}
\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}

\definecolor{babyblue}{rgb}{0.54, 0.81, 0.94}

 \begin{document}
\begin{frame}
  \begin{table}[ht]
\centering
\setlength\arrayrulewidth{1.3pt}
\footnotesize\setlength{\tabcolsep}{2.7 pt}
\renewcommand{\arraystretch}{1.4}
\begin{tabular}{|c|c|c|c|c|c|c|}
    \hline
    \cellcolor{aliceblue}  & \multicolumn{2}{c|}{\cellcolor{babyblue}ISE} & \multicolumn{2}{c|}{\cellcolor{babyblue}IAE} & \multicolumn{2}{c|}{\cellcolor{babyblue}ITAE} \\ 
    \hhline{|>{\arrayrulecolor{aliceblue}}->{\arrayrulecolor{black}}|-|-|-|-|-|-|} % <==========================================
    \multirow{-2}{*}{\cellcolor{aliceblue}Methods}
    & \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%     & \cellcolor{aliceblue}-20\%        & \cellcolor{aliceblue}+20\%      & \cellcolor{aliceblue}-20\%       & \cellcolor{aliceblue}+20\%        \\ \hhline{-|*6-}
    \rowcolor{babyblue}ABC                                                           & 0.5645      & 0.63     & 1.8       & 1.8      & 6.1       & 6.6       \\ \hhline{-|*6-}
    \rowcolor{aliceblue}XYZ                                                            & 2.1       & 2.3      & 0.881       & 9.82      & 9.2       & 28.9       \\ \hhline{-|*6-}
    \rowcolor{babyblue}MNO                                                                & 0.68      & 0.97     & 1.62       & 1.61      & 8.9       & 8.2       \\ \hhline{-|*6-}
    \rowcolor{aliceblue} PQR                                                                 & 0.65       & 0.753     & 2.064       & 2.231      & 28.04       & 28.56       \\ \hhline{-|*6-}
\end{tabular}
\end{table}
\end{frame}
\end{document} 

여기에 이미지 설명을 입력하세요

답변2

{NiceTabular}of 를 사용하면 해당 테이블을 쉽게 만들 수 있습니다 nicematrix.

\documentclass[xcolor]{beamer}
\usepackage{nicematrix}


\definecolor{aliceblue}{rgb}{0.94, 0.97, 1.0}
\definecolor{babyblue}{rgb}{0.54, 0.81, 0.94}

\begin{document}
\begin{frame}
\begin{table}[ht]
\centering
\setlength{\arrayrulewidth}{1.3pt}
\footnotesize
\setlength{\tabcolsep}{2.7 pt}
\renewcommand{\arraystretch}{1.4}
\begin{NiceTabular}{ccccccc}[hvlines]
\CodeBefore
  \rowcolors{1}{babyblue}{aliceblue}
\Body
  \Block[fill=aliceblue]{2-1}{Methods} & \Block{1-2}{ISE} && \Block{1-2}{IAE} && \Block{1-2}{ITAE} \\ 
      &$-$20\%   & +20\%  & $-$20\%  & +20\% & $-$20\% & +20\%  \\
  ABC & 0.5645 & 0.63   & 1.8    & 1.8   & 6.1   & 6.6    \\ 
  XYZ & 2.1    & 2.3    & 0.881  & 9.82  & 9.2   & 28.9   \\ 
  MNO & 0.68   & 0.97   & 1.62   & 1.61  & 8.9   & 8.2    \\ 
  PQR & 0.65   & 0.753  & 2.064  & 2.231 & 28.04 & 28.56  \\ 
\end{NiceTabular}
\end{table}
\end{frame}
\end{document} 

여러 컴파일이 필요합니다( nicematrix내부적으로 PGF/Tikz 노드를 사용하기 때문에).

위 코드의 출력

관련 정보