如何删除 hlines 底部或顶部 tabularray?

如何删除 hlines 底部或顶部 tabularray?

如何删除底部的 hline?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{multirow}
\usepackage{xcolor}
\usepackage{tabularray}
\NewTblrEnviron{mytblr}

    \title{For Testing}
    \author{TEST }
    \date{August 2022}

\begin{document}
\begin{mytblr}{hlines, vlines,
                colspec = {X[0.5,c] X[0.3,c] X[0.7,c]},width = 4.3in,
                rowspec = {Q[gray9]},
                row{1}  = {font=\fontsize{6.5pt}{6.5pt}\fontfamily{phv}\bfseries, t},
                row{2-7}  = {font=\fontsize{6.5pt}{6.5pt}, l},
                stretch = 0,
                vspan   = even
                }
    TEST & TEST  & TEST\\
    TEST & 
    TEST
    TEST &
    \vspace{1mm}
    TESTapplications:\newline
    \vspace{1mm}
    \hspace{3mm}{-} TEST \newline
    \hspace{3mm}{-} TEST” \newline
    \begin{itemize}
        \item[--] TEST
    \end{itemize}
\end{mytblr}
\end{document}

答案1

  • 抱歉,但您的表格应该是什么样子并不完全清楚。
  • 我猜是这样的:

在此处输入图片描述

  • mytblr如果标准tblr工作正常,为什么还要定义新的表环境
  • 最后一列的代码有点奇怪(并且会导致编译错误)。为什么不对itemize所有以 结尾的行都使用\newline

通过使用\enumitem包,您可以轻松自定义最后一列中的列表,如下面 MWE 中所做的那样:

\documentclass{article}
\usepackage{xcolor}
\usepackage{tabularray}
\UseTblrLibrary{varwidth}
\usepackage{enumitem}

\title{For Testing}
\author{TEST }
\date{August 2022}

\begin{document}
\begin{tblr}{width = 4.3in,
             hline{1-Y} = {solid}, % <---
             vlines,
             colspec = {X[0.66,l] X[0.55,l] X[l]},
             row{1}  = {font=\scriptsize\sffamily\bfseries,
                        c, bg=gray!9},
            row{2-Z} = {font=\footnotesize},
             measure = vbox,            
             vspan   = even
            }
Authentication Method   
    & Client Tool   
        & Description   \\
One-Time Password Authentication 
    & TOTP Compliant Authentication Application 
        &
It is recommended to obtain and use the following applications:
    \begin{itemize} [label=--, leftmargin=*, itemsep=0pt]
\item   For Smartphone Users: “Google Authenticator” 
\item   For Personal Computer Users: “WinAuth” 
\item   List entries start with the command.
    \end{itemize}
\end{tblr}
\end{document}

相关内容