缺失数字,视为零\c@list \item f 或 \item o

缺失数字,视为零\c@list \item f 或 \item o

我坐了好几个小时,还是搞不清楚自己错过了什么。我觉得答案很简单,但我真的被难住了。请帮忙!!!

    \documentclass{report}
    \textwidth 316pt
    \begin{document}

    We number the properties by a double numbering technique,
such that it is easy to refer to them.

\begin{enumerate}
\item
The observed properties hold for all $S$--boxes.
We analyze if the output of an $S$--box can or cannot change
if one modifies the inputs of an $S$--box in the following way\nobreak\hspace{0.7mm}:
\begin{list}{(\alph{list})}{\itemsep 0mm}
\item fix the inputs $e$ and $f$E
\item one is allowed to change $c$ and $d$ to an arbitrary value $c'$ and $d'$
\item one changes the inputs $a$ and $b$ as described in the properties
\end{list}
\begin{description}{1.4.}
\item[1.1.]
$\neg (\forall  c,d,c',d',e,f : S_{i}(0,0,c,d,e,f) \not=  S_{i}(1,0,c',d',e,f) )$
\item[1.2.]
$\neg (\forall  c,d,c',d',e,f : S_{i}(0,1,c,d,e,f) \not=  S_{i}(1,1,c',d',e,f) )$
\item[1.3.]
$\forall  c,d,c',d',e,f : S_{i}(0,1,c,d,e,f) \not=  S_{i}(1,0,c',d',e,f)$
\item[1.4.]
$\forall  c,d,c',d',e,f : S_{i}(0,0,c,d,e,f) \not=  S_{i}(1,1,c',d',e,f)$
\end{description}

\end{document}

上面我遇到的另一个错误是(在描述中):“LaTeX 错误:出现问题 - 可能缺少 \item”,请帮助我解决此问题。我将不胜感激。

正在尝试这样的事情:在此处输入图片描述

答案1

如果你打算使用list环境来创建类似列表的结构,你需要熟悉它的语法。从source2e(部分54 列表和相关环境,第 269 页):

创建缩进环境的通用命令 – enumerate、、 itemizequote– 包括:

\list{<LABEL>}{<COMMANDS>} ... \endlist

用户可以将其作为list环境调用。LABEL参数指定项目标签。COMMANDS包含用于更改水平和垂直间距参数的命令。

环境的每个项目都以命令开始,\item[ITEMLABEL] 该命令生成一个标记为 的项目ITEMLABEL。如果缺少参数,则LABEL命令的参数\list将用作项目标签。标签由输入 形成,\makelabel{<ITEMLABEL>}hbox宽度为其自然宽度或\labelwidth,以较大者为准。\list命令定义\makelabel为具有默认定义:

\makelabel{<ARG>} == BEGIN \hfil ARG END

对于宽度小于 的标签\labelwidth,将标签置于右对齐位置,\labelsep即项目文本的左侧。但是,\makelabel可以通过的参数将其\let设置为另一个命令。\listCOMMANDS

第二个参数中的命令\usecounter{<foo>}导致计数器 foo 初始化为零,并由每个\item没有参数的命令单步执行。(\label列表内的命令引用这个计数器。)

值得注意的是最后一段,其中的 a\usecounter{<counter>}表示counter与列表一起使用的。你还没有定义一个柜台,尽管你确实说它应该是list

相反,让我们将计数器定义为mylistcntr,并将其添加到\usecounter{mylistcntr}的第二个参数中list

在此处输入图片描述

\documentclass{report}

\newcounter{mylistcntr}

\begin{document}

We number the properties by a double numbering technique,
such that it is easy to refer to them.

\begin{enumerate}
  \item
  The observed properties hold for all $S$--boxes.
  We analyze if the output of an $S$--box can or cannot change
  if one modifies the inputs of an $S$--box in the following way:
  \begin{list}{(\alph{mylistcntr})}{\usecounter{mylistcntr}\itemsep 0mm}
    \item fix the inputs $e$ and $f$E
    \item one is allowed to change $c$ and $d$ to an arbitrary value $c'$ and $d'$
    \item one changes the inputs $a$ and $b$ as described in the properties
  \end{list}
  \begin{description}
    \item[1.1.]
    $\neg (\forall  c,d,c',d',e,f : S_i(0,0,c,d,e,f) \neq S_i(1,0,c',d',e,f) )$
    \item[1.2.]
    $\neg (\forall  c,d,c',d',e,f : S_i(0,1,c,d,e,f) \neq S_i(1,1,c',d',e,f) )$
    \item[1.3.]
    $\forall  c,d,c',d',e,f : S_i(0,1,c,d,e,f) \neq S_i(1,0,c',d',e,f)$
    \item[1.4.]
    $\forall  c,d,c',d',e,f : S_i(0,0,c,d,e,f) \neq S_i(1,1,c',d',e,f)$
  \end{description}
\end{enumerate}

\end{document}

对于左对齐的枚举 (a)、(b)、...,您可以使用

\begin{list}
  {(\alph{mylistcntr})}
  {\usecounter{mylistcntr}%
   \def\makelabel#1{\rlap{#1}\hss}% Left-aligned label
   \itemsep 0mm}

您还会注意到以下变化(有些是外观上的,有些则不是):

  1. \not=类似于\neq(更少的击键)。
  2. S_{i}类似于S_i(更少的击键次数)
  3. description已经定义为list环境,因此不需要任何额外的参数。

答案2

您的环境实际上是枚举环境。加载enumitem后一切都会变得简单:

\documentclass{report}
\textwidth 316pt
\usepackage{enumitem} 
\setlist[enumerate]{wide = 0pt, leftmargin=*}

\begin{document}

We number the properties by a double numbering technique,
such that it is easy to refer to them.

\begin{enumerate}[label=\arabic*., wide, leftmargin=*]
\item
The observed properties hold for all $S$--boxes.
We analyze if the output of an $S$--box can or cannot change
if one modifies the inputs of an $S$--box in the following way\,:

 \begin{enumerate}[label=(\alph*), noitemsep]%
 \item fix the inputs $e$ and $f$.
 \item one is allowed to change $c$ and $d$ to an arbitrary value $c'$ and $d'$.
 \item one changes the inputs $a$ and $b$ as described in the properties.
 \end{enumerate}
%
 \begin{enumerate}[label=\theenumi\arabic*., wide=0pt]
 \item
 $\neg (\forall c,d,c',d',e,f : S_{i}(0,0,c,d,e,f) \not= S_{i}(1,0,c',d',e,f) )$
 \item
 $\neg (\forall c,d,c',d',e,f : S_{i}(0,1,c,d,e,f) \not= S_{i}(1,1,c',d',e,f) )$
 \item
 $\forall c,d,c',d',e,f : S_{i}(0,1,c,d,e,f) \not= S_{i}(1,0,c',d',e,f)$
 \item%
 $\forall c,d,c',d',e,f : S_{i}(0,0,c,d,e,f) \not= S_{i}(1,1,c',d',e,f)$
 \end{enumerate}
 \end{enumerate}

\end{document} 

在此处输入图片描述

相关内容