[Solution] LaTeX error: Illegal unit of measure (pt inserted).

foreword

Creation start time: November 21, 2022 16:37:10

As the title, solve the error that occurs when latex is compiled:Illegal unit of measure (pt inserted).

Cause analysis and solution

In fact, the reason is plainly:

If you are specifying a length in LATEX, but do not specify the appropriate units, you will generate the error.

At the beginning, Baidu searched the problem, but couldn't find the reason at all. Later, it was replaced by the Bing search engine, and the first one was the explanation on Overleaf. In an instant, Mao Sai suddenly realized. . .

My original code was:

\begin{longtable}{M{0.5cm}M{3cm}M{1cm}M{2cm}M{2.5}M{2cm}M{1cm}}

It turned out to be M{2.5}done!
Speechless

Just add the unit of cm!

summary

More than that, you still have to use search engines reasonably.

Creation end time: November 21, 2022 16:39:41

references

Guess you like

Origin blog.csdn.net/weixin_39278265/article/details/127967756