2

One table seems to be stretched along the text width and one is not.

enter image description here

\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
  • With your code and the version 6.13a (the last version) of nicematrix of windows10, I don't have this problem.
    – pascal974
    Commented Sep 21, 2022 at 13:46

1 Answer 1

1

This is a bug of the version v6.13 (2022/08/24). The problem is solved in version 6.13a (2022-09-17) available on CTAN.

2
  • MiKTeX still does not have version 6.13a in it. I tried manual installation but nicematrix.dtx does not generate nicematrix.sty Commented Sep 21, 2022 at 15:35
  • 1
    From the archive on CTAN, retrieve nicematrix.dtx but also nicematrix.ins. Put both files in the same directory. Run latex nicematrix.ins. That instruction will extract the sty file from the dtx file. Commented Sep 21, 2022 at 15:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .