kaobook 中的全角 xltabular

kaobook 中的全角 xltabular

我正在嘗試遵循 kaobook 文件(4.3)中的範例:

長表的標題始終位於表格下方,且其寬度與文字相同(不會延伸到頁邊距)。然而,有時您可能需要一張太寬的長桌,以至於會侵入邊緣;在這些情況下,您可能還想增加標題的寬度。為此,您必須編寫兩個附加命令,一個在長表之前,一個在長表之後。

範例如下:

\floatsetup[longtable]{margins=centering,LTcapwidth=table} % Add this line before the longtable to increase the caption width
\begin{longtable}{lp{8cm}p{5cm}p{2cm}}
...
\end{longtable}
\floatsetup[longtable]{margins=raggedright,LTcapwidth=\textwidth}
% Add this line after the longtable to revert the previous change

我嘗試複製這個例子。然而,它似乎不起作用:

longtable 環境中標題未對齊

\floatsetup[longtable]{margins=centering,LTcapwidth=table}
\begin{longtable}{lp{8cm}p{5cm}p{2cm}}
    \hline
    One & Two & Three \\
    Left & Center & Center \\
    \hline
    \caption{\textbf{longtable}---\blindtext}
\end{longtable}
\floatsetup[longtable]{margins=raggedright,LTcapwidth=\textwidth}

我期望標題與左側的表格對齊並具有全寬。

這同樣適用於 xltabular:

xltabular 環境中標題未對齊

\floatsetup[xltabular]{margins=centering,LTcapwidth=table}
\begin{xltabular}{17cm}{lp{8cm}p{5cm}p{2cm}}
    \hline
    One & Two & Three \\
    Left & Center & Center \\
    \hline
    \caption{\textbf{xltabular}---\blindtext}
\end{xltabular}
\floatsetup[xltabular]{margins=raggedright,LTcapwidth=\textwidth}

如何從kaobook中的xltabular中獲得全角標題?

相關內容