如何设置和对齐表格中的项目符号?

如何设置和对齐表格中的项目符号?

我有下表,该表的问题在于项目符号与表格右侧(第二列)的文本未对齐。我如何才能将第二列的元素与左侧的项目符号对齐:

项目符号和内容未对齐:

这是我正在使用的代码:

\documentclass[10pt,letterpaper]{article}

\usepackage{booktabs}
\usepackage{siunitx}
\cenMultlCell: \newcommand{\cenMultlCell}[2][c]{\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}

\usepackage[colorlinks=true, linkcolor=black]{hyperref}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}

\begin{document}



\begin{table}
    \footnotesize\centering % needed, as table is to wide
    \begin{tabular}{lS[table-format=2.2]SS} % supposing that you want to put numbers in the emty cells
        \toprule
        Caracteristica & \multicolumn{3}{c}{Maquina de soporte vectorial} \\\cmidrule(l){2-4}
        Bigrama & {RBF} & {polinomial} & {Lineal} \\\midrule
        Sustantivo/adjetivo 
        & {\cenMultlCell{another fancy text:\\ another text:\\ another text:\\ another one text:\\ another one text:\\ another text:\\ some text:\\ F-Beta another text:}} 
        & {\cenMultlCell{Exactitud:\\ another text:\\ another text:\\ another one text:\\ another one text:\\ another text:\\ some text:\\ another one text:}}
        & {\cenMultlCell{Exactitud:\\ another text:\\ another text:\\ another one text:\\ another one text:\\ another text:\\ some text:\\ F-Beta another text:}} 
\\\midrule
        some text\\
        sdfsfdsf\\
        sdfsdfdfd}\\
        &{\cenMultlCell{another fancy text:\\ another text:\\ another text:\\ another one text:\\ another one text:\\ another text:\\ some text:\\ F-Beta another text:}}
\\\midrule
        & 0.01 & & \\
        Gnu & 92.50 & & \\
        Emu & 33.33 & & \\
        Armadillo & 8.99 & & \\\midrule
        Total: & & & \\ \bottomrule
    \end{tabular}
    \caption{your caption}\label{tab:label}
\end{table}

A reference to \autoref{tab:label}.
\end{document}

有没有什么办法可以修复这个标识项目符号问题?我想将项目符号与表格的其他内容(即右侧)对齐。提前谢谢大家。

我希望每个单元格看起来都是 algin。因此预期的输出应如下所示:

-----------------------------------------------------
                         another fancy text:
                         another text:
· alksjdkasldasdas       another one text:
· asdasdas               another one text:
                         another text:
                         some text:
                         F-beta another text:
-----------------------------------------------------

答案1

如果你更换线条

    some text\\
    sdfsfdsf\\
    sdfsdfdfd}\\

使用(假设您想要\textbullet按照您的 ascii 图像在这些行中使用)

\cenMultlCell{\textbullet~some text \\ \textbullet~sdfsfdsf \\ \textbullet~sdfsdfdfd\\}

你得到:

在此处输入图片描述

代码:

\documentclass[10pt,letterpaper]{article}

\usepackage{booktabs}
\usepackage{siunitx}
\newcommand{\cenMultlCell}[2][c]{\begin{tabular}[#1]{@{}l@{}}#2\end{tabular}}

\usepackage[colorlinks=true, linkcolor=black]{hyperref}
\usepackage{booktabs}% http://ctan.org/pkg/booktabs
\newcommand{\tabitem}{~~\llap{\textbullet}~~}

\begin{document}



\begin{table}
    \footnotesize\centering % needed, as table is to wide
    \begin{tabular}{lS[table-format=2.2]SS} % supposing that you want to put numbers in the emty cells
        \toprule
        Caracteristica & \multicolumn{3}{c}{Maquina de soporte vectorial} \\\cmidrule(l){2-4}
        Bigrama & {RBF} & {polinomial} & {Lineal} \\\midrule
        Sustantivo/adjetivo 
        & {\cenMultlCell{another fancy text:\\ another text:\\ another text:\\ another one text:\\ another one text:\\ another text:\\ some text:\\ F-Beta another text:}} 
        & {\cenMultlCell{Exactitud:\\ another text:\\ another text:\\ another one text:\\ another one text:\\ another text:\\ some text:\\ another one text:}}
        & {\cenMultlCell{Exactitud:\\ another text:\\ another text:\\ another one text:\\ another one text:\\ another text:\\ some text:\\ F-Beta another text:}} 
\\\midrule
        \cenMultlCell{\textbullet~some text \\ \textbullet~sdfsfdsf \\ \textbullet~sdfsdfdfd\\}
        &{\cenMultlCell{another fancy text:\\ another text:\\ another text:\\ another one text:\\ another one text:\\ another text:\\ some text:\\ F-Beta another text:}}
\\\midrule
        & 0.01 & & \\
        Gnu & 92.50 & & \\
        Emu & 33.33 & & \\
        Armadillo & 8.99 & & \\\midrule
        Total: & & & \\ \bottomrule
    \end{tabular}
    \caption{your caption}\label{tab:label}
\end{table}

A reference to \autoref{tab:label}.
\end{document}

相关内容