如何在小页面中缩进特定行

如何在小页面中缩进特定行

这是一个迷你页面格式:

我想编写以下内容,但希望所有以 $ 开头的行都缩进一定量,我想调整一下直到看起来正确为止。我还希望能够将其应用于其他情况,因此能够缩进任何行的通用形式将非常有用。

我曾尝试使用

\setlength{\parindent}{3cm}
\setlength{\parskip}{0cm}

问题在于,线条与线条之间仍然会留下很大的空隙。

以下为部分原文:

A chemist sell razor blades to her customers. She currently buys them in batches of $200$ every $2$ weeks at a cost of $£14$ per batch. The delivery cost is $20p$ per batch and the annual holding cost per unit is $26\%$ of the purchase price. Assuming instantaneous supply, constant demand and no shortages, should she alter her ordering policy? Furthermore, if the supplier offers a $5\%$ discount if she orders at least $500$ per batch, what is her optimal stock control policy?\\\\
This is the standard model with average cost per unit time\\
$ C =\frac{c_br_d}Q+c_pr_d+\frac{c_hQ}2$\\
is minimised for\\
$ Q^{*} =\sqrt{\frac{2c_br_d}{c_h}}$\\
We have\\
$ r_d =\frac{200}2=100$ razorblades per week\\
$ c_b =0.2$\\
$ c_p =\frac{£14}{200}=£0.07$ per razorblade\\
These give\\
$ Q^{*} = 339$\\
$ T^{*} = \frac{339}{100}=3.39$ weeks\\
$ C^{*} = £7.12$ per week\\

答案1

这是另一个建议,使用amsmath的。它提供了你可以设置为任意长度的[fleqn]长度:\mathindent

在此处输入图片描述

\documentclass{article}
\usepackage[fleqn]{amsmath}% http://ctan.org/pkg/amsmath
\setlength{\mathindent}{1cm}
\begin{document}
A chemist sell razor blades to her customers. She currently buys them in batches of~$200$ every~$2$ weeks at a cost of~$\pounds 14$ per batch. The delivery cost is~$20p$ per batch and the annual holding cost per unit is~$26\%$ of the purchase price. Assuming instantaneous supply, constant demand and no shortages, should she alter her ordering policy? Furthermore, if the supplier offers a~$5\%$ discount if she orders at least~$500$ per batch, what is her optimal stock control policy?

This is the standard model with average cost per unit time
\[ C =\frac{c_br_d}Q+c_pr_d+\frac{c_hQ}2 \]
is minimised for
\[ Q^{*} =\sqrt{\frac{2c_br_d}{c_h}} \]
We have
\begin{align*}
  r_d &= \frac{200}2=100 \text{ razorblades per week} \\
  c_b &= 0.2 \\
  c_p &=\frac{\pounds 14}{200} = \pounds 0.07 \text{ per razorblade}
\end{align*}
These give
\begin{align*}
  Q^{*} &= 339 \\
  T^{*} &= \frac{339}{100} = 3.39 \text{ weeks} \\
  C^{*} &= \pounds 7.12 \text{ per week}
\end{align*}
\end{document}

\parindent指段落首行的缩进。在上面的 MWE 中,设置\parindent为默认值20pt\parskip指段落之间的间隙,在您的小代码片段中没有这个间隙。\\不会开始新的段落。

相关内容