
列に必要な最小幅を計算し(tabularx を使用します)、残りのスペース(たとえば \textwidth)を列間のスペースに均等に分割することは可能ですか? どうもありがとうございます
\documentclass[a4paper,12pt,fleqn,twoside,openright]{book}
\usepackage{caption}
\usepackage{tabularx,booktabs}
\begin{document}
\begin{table}
\centering
\caption{table}
\label{table:table}
\begin{tabularx}{\textwidth}{>{\centering}X>{\centering}X>{\centering\arraybackslash}X}
\toprule
\textbf{1} & \textbf{2} & \textbf{3} \\ \midrule
A & BBBBB & AAAAAAAAAAAA\\
B & b & b \\
C & c & c \\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
アドバイス後:
最初の列の前と最後の列の後ろにスペースを追加するにはどうすればよいですか?
例外を設けて、2 列または 2 列の間にスペースを入れないようにするにはどうすればよいですか?
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{array}
\begin{document}
\begin{center}
\begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}ccc@{}}
\hline
A & B & v\\
C & D & b\\
\hline
\end{tabular*}
\end{center}
\end{document}