更新 nicematrix 包导致 NiceTabularX 环境出现意外行为

更新 nicematrix 包导致 NiceTabularX 环境出现意外行为

一个表格似乎沿着文本宽度拉伸,而另一个则没有。

在此处输入图片描述

\documentclass[11pt]{book}

    \newcommand{\examTime}{\textbf{Exam Time: 2:00}}
    \newcommand{\examPoints}{Total Exam Points: 50.\space \examTime}
    \newcommand{\examTitle}{Environment and Energy. Final Exam}
    \newcommand{\examDate}{Date: \formatdate{11}{9}{2022}}
    \newcommand{\instructor}{Instructor: Al-Motasem Aldaoudeyeh, PhD}

    \usepackage[a4paper]{geometry}
% BEGIN_FOLD

    \geometry{twoside=false, showframe=false}
    \geometry{paperwidth=270mm, paperheight=297mm}
    
    % Horizontal
    \geometry{inner=11mm, outer=11mm, includemp=true, bindingoffset=0mm, marginparsep=0mm, marginparwidth=0mm}
    
    % Vertical
    \geometry{top=11mm, bottom=11mm, includehead=false, includefoot=false, headheight=5pt, headsep=0pt, footskip=3.7pt}
    
% END_FOLD

    \usepackage{nicematrix}
    \usepackage{booktabs}
    
    \usepackage{calc}
    
    \usepackage{datetime}

\begin{document}

\noindent%
\begin{NiceTabularX}{\textwidth}{@{}l X[c, t] X[c, t] X[c, t] r@{}}
    
    
    \Block[c]{1-5}{\Large \bfseries Tafilah Technical University} & & & &
    \\
    \addlinespace
    
    \Block[c]{1-5}{\large \bfseries College of Engineering} & & & &
    \\
    \addlinespace
    
    \Block[c]{1-5}{\bfseries Department of Electriccal Power Engineering and Mechatronics Engineering} & & & &
    \\
    \addlinespace
    
    \examTitle & & & & \examDate
    \\
    \addlinespace
    
    \instructor & & & & \examPoints
    \\
    \addlinespace
    
    Student Name: & & & & \parbox[l]{\widthof{\examPoints}}{Student ID Number:}
    \\
    \addlinespace
    
    \bottomrule
    
\end{NiceTabularX}

\vspace{1.1\baselineskip}

{\bfseries Answers to Multiple Choice Questions}

\noindent%
\begin{NiceTabularX}{\textwidth}{@{}*{10}X[l, t]@{}}
    
    \toprule
    
    1. & 2. & 3. & 4. & 5. & 6. & 7. & 8. & 9. & 10. 
    \\
    
    11. & 12. & 13. & 14. & 15. & 16. & 17. & 18. & 19. & 20. 
    \\
    
    21. & 22. & 23. & 24. & 25. & 26. & 27. & 28. & 29. & 30.
    \\
    
    31. & 32. & 33. & 34. & 35. & 36. & 37. & 38. & 39. & 40.
    \\
    
    41. & 42. & 43. & 44. & 45. & 46. & 47. & 48. & 49. & 50.
    \\
    
    51. & 52. & 53. & 54. & 55. & 56. & 57. & 58. & 59. & 60.
    \\
    
    61. & & & & & & & & &
    \\
    
    \bottomrule
    
\end{NiceTabularX}

\end{document}

答案1

这是版本 v6.13 (2022/08/24) 的一个错误。该问题已在 CTAN 上提供的版本 6.13a (2022-09-17) 中得到解决。

相关内容