为什么只有部分缩进效果很好,而其余部分却没有

为什么只有部分缩进效果很好,而其余部分却没有

首先,我知道 \\ 命令不好。我的问题是为什么第 43 个缩进很好,而后面的 44 - 46 个却不行。

  \documentclass[10pt,a4paper]{article}
  \usepackage[latin1]{inputenc}
  \usepackage{amsmath}
  \usepackage{amsfonts}
  \usepackage{amssymb}
  \usepackage{makeidx}




  \usepackage{paralist}
  \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry}    
  \begin{document}


   43. Let $f\left(x\right) = \sqrt{x}, \; x = 100,\; \mathrm{d}x = -0.6.$ 
 \
  $ \begin{array}{ccl}
  f\left(x + \Delta x\right) & \approx & f\left(x\right) + f^{\prime}\left(x\right)\, \mathrm{d}x \\ 
  & = & \sqrt{x} + \frac{1}{2\sqrt{x}}\,\mathrm{d}x \\ 
  f\left(x+\Delta x\right) & = & \sqrt{99.4} \\ 
  & \approx & \sqrt{100} + \frac{-0.6}{2\sqrt{100}} = 9.97
  \end{array}  $ 
   \
  Using a calculator: $\sqrt{99.4} \approx 9.96995$ 
  \vfill

  44. Let $f(x)=\sqrt[3]{x},\; x = 27, \; \mathrm{d}x = -1$
  \\
  $f(x+ \Delta x) \approx f(x) + f^{\prime}(x)\,\mathrm{d}x = \sqrt[3]{x} +    \frac{1}{3\sqrt[3]{x^2}}\,\mathrm{d}x$ 
  $\sqrt[3]{26} \approx \sqrt[3]{27}+\frac{1}{3\sqrt[3]{27^2}}(-1) =    3-\frac{1}{27} \approx 2.9630$ 
  \\
 Using a calculator, $\sqrt[3]{26} \approx 2.9625$
 \vfill

 45. Let $f(x) = \sqrt[4]{x},\; x = 625,\; \mathrm{d}x =-1$ 
 \
  $\begin{array}{ccl}
   f(x +\Delta x) & \approx & f(x)+f^{\prime}(x)\,\mathrm{d}x = \sqrt[4]{x} + \frac{1}{4\sqrt[4]{x^3}} \\ 
   f(x + \Delta x) & = & \sqrt[4]{624} \approx \sqrt[4]{625} + \frac{1(-1)}       {4\left(\sqrt[4]{625}\right)^3} \\ 
  & = & 5-\frac{1}{500} = 4.998
  \end{array} $
 \\
Using a calculator, $\sqrt[4]{624} \approx 4.9980$\
\vfill

 46. Let $f(x) = x^3,\; x = 3, \; \mathrm{d}x = -0.01$
  \\
  $\begin{array}{ccl}
  f(x + \Delta x) & \approx & f(x) + f^{\prime}(x)\, \mathrm{d}x =x^3 + 3x^2\,\mathrm{d}x \\
  f(x + \Delta x) & = & \left(2.99\right)^3 \approx 3^3 + 3\left(3\right)^2\left(-0.01\right) \\
  & = & 27 - 0.27 = 26.73
   \end{array}$ 
  \\
 Using a calculator: $\left(2.99\right)^3 \approx 26.7309$ 
 \vfill
 \end{document}

在此处输入图片描述


答案1

这种奇怪的缩进的原因在于您使用了\\。虽然\\会换行,但不会换段落。因此,紧随其后的内容\\ 没有中间的空行仍是同一段落的一部分。并且,如果使用非零值\parindent,则第一行会缩进,而其余部分则与边距齐平。以下是输入的另一种视图(geometryshowframe选项突出显示文本块边界):

在此处输入图片描述

\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath,amsfonts,amssymb}
\usepackage[margin=2cm,showframe]{geometry}% http://ctan.org/pkg/geometry
\newcommand{\dx}{\mathrm{d}x}
\setlength{\parindent}{0pt}% No paragraph indent
\begin{document}

43. Let $f(x) = \sqrt{x}$, $x = 100$, $\dx = -0.6$.

\bigskip
$
\begin{array}{@{}r@{}l@{}}
  f(x + \Delta x) & {}\approx f(x) + f^{\prime}(x)\, \dx \\
                  & {}= \sqrt{x} + \frac{1}{2\sqrt{x}}\, \dx \\
  f(x + \Delta x) & {}= \sqrt{99.4} \\
                  & {}\approx \sqrt{100} + \frac{-0.6}{2\sqrt{100}} = 9.97
\end{array}
$

\bigskip
Using a calculator: $\sqrt{99.4} \approx 9.96995$

\vfill

44. Let $f(x) = \sqrt[3]{x}$, $x = 27$, $\dx = -1$

$f(x + \Delta x) \approx f(x) + f^{\prime}(x)\, \dx = \sqrt[3]{x} + \frac{1}{3\sqrt[3]{x^2}}\, \dx$ \quad
$\sqrt[3]{26} \approx \sqrt[3]{27} + \frac{1}{3\sqrt[3]{27^2}}(-1) = 3 - \frac{1}{27} \approx 2.9630$

Using a calculator, $\sqrt[3]{26} \approx 2.9625$

\vfill

45. Let $f(x) = \sqrt[4]{x}$, $x = 625$, $\dx =-1$

$
\begin{array}{@{}r@{}l@{}}
  f(x + \Delta x) & {}\approx f(x) + f^{\prime}(x)\, \dx = \sqrt[4]{x} + \frac{1}{4\sqrt[4]{x^3}} \\
  f(x + \Delta x) & {}= \sqrt[4]{624} \approx \sqrt[4]{625} + \frac{1(-1)}{4(\sqrt[4]{625})^3} \\
                  & {}= 5-\frac{1}{500} = 4.998
\end{array}
$

Using a calculator, $\sqrt[4]{624} \approx 4.9980$

\vfill

46. Let $f(x) = x^3$, $x = 3$, $\dx = -0.01$

$
\begin{array}{@{}r@{}l@{}}
  f(x + \Delta x) & {}\approx f(x) + f^{\prime}(x)\, \dx =x^3 + 3x^2\, \dx \\
  f(x + \Delta x) & {}= (2.99)^3 \approx 3^3 + 3(3)^2(-0.01) \\
                  & {}= 27 - 0.27 = 26.73
\end{array}
$

Using a calculator: $(2.99)^3 \approx 26.7309$

\vfill
\end{document}

我删除了段落缩进 ( \setlength{\parindent}{0pt})。这样所有内容都与左边距齐平。元素之间的间距设置为单独的段落(通过空行)或通过添加类似内容\bigskip(参见 #43)。

答案2

一些建议:

  • 在这种情况下,最好使用它enumerate。如果您想要更多的缩进空间,您可以尝试类似\setlength{\itemindent}{15pt}(15 pt 是正常的\parindent)。
  • 要显示数学方程式,请尝试align*环境。要将方程式与左边距对齐,请使用fleqn选项并添加\setlength{\mathindent}{0pt}到序言中。
  • 对于重复使用的命令,例如\,\mathrm{d}x,我们可以在前导码中定义新命令并使用它代替。例如,我们可以将 添加\DeclareMathOperator{\dx}{\mathrm{d}\mathnormal{x}}到前导码中,从而使用\dx代替\,\mathrm{d}x
  • ...还有其他

例子:

\documentclass[10pt,a4paper,fleqn]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{makeidx}
\usepackage{paralist}
\usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} 

\DeclareMathOperator{\dx}{\mathrm{d}\mathnormal{x}}

\setlength{\mathindent}{0pt}

\begin{document}

\begin{enumerate}\setlength{\itemindent}{15pt}
\setcounter{enumi}{42}
\item Let $f\left(x\right) = \sqrt{x}, \; x = 100, \;\dx = -0.6.$ 
    \begin{align*}
    f\left(x + \Delta x\right) &\approx f\left(x\right) +   f^{\prime}\left(x\right)\dx\\ 
    &= \sqrt{x} + \frac{1}{2\sqrt{x}}\dx\\ 
    f\left(x+\Delta x\right) & = \sqrt{99.4} \\ 
    &\approx \sqrt{100} + \frac{-0.6}{2\sqrt{100}} = 9.97
    \end{align*}
Using a calculator: $\sqrt{99.4} \approx 9.96995$
\vfill

\item Let $f(x)=\sqrt[3]{x},\; x = 27, \; \mathrm{d}x = -1$
  \begin{align*}
  f(x+ \Delta x) &\approx f(x) + f^{\prime}(x)\dx = \sqrt[3]{x} +    \frac{1}{3\sqrt[3]{x^2}}\,\mathrm{d}x\\ 
  f(x+ \Delta x) &=\sqrt[3]{26}\\
  &\approx \sqrt[3]{27}+\frac{1}{3\sqrt[3]{27^2}}(-1) =    3-\frac{1}{27} \approx 2.9630
  \end{align*}
Using a calculator, $\sqrt[3]{26} \approx 2.9625$
\vfill

\item Let $f(x) = \sqrt[4]{x},\; x = 625,\; \mathrm{d}x =-1$ 
    \begin{align*}
    f(x +\Delta x) & \approx f(x)+f^{\prime}(x)\,\mathrm{d}x = \sqrt[4]{x} + \frac{1}{4\sqrt[4]{x^3}} \\ 
    f(x + \Delta x) & = \sqrt[4]{624} \approx \sqrt[4]{625} + \frac{1(-1)}       {4\left(\sqrt[4]{625}\right)^3} \\ 
    & = 5-\frac{1}{500} = 4.998
    \end{align*}
Using a calculator, $\sqrt[4]{624} \approx 4.9980$\\
\vfill

\item Let $f(x) = x^3,\; x = 3, \; \mathrm{d}x = -0.01$
    \begin{align*}
    f(x + \Delta x) & \approx f(x) + f^{\prime}(x)\, \mathrm{d}x =x^3 + 3x^2\,\mathrm{d}x \\
    f(x + \Delta x) & = \left(2.99\right)^3 \approx 3^3 + 3\left(3\right)^2\left(-0.01\right) \\
    & = 27 - 0.27 = 26.73
    \end{align*}
Using a calculator: $\left(2.99\right)^3 \approx 26.7309$ 
\vfill

\end{enumerate}
\end{document}

结果:

在此处输入图片描述

相关内容