
在下面的範例中,我面臨一些有關枚舉的問題:
首先,為了確保這些項目在單獨的行中開始,我使用了 \mbox{}\,但是這些項目比需要的向下移動了一點。
其次,如何開始編號 (3.1)、(3.4) 等,而不是上面範例中的 3...4?我嘗試使用 3.\arabic 作為枚舉選項,但有 5 個錯誤。
第三,使用 \mbox 後,我的枚舉消失了(標題為「線性函數」的項目應枚舉為(4)。
\documentclass[leqno,10pt]{article}
\usepackage{soul}
\usepackage[margin=0.75in]{geometry}
\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Lecture 1}
\rhead{Handout 2}
\usepackage{mathtools}
\usepackage{enumitem,array}
\usepackage{relsize}
\usepackage{amsmath}
\usepackage{amsthm} %for proof
\newtheorem*{mythm}{Theorem}
\newtheorem*{mydef}{Definition}
\title{\ul{Expectations in Bivariate Probability Distribution}}
\date{}
\newenvironment{mydescription}{%
\renewcommand\descriptionlabel[1]{\hspace{\labelsep}\textbf{{##1}}}%
\begin{description}%
}{%
\end{description}%
}
\newenvironment{definition}[1][Definition]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
\begin{document}
\newcommand{\myitem}{\stepcounter{enumi}\item[(\theenumi)]}%for enumerate with no. in brackets
\newcommand\litem[1]{\item{\bfseries {#1}}}
\thispagestyle{fancy}
\begin{definition}
Let the random vector $(X,Y)$ have a joint \textbf{pdf} $f(x,y)$, and let $Z=h(X,Y)$ be a (single-valued) function of (X,Y). Then the expectation of the random variable $Z$ is
\begin{equation}
E(Z)=\int_{-\infty}^{\infty}{\int_{-\infty}^{\infty}{h(x,y)f(x,y)dxdy}}
\label{eq:}
\end{equation}
\end{definition}
\begin{mydescription}
\item[Moments] For non-negative integers $j,k$:
\begin{enumerate}[leftmargin=-0.3cm,start=2]
\myitem Let $Z=X^{j}Y^{k}$. Then $E(Z)=E(X^{j}Y^{k})$ is called the $(j,k)$ raw moment ($=$ moment about the origin) of the bivariate distribution.
\myitem Let $Z=X^{*^{j}}Y{*^{k}}$, where $X^{*}=X-E(X)$ and $Y^{*}=Y-E(Y)$. Then $E(Z)=E(X^{*^{j}}Y{*^{k}})$ is called the $(j,k)$ central moment ($=$ moment about the mean) of the bivariate distribution.
\end{enumerate}
\item[Variance and Covariance as Special cases of Central Moments]\mbox{}\\
\begin{enumerate}[leftmargin=-0.3cm,start=3]
\item $j=2,k=0$
\item $j=1,k=1$
\end{enumerate}
\item[Theorems]
\begin{enumerate}[leftmargin=*,start=4]\mbox{}\\
\litem{Linear function}
\end{enumerate}
\end{mydescription}
\end{document}
答案1
1:請勿\\
在 後使用\mbox{}
。
2:選項是label=(3.\arabic{enumi})
,儘管這有點奇怪,因為枚舉不是嵌套的。
3:放在\mbox{}
後面\item[Theorems]
,而不是後面\begin{enumerate}[leftmargin=*,start=4]