我的对齐环境中有以下文本,但看起来不太好。那么我应该进行哪些更改才能获得更好的设计/输出?
\documentclass[a4paper,
12pt,
]{scrreprt}
\usepackage{amsmath}
\begin{document}
\begin{align}
R_ {t+1}^{simple}=\frac{\text{(asset price at t+1) $ - $ (asset price at t)}}{\text{asset price at t}} \hspace*{0.5cm}r_{t+1}^{log}=ln \left( \frac{\text{asset price at t+1}} {\text{asset price at t}}\right) \hspace*{0.2cm}
\end{align}
\end{document}
答案1
我会
- 使用以下方式格式化文本上标
\textrm
- 使用
\ln
而不是仅仅ln
(假设这是一个对数) - 用
equation
代替 来align
表示单个方程 - 为资产价格定义一个变量以减少重复文本。
得出:
\documentclass[a4paper,
12pt,
]{scrreprt}
\usepackage{amsmath}
\parindent0pt
\begin{document}
Old version:
\begin{align}
R_ {t+1}^{simple}=\frac{\text{(asset price at t+1) $ - $ (asset price at t)}}{\text{asset price at t}} \hspace*{0.5cm}r_{t+1}^{log}=ln \left( \frac{\text{asset price at t+1}} {\text{asset price at t}}\right) \hspace*{0.2cm}
\end{align}
New version:
\begin{equation}
R_{t+1}^{\textrm{simple}} = \frac{P_{t+1}-P_t}{P_t}
\qquad
r_{t+1}^{\textrm{log}} = \ln \left(\frac{P_{t+1}} {P_t}\right),
\end{equation}
where $P_t$ is the asset price at $t$.
\end{document}
看起来像这样:
答案2
你应该更仔细地区分什么是数学,什么是文本。我会这样做
R_ {t+1}^{\textup{simple}}=
\frac{\text{(asset price at $t+1$) $ - $ (asset price at $t$)}}
{\text{asset price at $t$}}
\hspace*{0.5cm}
r_{t+1}^{\textup{log}}=
\operatorname{ln} \left(
\frac{\text{asset price at $t+1$}}
{\text{asset price at $t$}}
\right)
现在所有的t
看起来都应该一样了。我不明白最后hspace