TeX - LaTeX Asked by Mohamed Yusuf on May 27, 2021
I have a table that I am trying to embed in my document. The table renders by itself without any issue, but when rendering with the rest of the document it throws the following error:
! LaTeX Error: Command 1 undefined.
Not sure what the problem could be. can anyone help with this? MWE is as follows.
documentclass{article}
usepackage[a4paper,margin=2.5cm]{geometry}
usepackage{array}
usepackage{ragged2e}
usepackage{longtable}
usepackage{booktabs}
begin{document}
centering
normalsize
renewcommandarraystretch{1.2}
begin{longtable}{>{hspace{0pt}}m{0.081linewidth}>{hspace{0pt}}m{0.536linewidth}>{RaggedLefthspace{0pt}}m{0.274
linewidth}}
toprule
No. & Search terms & Number of par{}results endfirsthead
hline
1 & childh &
bottomrule
end{longtable}
end{document}
The code you post generates no error however the error you show can be obtained by adding expandafter
to your code.
documentclass{article}
usepackage[a4paper,margin=2.5cm]{geometry}
usepackage{array}
usepackage{ragged2e}
usepackage{longtable}
usepackage{booktabs}
begin{document}
expandafter
renewcommandarraystretch{1.2}
end{document}
Produces:
! LaTeX Error: Command 1 undefined.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.13 renewcommandarraystretch
{1.2}
?
Note that you only showed the first line, if you show the full error as here from !
to ?
then you will get more context on the location of the error.
Correct answer by David Carlisle on May 27, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP