带文本的方程式中的换行符

带文本的方程式中的换行符

我想包含一个主要由文本元素组成的方程式,但是我无法对齐分布在两行上的最后一个参数,以便方程式仍然适合页面。

如果可以的话那就太好了:

  1. 减少第一行和第二行之间的行距
  2. 将两行略微向上移动,使行距与 + 号对齐

以下是我目前的 MWE:

\documentclass[10pt, a4paper] {article} 
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[margin=1.5cm,left=1.5cm,right=1.5cm,top=6cm,bottom=2cm,includefoot,headsep=.8in]{geometry}
\usepackage{amsmath}

\begin{document}
\begin{align}
\begin{split}
\textit{Outperf.-Point} = \frac{\left(\textit{100\%} + \frac{\textit{(Coupon p.a.}\times \textit{Days of Accrued Interest)}}{\textit{365}} - \textit{Offer-Price}\right)\times \textit{Notional Amount}}{\textit{Conversion Ratio}} + &\textit{Price of} \\
\textit{the} & \textit{ Underlying}
\end{split}
\end{align}
\end{document}

答案1

使用gathered

\documentclass[10pt,a4paper]{article} 
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[margin=1.5cm,left=1.5cm,right=1.5cm,top=6cm,bottom=2cm,includefoot,headsep=.8in]{geometry}
\usepackage{amsmath}

\begin{document}
\begin{equation}
    \textit{Outperf.-Point} =
        \frac{\left(
            100\% +
            \frac{
                % Note: removed redundant parentheses
                \textit{Coupon p.a.}\times\textit{Days of Accrued Interest}
            }{365} -
            \textit{Offer-Price}
        \right)\times
        \textit{Notional Amount}}
        {\textit{Conversion Ratio}} + 
        \begin{gathered}
            \textit{Price of} \\
            \textit{the Underlying}
        \end{gathered}
\end{equation}
\end{document}

我也整理了一下你的代码:不要使用斜体数字和括号。

我还添加了输出,以便您可以轻松检查它是否是您要求的:

代码输出

添加

“价格”和“标的”之间的垂直间距太大?那么尝试

\documentclass[10pt,a4paper]{article} 
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[margin=1.5cm,left=1.5cm,right=1.5cm,top=6cm,bottom=2cm,includefoot,headsep=.8in]{geometry}
\usepackage{amsmath}

\begin{document}
\begin{equation}
    \textit{Outperf.-Point} =
        \frac{\left(
            100\% +
            \frac{
                % Note: removed redundant parentheses
                \textit{Coupon p.a.}\times\textit{Days of Accrued Interest}
            }{365} -
            \textit{Offer-Price}
        \right)\times
        \textit{Notional Amount}}
        {\textit{Conversion Ratio}} + 
        \begin{gathered}
            \textit{Price of} \\[-\jot]
            \textit{the Underlying}
        \end{gathered}
\end{equation}
\end{document}

这是新的输出:

第二个示例的输出

第二次添加

当然,正如@egreg 所建议的,使用环境更容易tabular,如下所示:

\documentclass[10pt,a4paper]{article} 
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[margin=1.5cm,left=1.5cm,right=1.5cm,top=6cm,bottom=2cm,includefoot,headsep=.8in]{geometry}
\usepackage{amsmath}

\begin{document}
\begin{equation}
    \textit{Outperf.-Point} =
        \frac{\left(
            100\% +
            \frac{
                % Note: removed redundant parentheses
                \textit{Coupon p.a.}\times\textit{Days of Accrued Interest}
            }{365} -
            \textit{Offer-Price}
        \right)\times
        \textit{Notional Amount}}
        {\textit{Conversion Ratio}} + 
        \begin{tabular}{@{}c@{}}
            \textit{Price of} \\
            \textit{the Underlying}
        \end{tabular}
\end{equation}
\end{document}

再次给出相应的输出:

第三个示例的输出

请注意,的内容tabular不会随着数学风格而变化,例如,如果用于上标(但的内容gathered也不会)。如果有必要,可以这样做。

答案2

真正美观的解决方案是使用文本缩写作为方程中的变量。如果出于某种原因您不喜欢这样做,请查看替代解决方案:

在此处输入图片描述

代码相当复杂...

\documentclass[10pt, a4paper] {article}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[margin=1.5cm,left=1.5cm,right=1.5cm,top=6cm,bottom=2cm,includefoot,headsep=.8in]{geometry}
\usepackage{amsmath}

\begin{document}
\begin{align}
\binom{\textit{Outperf.-}}{\textit{Point}} 
    = \frac{\left[\begin{array}{c}
                    \textit{100\%} + 
                    \dfrac{\displaystyle
            \binom{\textit{Coupon}}{\textit{p.a.}}\times 
            \binom{\textit{Days of}}{\textit{Accrued Interest}}
              }{\textit{365}} - 
                \displaystyle\binom{\textit{Offer-}}{\textit{Price}}
                  \end{array}\right] 
            \times\displaystyle 
        \binom{\textit{Notional}}{\textit{Amount}}
            }{\textit{Conversion Ratio}} + 
        \binom{\textit{Price of the}}{\textit{Underlying}}
\end{align}
\end{document}

相关内容