配列を使用したテーブルの垂直配置が機能しない

配列を使用したテーブルの垂直配置が機能しない

私のコードについては以下を参照してください。コードには何も変更を加えていませんが、LaTeX ドキュメントを再コンパイルしたところ、垂直中央揃えが機能しなくなりました。

垂直方向の中央揃え(「前の」スクリーンショットに表示されているもの)に戻すにはどうすればよいですか?

コード:

\documentclass[10pt]{exam}
\usepackage{array}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}

\begin{table}
    \centering
    \begin{tabular}{| L{3cm} | L{8cm} | L{1.7cm} | L{1.7cm} |}
        \hline
        \textbf{Section} & \textbf{Description} & \textbf{Available Points} & \textbf{Earned Points}\\
        \hline
        \textbf{Cover Page} & Includes the title of the report, team name, and all of the team member names. & 1 & ~\\[1cm]
        \hline
        \textbf{Introduction} & Explains the project functionality and features. & 2 & ~\\[1cm]
        \hline
    \end{tabular}
\end{table}

\end{document}

前に:

ここに画像の説明を入力してください

後:

ここに画像の説明を入力してください

答え1

私の場合もうまくいきません。列タイプ定義を変更して、 のSプレ指定子 ( をロードする場合は別の文字を使用できますsiunitx)を組み込むことを提案しますcellspace。これにより、対応する列のセルの上部と下部に最小限の垂直間隔が確保されます。

\documentclass[10pt]{exam}
\usepackage{array, cellspace}
\setlength{\cellspacetoplimit}{2ex}
\setlength{\cellspacebottomlimit}{2ex}

\newcolumntype{L}[1]{>{\raggedright\arraybackslash}S{m{#1}}}
\newcolumntype{C}[1]{>{\centering\arraybackslash}S{m{#1}}}
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}S{m{#1}}}

\begin{document}

\begin{table}
    \centering
    \begin{tabular}{| L{3cm} |L{8cm} | L{1.7cm} | L{1.7cm} |}
        \hline
        \textbf{Section} & \textbf{Description} & \textbf{Available Points} & \textbf{Earned Points}\\
        \hline
        \textbf{Cover Page} & Includes the title of the report, team name, and all of the team member names. & 1 & ~\\
        \hline
        \textbf{Introduction} & Explains the project functionality and features. & 2 & ~\\
        \hline
    \end{tabular}
\end{table}

\end{document} 

ここに画像の説明を入力してください

関連情報