如何使列内容左对齐

如何使列内容左对齐
\begin{center}
\begin{tabular}{ c c c }

b)radius $3.5$ cm       &Area= $38.5 \ cm^2$                &circumference $= 22$ cm \\ % ok
c)diameter $56$ cm      &Area =$2464 \ cm^2$                &circumference $= 176$ cm \\ % ok
d)diameter $49$ cm      &Area= $1886.5 \  cm^2$                 &circumference  $= 154$ cm\\ % ok
e)radius $1.5x$ cm      &Area =$\tfrac{99}{14}x^2 \  cm^2$      &circumference $= \frac{66}{7} x $ cm\\
f)diameter $28x$ cm     &Area= $616x^2  \ cm^2$             &circumference $= 88 x$ cm % ok
\end{tabular}
\end{center}

答案1

除了从c(中心)列类型切换到l(左)列类型之外,您还应努力提高表格的视觉吸引力。特别是,所有重复的内容(例如单词“半径”/“直径”、“面积”和“周长”)都应移出表格主体并移入标题中。提供一些视觉结构(例如将列标签和测量单位放在单独的行上)也是受欢迎的。看看下面的“前后”并置。哦,对于第一个数据列,请选择“半径”或“直径”,但不要在这两个概念之间来回切换。

在此处输入图片描述

\documentclass{article}

\usepackage{amsmath}  % for '\tfrac' macro
\usepackage{siunitx}  % for '\unit' macro
\usepackage{booktabs} % for well-spaced horizontal rules
\usepackage{array}    % for '\newcolumntype' macro
\newcolumntype{L}{>{$}l<{$}} % left-aligned & automatic inline math mode

\begin{document}

``before'' 

\smallskip
\begin{tabular}{ c c c }
b)radius $3.5$ cm       &Area= $38.5 \ cm^2$   &circumference $= 22$ cm \\ % ok
c)diameter $56$ cm      &Area =$2464 \ cm^2$   &circumference $= 176$ cm \\ % ok
d)diameter $49$ cm      &Area= $1886.5 \  cm^2$    &circumference  $= 154$ cm\\ % ok
e)radius $1.5x$ cm      &Area =$\tfrac{99}{14}x^2 \  cm^2$   &circumference $= \frac{66}{7} x $ cm\\
f)diameter $28x$ cm     &Area= $616x^2  \ cm^2$   &circumference $= 88 x$ cm % ok
\end{tabular}

\bigskip
``after''

\smallskip
\begin{tabular}{@{} l LLL @{}}
 & \text{radius} & \text{area} & \text{circumference} \\
 & (\unit{\centi\meter}) & (\unit{\centi\meter\squared}) & (\unit{cm}) \\
\midrule
b) & 3.5  & 38.5             & 22  \\ 
c) & 28   & 2464             & 176 \\ 
d) & 24.5   & 1886.5           & 154 \\ 
e) & 1.5x & \frac{99}{14}x^2 & \frac{66}{7}x  \\
f) & 14x  & 616x^2           & 88 x 
\end{tabular}

\end{document}

相关内容