abntex2 包章节创建不起作用

abntex2 包章节创建不起作用

我正在尝试使用abntex2类编译这个简单的文档,但是由于某些奇怪的原因,我收到以下两个错误:

! Missing number, treated as zero.
<to be read again> 
                   \relax 
l.175 \chapter{Capítulo 1}

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Illegal unit of measure (pt inserted).
<to be read again> 
                   \relax 
l.175 \chapter{Capítulo 1}

Dimensions can be in units of em, ex, in, pt, pc,
cm, mm, dd, cc, nd, nc, bp, or sp; but yours is a new one!
I'll assume that you meant to say pt, for printer's points.
To recover gracefully from this error, it's best to
delete the erroneous units; e.g., type `2' to delete
two letters. (See Chapter 27 of The TeXbook.)

代码如下:

\documentclass[12pt,oneside,a4paper]{abntex2}

\begin{document}

\chapter{test}
\section{test}

\end{document}

答案1

编辑(Guilherme Z. Santos):这个问题已经已报告并修复在 TeX Live 2015 发行版中,如果您仍然遇到此问题,除了以下解决方案之外,另一种尝试是更新您的 TeX 发行版。


该类似乎假设了该包,但没有加载该calc包。

这有效

\documentclass[12pt,oneside,a4paper]{abntex2}
\usepackage{calc}
\begin{document}


\chapter{test}
a
\section{test}

\end{document}

相关内容