我坐了好几个小时,还是搞不清楚自己错过了什么。我觉得答案很简单,但我真的被难住了。请帮忙!!!
\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
、、itemize
等quote
– 包括:\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
设置为另一个命令。\list
COMMANDS
第二个参数中的命令
\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}
您还会注意到以下变化(有些是外观上的,有些则不是):
\not=
类似于\neq
(更少的击键)。S_{i}
类似于S_i
(更少的击键次数)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}