在 longtable 中逐项列出 - 文本和列表不在同一级别

在 longtable 中逐项列出 - 文本和列表不在同一级别

早上好

我有一个问题。我有longtable一个itemize列表,请看下面。问题是它们不在同一水平,见下面的图片。列表比左侧的文本稍微低一些。

感谢帮助。

\documentclass[10pt,a6paper]{book}

\usepackage[utf8]{inputenc}
\usepackage[main=english,slovak]{babel}
\usepackage[cm]{fullpage}
\usepackage[a6paper, top=10mm, left=10mm, right=10mm,     bottom=10mm,foot=5mm,marginparsep=0mm,showframe]{geometry}
%showframe
\usepackage{tipa}
\usepackage{tabularx,booktabs}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{graphicx}
\usepackage{array}
\usepackage{color}
\usepackage[dvipsnames]{xcolor}
\usepackage{longtable}
\usepackage{lscape}


\begin{document}
\catcode`\-=12
\sloppy

    \begin{longtable}{llp{3cm}}
      \toprule
      {\sffamily some text}   & \textsl{some text}  & \begin{itemize}
                                                        \item[-] some text
                                                        \item[-] some text
                                                        \item[-] some text
                                                    \end{itemize}\\
      {\sffamily some text}   & \textsl{some text}  & some text\\
      \toprule  
    \end{longtable}

\end{document}

在此处输入图片描述

答案1

您可以添加负空间。

\documentclass[10pt,%a6paper%unused
]{book}

\usepackage[utf8]{inputenc}
\usepackage[main=english,slovak]{babel}
\usepackage[cm]{fullpage}
\usepackage[a6paper, top=10mm, left=10mm, right=10mm,     bottom=10mm,foot=5mm,marginparsep=0mm,showframe]{geometry}
%showframe
\usepackage{tipa}
\usepackage{tabularx,booktabs}
\usepackage{multirow}
\usepackage{rotating}
\usepackage{graphicx}
\usepackage{array}
\usepackage{xcolor}
\usepackage{longtable}
\usepackage{lscape}


\usepackage{enumitem}
\usepackage{mathtools}
\begin{document}

\begin{longtable}{llp{3cm}}
    \toprule
    {\sffamily some text}   & \textsl{some text}  \clap{\rule{8cm}{.4pt}}
    &\setlist{nosep,topsep=0sp,label=--}
    \vspace{-\baselineskip}
     \begin{itemize}
        \item some text
        \item some text
        \item some text
    \end{itemize}\\
    {\sffamily some text}   & \textsl{some text}  & some text\\
    \toprule  
\end{longtable}

\end{document}

相关内容