我正在为一个包含许多部分的问题提供解决方案。我希望各部分缩进\qquad
。第一行的缩进量大约是其他行的两倍,但我使用了命令\noindent \qquad
。我在第二行中也有与 c.) 和 d.) 答案相同的额外空格。(我希望这些第二行与 c.) 和 d.) 第一行的开头对齐。我使用命令\hphantom
。)
\documentclass[10pt]{amsart}
\usepackage{}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\begin{document}
\noindent \qquad a.) The domain of $f$ is $\mathbb{R}$. \\
\qquad b.) $y = 0$ is the equation of the asymptote to the graph of $f$. \\
\qquad c.) The intervals on which $f$ is increasing are $[-1, \, 0]$ and $[1, \, \infty)$, and the \\
\noindent \hphantom{\qquad c.) }intervals on which $f$ is decreasing are $(-\infty, \, -1]$ and $[0, 1]$. \\
\qquad d.) The intervals on which $f$ is concave up are $(-1.5, \, -0.5)$ and $(0.5, \, 1.5)$, and \\
\noindent \hphantom{\qquad d.) }the intervals on which $f$ is concave down are $(-\infty, \, -1.5)$ and $(1.5, \, \infty)$. \\
\qquad e.) The coordinates of the critical points of $f$ are $(1, \, -1.75)$, $(0, \, 0)$, and $(1, -1.75)$. \\
\qquad f.) The coordinates of the inflection points of $f$ are $(-1.5, \, -1.25)$ and $(1.5, \, -1.25)$. \\
\qquad g.) $f > 0$ on $\emptyset$. \\
\qquad h.) $f^{\prime} > 0$ on $(-1, \, 0) \cup (1, \, \infty)$. \\
\qquad i.) $f^{\prime\prime} > 0$ on $(-1.5, \, -0.5) \cup (0.5, \, 1.5)$.
\vskip0.25in
\end{document}
答案1
\documentclass[10pt]{amsart}
\usepackage{}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\begin{document}
\renewcommand\theenumi{\alph{enumi}}
\renewcommand\labelenumi{\theenumi.)}
\begin{enumerate}
\item The domain of $f$ is $\mathbb{R}$.
\item $y = 0$ is the equation of the asymptote to the graph of $f$.
\item The intervals on which $f$ is increasing are $[-1, \, 0]$ and $[1, \, \infty)$, and the
intervals on which $f$ is decreasing are $(-\infty, \, -1]$ and $[0, 1]$.
\item The intervals on which $f$ is concave up are $(-1.5, \, -0.5)$ and $(0.5, \, 1.5)$, and
the intervals on which $f$ is concave down are $(-\infty, \, -1.5)$ and $(1.5, \, \infty)$.
\item The coordinates of the critical points of $f$ are $(1, \, -1.75)$, $(0, \, 0)$, and $(1, -1.75)$.
\item The coordinates of the inflection points of $f$ are $(-1.5, \, -1.25)$ and $(1.5, \, -1.25)$.
\item $f > 0$ on $\emptyset$.
\item $f' > 0$ on $(-1, \, 0) \cup (1, \, \infty)$.
\item f'' > 0$ on $(-1.5, \, -0.5) \cup (0.5, \, 1.5)$.
\end{enumerate}
\end{document}
看看原文有什么问题:
\noindent \qquad a.) The domain of $f$ is $\mathbb{R}$. \\
\noindent
开始段落,然后\qquad
添加 2em 的空间,然后你得到a.
一个根据宽度定位的括号a
\qquad b.) $y = 0$ is the equation of the asymptote to the graph of $f$. \\
前面的内容\\
不开始一个段落,只是鼓励换行,换行后的空格作为 tex 段落对齐的一部分被丢弃,所以\qquad
什么也不做。这就是为什么第一行(仅)看起来缩进的原因。)
然后根据 的宽度定位,b
这与 的宽度不同a
。
\qquad c.) The intervals on which $f$ is increasing are $[-1, \, 0]$ and $[1, \, \infty)$, and the \\
如上
\noindent \hphantom{\qquad c.) }intervals on which $f$ is decreasing are $(-\infty, \, -1]$ and $[0, 1]$. \\
\noindent
在这个位置不做任何事情,对齐也会被关闭,因为)
幻影中后面的空格将始终设置为其自然大小,但上面一行中的空格会缩小以适合该行。请注意,虽然其他的都\qquad
被丢弃了,但这里的一个位于幻影框内,而不是在行首,因此不会被丢弃,所以这一行缩进\qquad
。
\qquad d.) The intervals on which $f$ is concave up are $(-1.5, \, -0.5)$ and $(0.5, \, 1.5)$, and \\
如上.....
答案2
正如 David 上面所说,使用列表并让 LaTeX 处理格式和编号会更好。这样做更容易阅读和书写,而且布局自动统一且易于更改。
为此我将使用枚举项包获取
使用:
\documentclass{article}
\usepackage{enumitem}
\usepackage{amssymb}
\usepackage{amsthm}
\begin{document}
\begin{enumerate}[label=\alph*.)]
\item The domain of $f$ is $\mathbb{R}$.
\item $y = 0$ is the equation of the asymptote to the graph of $f$.
\item The intervals on which $f$ is increasing are $[-1, \, 0]$ and $[1, \, \infty)$, and the
intervals on which $f$ is decreasing are $(-\infty, \, -1]$ and $[0, 1]$.
\item The intervals on which $f$ is concave up are $(-1.5, \, -0.5)$ and $(0.5, \, 1.5)$, and
the intervals on which $f$ is concave down are $(-\infty, \, -1.5)$ and $(1.5, \, \infty)$.
\item The coordinates of the critical points of $f$ are $(1, \, -1.75)$, $(0, \, 0)$, and $(1, -1.75)$.
\item The coordinates of the inflection points of $f$ are $(-1.5, \, -1.25)$ and $(1.5, \, -1.25)$.
\item $f > 0$ on $\emptyset$.
\item $f' > 0$ on $(-1, \, 0) \cup (1, \, \infty)$.
\item $f'' > 0$ on $(-1.5, \, -0.5) \cup (0.5, \, 1.5)$.
\end{enumerate}
\end{document}
至于您的代码发生了什么。问题是\qquad
在之后没有任何效果\\
。这对我来说有点令人惊讶,我没想到这一点,但您可以通过考虑代码来看到这一点:
\documentclass[10pt]{amsart}
\parskip=1em
\begin{document}
1. Normal line without \verb|\noindent|
\noindent 2. Normal line with \verb|\noindent|
\qquad 3. Normal line with \verb|\qquad|
4. Normal line ending with \verb|\\|\\
\qquad 5. Normal line with \verb|\qquad|
\end{document}
我期望看到除第 2 行之外的所有行都缩进(第 1 行和第 4 行缩进\parindent
,第 3 行和第 5 行缩进\qquad
)。但是,第 5 行没有缩进:
正如 David 所解释的那样,“换行符后的空格将被丢弃”。如果您确实需要在 a 后留一个空格,\\
则可以使用\hspace*{2em}
。