배열이 작동하지 않는 테이블의 수직 정렬

배열이 작동하지 않는 테이블의 수직 정렬

내 코드는 아래를 참조하세요. 코드에서 아무것도 변경하지 않았지만 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} 

여기에 이미지 설명을 입력하세요

관련 정보