我尝试在这个长方程上应用对齐
(*Packages*)
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{hyperref}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{cases}
\usepackage{graphicx}
\DeclareMathOperator{\sign}{sign}
\makeatletter
\newcommand{\vast}{\bBigg@{4.5}}
\newcommand{\Vast}{\bBigg@{5}}
\makeatother
(*Packages Ends*)
\title{Math Stack Question}
\author{bharathk98}
\date{May 2020}
(*Document Begin*)
\begin{document}
\maketitle
(*Equation Begins*)
\begin{align}
& \lambda^{*}_{A}(S)=\\
&\inf\left\{\frac{\sum\limits_{k=1}^{m}\ell(I_{k,\epsilon})
\bigl[1{-}\mu(A)(1{-}\mu(S\cap I_{k,\epsilon}))\bigr]\text{sign}(|A|)}{\sum\limits_{k=1}^{n}\ell(J_{k,\epsilon})
\bigl[1{-}\mu(A)(1{-}\mu(A\cap J_{k,\epsilon}))\bigr]}: S\subseteq\bigcup\limits_{k=1}^{m} I_{k,\epsilon},\\
& A\subseteq\bigcup\limits_{k=1}^{n} J_{k,\epsilon}, \left|\lambda^{*}(S)-\sum\limits_{k=1}^{m}\ell(I_{k,\epsilon})\right|\le \epsilon, \left|\lambda^{*}(A)-\sum\limits_{k=1}^{n}\ell(J_{k,\epsilon})\right|\le \epsilon, \\
& 1\le m \le \max\left\{|S|,1\right\}, 1 \le n \le \max\left\{|A|,1\right\}; P = S\cap I_{k,\epsilon}, P= A\cap J_{k,\epsilon} \ \text{or} \\
& P= A; \mu(P)=\inf\left\{\text{sign}\left(\bigcup\limits_{s=1}^{t}G_s\right): P\subseteq \bigcup\limits_{s=1}^{t} G_s\right\}, 1 \le t \le \max\left\{|P|,1\right\} \right\}
\end{align}
(*Equation Ends*)
\end{document}
但它返回错误标志。它说我必须使用\left.
,\right.
但我不确定如何使用它们。
答案1
请尝试以下操作:
\documentclass{article}
%\usepackage[utf8]{inputenc} in recent article is default
\usepackage{geometry}
\usepackage{mathtools, amssymb} % mathtoola define \shortintertext
% and load amsmath package
% amssymb load amsfonts too
\usepackage{cases}
\usepackage{graphicx}
\usepackage{hyperref} % had to be loaded last
\DeclareMathOperator{\sign}{sign}
\makeatletter
\newcommand{\vast}{\bBigg@{4.5}}
\newcommand{\Vast}{\bBigg@{5}}
\makeatother
\title{Math Stack Question}
\author{bharathk98}
\date{May 2020}
\begin{document}
\maketitle
\begin{align}
\lambda^{*}_{A}(S)
& = \inf\left\{\frac{\sum\limits_{k=1}^{m}\ell(I_{k,\epsilon})
\bigl[1{-}\mu(A)(1{-}\mu(S\cap I_{k,\epsilon}))\bigr] \sign(|A|)}{\sum\limits_{k=1}^{n}\ell(J_{k,\epsilon})
\bigl[1{-}\mu(A)(1{-}\mu(A\cap J_{k,\epsilon}))\bigr]}: S\subseteq\bigcup\limits_{k=1}^{m} I_{k,\epsilon}\right.,\\
%
A & \subseteq\bigcup\limits_{k=1}^{n} J_{k,\epsilon}, \left|\lambda^{*}(S)-\sum\limits_{k=1}^{m}\ell(I_{k,\epsilon})\right|\le \epsilon, \left|\lambda^{*}(A)-\sum\limits_{k=1}^{n}\ell(J_{k,\epsilon})\right|\le \epsilon, \\
& 1\le m \le \max\left\{|S|,1\right\}, 1 \le n \le \max\left\{|A|,1\right\}; P = S\cap I_{k,\epsilon}, P= A\cap J_{k,\epsilon}
%
\shortintertext{or}
%
P & = A; \mu(P)=\inf\left\{\text{sign}\left(\bigcup\limits_{s=1}^{t}G_s\right): P\subseteq \bigcup\limits_{s=1}^{t} G_s\right\}, 1 \le t \le \max\left\{|P|,1\right\}
\end{align}
\end{document}
请注意,您的方程太宽,无法很好地适应默认article
页面布局。因此我添加了包geometry, which increase
textwidth`。
编辑: 或者您可能希望拥有:
\right.
其中,在使用第一个方程之后,而是为\right\}
。