我有以下分段函数:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{align*}
K(u) &= \begin{cases}
\frac{1}{2} & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases} \\ \\
K(u) &= \begin{cases}
\frac{3}{4}(1-u^{2}) & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases} \\ \\
K(u) &= \frac{1}{\sqrt{2\pi}}\text{exp}\left(-\frac{1}{2}u^{2} \right) \\ \\
K(u)&= \begin{cases}
\frac{3}{8}(3-5t^{2}) & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases}
\end{align*}
\end{document}
我想通过在这两个案例之间的右侧放置文本来标记每个函数。但是,到目前为止,我只设法将文本放在与案例相同的行上。
谢谢!
答案1
像这样?
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
K(u) &= \begin{cases}
\frac{1}{2} & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases} &&\text{This is labelled}\\[\baselineskip]
K(u) &= \begin{cases}
\frac{3}{4}(1-u^{2}) & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases} && \text{This is labelled} \\ \\
K(u) &= \frac{1}{\sqrt{2\pi}}\text{exp}\left(-\frac{1}{2}u^{2} \right) &&\text{This is labelled} \\ \\
K(u)&= \begin{cases}
\frac{3}{8}(3-5t^{2}) & -1 \leq u \leq 1 \\
0 & \text{sonst}
\end{cases} && \text{This is labelled}
\end{align*}
\end{document}
PS:您可以使用 ,而不要使用\\ \\
来作为额外的行\\[\baselineskip]
。
答案2
也许您正在寻找这个?
\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage[upright]{fourier}
\usepackage{tkz-linknodes}
\thispagestyle{empty}
\begin{document}
\parindent=0pt
\begin{center}
\fbox{%
\begin{minipage}{10cm}
\begin{NodesList}[margin=2 cm]
\begin{align}
3\left(x^2-\frac{2}{3}\right) &= 4 \AddNode\\
3x^2-2 &= 4 \AddNode\\
3x^2 &= 6 \AddNode\\
\intertext{\hfil isolate the term with the variable \hfil}
x^2 &= 2 \AddNode\\
\sqrt{x^2} &= \sqrt{2} \AddNode\\
|x| &= \sqrt{2} \AddNode\\
x &= \pm\sqrt{2} \AddNode
\end{align}
\LinkNodes{expand}%
\LinkNodes{$+2$}%
\LinkNodes{$\div 3$}
\LinkNodes{$\sqrt{\ldots}$}
\LinkNodes{$\sqrt{x}=|x|$}
\LinkNodes{so that}
\end{NodesList}
\end{minipage}}
\end{center}
\end{document}
% Encoding : utf8
% Author : Alain Matthes (2008)
% Engine : pdfLaTeX (LaTeX only with pdftex >= 1.40)
% Packages : xkeyval, tikz with arrow library, amsmath, etex, ifthen
% Remark : needs two compilations
我已在以下网址找到此内容: http://altermundus.fr/pages/linknodes.html