I am trying the solution given in How to get paragraph spacing within table to be same as outside when using parskip package?
Which works fine except when I added \usepackage{mathtools} it gives error. I thought it will better to make new question on this. But if I should have made this comment instead, will delete this.
Here is MWE. This is same exact code in the above link. All what I did is just add one line \usepackage{mathtools} and now lualatex gives error
\documentclass[12pt]{book}\usepackage{mathtools} %uncomment this, error goes way\usepackage{longtable,array}\usepackage[skip=10pt plus1pt]{parskip}%see https://tex.stackexchange.com/questions/750023/how-to-get-paragraph-spacing-within-table-to-be-same-as-outside-when-using-parsk\newlength{\defaultparskip}\AtBeginDocument{\setlength{\defaultparskip}{\parskip}}\AddToHook{cmd/@arrayparboxrestore/after}{\setlength{\parskip}{\defaultparskip}}\begin{document}\begin{longtable}{|p{4in}|}\hlineline 1line 2line 3\\ \hline\end{longtable}line1line2line 3\end{document}Now
>lualatex index.texThis is LuaHBTeX, Version 1.23.3 (TeX Live 2026/dev) restricted system commands enabled.(./index.texLaTeX2e <2025-06-01> patch level 1L3 programming layer <2025-08-13> (/usr/local/texlive/2025/texmf-dist/tex/latex/base/book.clsDocument Class: book 2025/01/22 v1.4n Standard LaTeX document class(/usr/local/texlive/2025/texmf-dist/tex/latex/base/bk12.clo))(/usr/local/texlive/2025/texmf-dist/tex/latex/mathtools/mathtools.sty(/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/keyval.sty)(/usr/local/texlive/2025/texmf-dist/tex/latex/tools/calc.sty)(/usr/local/texlive/2025/texmf-dist/tex/latex/mathtools/mhsetup.sty)(/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsmath.styFor additional information on amsmath, use the `?' option.(/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amstext.sty(/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsgen.sty))(/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsbsy.sty)(/usr/local/texlive/2025/texmf-dist/tex/latex/amsmath/amsopn.sty)))(/usr/local/texlive/2025/texmf-dist/tex/latex/tools/longtable.sty)(/usr/local/texlive/2025/texmf-dist/tex/latex/tools/array.sty)(/usr/local/texlive/2025/texmf-dist/tex/latex/parskip/parskip.sty(/usr/local/texlive/2025/texmf-dist/tex/latex/kvoptions/kvoptions.sty(/usr/local/texlive/2025/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty)(/usr/local/texlive/2025/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty))(/usr/local/texlive/2025/texmf-dist/tex/latex/etoolbox/etoolbox.sty))(/usr/local/texlive/2025/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)(./index.aux)(/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/graphicx.sty(/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/graphics.sty(/usr/local/texlive/2025/texmf-dist/tex/latex/graphics/trig.sty)(/usr/local/texlive/2025/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)(/usr/local/texlive/2025/texmf-dist/tex/latex/graphics-def/luatex.def(/usr/local/texlive/2025/texmf-dist/tex/context/base/mkii/supp-pdf.mkii[Loading MPS to PDF converter (version 2006.09.02).])))(/usr/local/texlive/2025/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty(/usr/local/texlive/2025/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg)))! Missing number, treated as zero.<to be read again> }l.32 \end{document}? Note, I am using lualatex Version 1.23.3 on TL 2025 on Linux
Is there a reason why adding \usepackage{mathtools} gives error on the above solution?