书目错误:计量单位非法

书目错误:计量单位非法

我正在准备使用他们的模板(QIC LaTeX2e)。我正在默认的 Overleaf 项目中进行编译,并添加了一些包以便使用我的宏:\usepackage{amsfonts, amsmath, nicefrac, hyperref, amssymb, listings, xcolor}。当呈现示例书目时

\begin{thebibliography}{000}
\bibitem{first}
P. Horodecki and R. Horodecki (2001), {\it Distillation and bound entanglement},
Quantum Inf. Comput., Vol.1, pp. 045-075.

\bibitem{cal}
R. Calderbank and P. Shor (1996), {\it Good quantum error
       correcting codes exist},
Phys. Rev. A, 54, pp. 1098-1106.

\bibitem{niel}
M.A. Nielsen and J. Kempe (2001), {\it Separable states are
more disordered globally than locally}, quant-ph/0105090.

\bibitem{mar}
A.W. Marshall and I. Olkin (1979), {\it Inequalities: theory of majorization and its applications},
Academic Press (New York).
\end{thebibliography}

输出中的引用以“pt!”开头,Overleaf 给出了以下错误:

Package calc Error: `0' invalid at this point.

See the calc package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.230 \bibitem
              {first}
I expected to see one of: + - * / )

! Missing number, treated as zero.
<to be read again> 
                   \protect 
l.230 \bibitem
              {first}
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> 
                   \protect 
l.230 \bibitem
              {first}
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.)
LaTeX Error: Something's wrong--perhaps a missing \item.

There are no entries found in a list you have created. Make sure you label list entries using the \item command, and that you have not used a list inside a table.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.230 \bibitem
              {first}
Try typing  <return>  to proceed. If that doesn't work, type  X <return>  to quit.

看来编译器不喜欢赋予bibitems 的名称,并且由于某种原因需要一个长度。

以下是样式文件中的代码thebibliography

\renewenvironment{thebibliography}[1]
        {\frenchspacing
         \small\rm\baselineskip=11pt
         \begin{list}{\arabic{enumi}.}
        {\usecounter{enumi}\setlength{\parsep}{0pt}     
%         \setlength{\leftmargin 12.7pt}{\rightmargin 0pt}%FOR 1--9 ITEMS
          \setlength{\leftmargin 17pt}{\rightmargin 0pt}  %FOR 10--99 ITEMS
%         \setlength{\leftmargin 22pt}{\rightmargin 0pt}   %FOR 100+ABOVE ITEMS
         \setlength{\itemsep}{0pt} \settowidth
          {\labelwidth}{#1.}\sloppy}}{\end{list}}

解决这些错误的最干净的解决方案是什么?我真的不想放弃我的宏和相应的先决条件包。

相关内容