\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\relpenalty=9999
\binoppenalty=9999
\renewcommand{\qedsymbol}{$\blacksquare$}
\newcommand*{\QEDA}{\hfill\ensuremath{\blacksquare}}%
% SYMBOLS %
\def\loc{{\textstyle{\rm loc}}}
\def\C{{\bf C}} % complex numbers
\def\R{{\mathbb R}} % real numbers
\def\Rhat{{\widehat{\R}}} % reals (dual)
\def\N{{\mathbb N}} % natural numbers
\def\Z{{\mathbb Z}} % integers
\def\Q{{\bf Q}}
%%%%%%%%%%% MACROS %%%%%%%%%%%%
% UNARY, BINARY OPERATORS %
\def\norm#1{\| #1 \|}
\def\CHI{\hbox{\raise .5ex \hbox{$\chi$}}}
\def\bmu{{\mu}}
\def\bnu{{\nu}}
\def\n{{\bf n}}
\def\x{{\bf x}}
\def\y{{\bf y}}
\def\p{{\bf p}}
\def\r{{\bf r}}
\def\X{{\cal X}}
\def\Y{{\cal Y}}
\def\T{{\cal T}}
\def\S{{\cal S}}
\begin{document}
\noindent \textbf{2)} Let $f:\R^2 \to \R$ by the formula
\[
f(\x) =
\begin{cases}
\frac{x_1^2x_2}{x_1^4+x_2^2}, & \text{ if } \x \neq \mathbf{0} \\
0, & \text{ if } \x = \mathbf{0}
\end{cases}
\]
\textbf{a)} Show that if $\x \to \mathbf{0}$ along either the $x_1$- or the $x_2$-coordinate axis, $f(\x)\to 0$.
\end{document}
我想将 $f(\mathbf{x}) \to 0$ 的部分修复到 \textbf{a)} 之后第一个句子的相同缩进内,即“显示...”的正下方
答案1
这很容易enumitem
。我还修复了代码中的一些缺陷。
例如,\bf
已经被弃用了 20 多年。此外,使用\def
非常危险,因为您可能会覆盖重要的命令。最好使用更语义化的命名,例如\bx
“boldface x”。
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\usepackage{bm}
\usepackage{enumitem}
\usepackage{lipsum} % just for the example
%\relpenalty=9999
%\binoppenalty=9999
\renewcommand{\qedsymbol}{$\blacksquare$}
%\newcommand*{\QEDA}{\hfill\ensuremath{\blacksquare}}%
% SYMBOLS %
\newcommand\loc{\mathrm{loc}}
\newcommand\C{\mathbf{C}} % complex numbers
\newcommand\R{\mathbb{R}} % real numbers
\newcommand\Rhat{\widehat{\R}} % reals (dual)
\newcommand\N{\mathbb{N}} % natural numbers
\newcommand\Z{\mathbb{Z}} % integers
\newcommand\Q{\mathbf{Q}}
%%%%%%%%%%% MACROS %%%%%%%%%%%%
% UNARY, BINARY OPERATORS %
\newcommand\norm[1]{\|#1\|}
\newcommand\CHI{\text{\raisebox{.5ex}{$\chi$}}}
\newcommand\bmu{\bm{\mu}}
\newcommand\bnu{\bm{\nu}}
\newcommand\bn{\mathbf{n}}
\newcommand\bx{\mathbf{x}}
\newcommand\by{\mathbf{y}}
\newcommand\bp{\mathbf{p}}
\newcommand\br{\mathbf{r}}
\newcommand\cX{\mathcal{X}}
\newcommand\cY{\mathcal{Y}}
\newcommand\cT{\mathcal{T}}
\newcommand\cS{\mathcal{S}}
%% Environments
\newenvironment{exercises}
{\begin{enumerate}[label=\bfseries\arabic*),leftmargin=*,align=left]}
{\end{enumerate}}
\newenvironment{questions}
{\begin{enumerate}[label=\bfseries\alph*),leftmargin=*,align=left]}
{\end{enumerate}}
\begin{document}
\begin{proof}
\lipsum*[2]
\end{proof}
\begin{exercises}
\item Let $f\colon\R^2 \to \R$ be defined by the formula
\[
f(\bx) =
\begin{cases}
\dfrac{x_1^2x_2}{x_1^4+x_2^2}, & \text{if $\bx \neq \mathbf{0}$} \\[2ex]
0, & \text{if $\bx = \mathbf{0}$}
\end{cases}
\]
\begin{questions}
\item Show that if $\bx \to \mathbf{0}$ along either
the $x_1$- or the $x_2$-coordinate axis, $f(\bx)\to 0$.
\end{questions}
\end{exercises}
\end{document}
我添加了一个proof
环境来展示如何\QEDA
不需要。
答案2
添加到序言中\usepackage{enumerate}
,并将该部分内容写如下:
\begin{enumerate}[{\bfseries 1)}]
\item Let $f:\R^2 \to \R$ be defined by the formula
\[
f(\x) =
\begin{cases}
\frac{x_1^2x_2}{x_1^4+x_2^2}, & \text{ if } \x \neq \mathbf{0} \\
0, & \text{ if } \x = \mathbf{0}
\end{cases}
\]
\begin{enumerate}[{\bfseries a)}]
\item Show that if $\x \to \mathbf{0}$ along either the $x_1$- or the $x_2$-coordinate axis, $f(\x) \to 0$.
\item Show that also ..
\end{enumerate}
\end{enumerate}
如果您确实想将其推$f(\mathbf{x}) \to 0$
至新行(我不推荐),只需\\
在其前面添加即可。