24小时热门版块排行榜    

查看: 1391  |  回复: 2
【悬赏金币】回答本帖问题,作者luckyyjjun将赠送您 10 个金币

luckyyjjun

铁虫 (正式写手)

[求助] TexWorks使用pdfLaTex编译出现错误,求助各位大佬帮忙。 已有1人参与

使用TexWorks编译以下内容:

--------------------------------------------------------------------------------
%!documentclass{article}
%!usepackage[version=3]{mhchem}
%!usepackage{longtable}
\begin{document}
\begin{longtable}{c|lc}
ID & Reaction & Total Flux \\ \hline
0 & \ce{CH4} + \ce{HO} $\to$ \ce{H2O} + \ce{CH3} & 1 \\
1 & \ce{C} + \ce{H} + \ce{H} + \ce{H} + \ce{H} $\to$ \ce{CH4} & 1 \\
2 & \ce{H} + \ce{O} $\to$ \ce{HO} & 1 \\
\hline
\end{longtable}
\end{document}
----------------------------------------------------------------------------------


错误内容如下:

-------------------------------------------------------------------------------------------
This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./reac.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
(d:/Program Files/texlive/2020/texmf-dist/tex/latex/l3backend/l3backend-pdfmode
.def) (./reac.aux)

! LaTeX Error: The font size command \normalsize is not defined:
               there is probably something wrong with the class file.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
...                                             
                                                  
l.4 \begin{document}
                    
?
-------------------------------------------------------------------------------------------------------
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

azxa0996

禁虫 (小有名气)

本帖内容被屏蔽

2楼2021-01-05 11:00:17
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

caoshujiao

新虫 (初入文坛)

【答案】应助回帖

为什么前面三行要注释掉呢? 去掉注释就可以编译了:
\documentclass{article}
\usepackage[version=3]{mhchem}
\usepackage{longtable}
\begin{document}
\begin{longtable}{c|lc}
ID & Reaction & Total Flux \\ \hline
0 & \ce{CH4} + \ce{HO} $\to$ \ce{H2O} + \ce{CH3} & 1 \\
1 & \ce{C} + \ce{H} + \ce{H} + \ce{H} + \ce{H} $\to$ \ce{CH4} & 1 \\
2 & \ce{H} + \ce{O} $\to$ \ce{HO} & 1 \\
\hline
\end{longtable}
\end{document}
3楼2021-01-05 11:39:16
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 luckyyjjun 的主题更新
不应助 确定回帖应助 (注意:应助才可能被奖励,但不允许灌水,必须填写15个字符以上)
信息提示
请填处理意见