下面的代码
\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
\title{Math Stack Question}
\author{bharathk98}
\date{May 2020}
\begin{document}
\maketitle
\begin{align}
\resizebox{.5cm}{!}
{& $\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}
\end{document}
返回错误。我们如何修复此问题并对方程进行编号?请注意,我使用了以下包。
答案1
您的代码无法按规定进行编译,部分原因是没有加载所有必需的包,部分原因是它包含一个或多个语法错误和几个完全不必要的$
标记。
无论如何,如果我正确理解了你想要排版的内容,就没有必要出现\resizebox
- 导致的排版灾难。相反,只需提供一些换行符即可。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools,amssymb}
\DeclareMathOperator{\sign}{sign}
\DeclarePairedDelimiter\abs\lvert\rvert
\newcommand\ddfrac[2]{\dfrac{\displaystyle #1}{\displaystyle #2}}
\begin{document}
\begin{equation}
\lambda^{*}_{A}(S)=
\inf \ddfrac{\sum_{k=1}^{m}\ell(I_{k,\epsilon})
\bigl[1-\mu(A)(1-\mu(S\cap I_{k,\epsilon}))\bigr]
\sign(\abs{A})}{\sum_{k=1}^{n}\ell(J_{k,\epsilon})
\bigl[1-\mu(A)(1-\mu(A\cap J_{k,\epsilon}))\bigr]}
\end{equation}
with
\begin{align}
& S\subseteq\bigcup_{k=1}^{m} I_{k,\epsilon},\
A\subseteq\bigcup_{k=1}^{n} J_{k,\epsilon}, \\
& \abs[\bigg]{\lambda^{*}(S)-\sum_{k=1}^{m}\ell(I_{k,\epsilon})}
\le \epsilon,
\\
& \abs[\bigg]{\lambda^{*}(A)-\sum_{k=1}^{n}\ell(J_{k,\epsilon})}
\le \epsilon,\\
& 1\le m \le \max\{\abs{S},1\},\
1 \le n \le \max\{\abs{A},1\}; \\
&P = S\cap I_{k,\epsilon},\
P = A\cap J_{k,\epsilon} \text{ or } P = A; \\
&\mu(P)=\inf\biggl\{ \sign\biggl(\,\bigcup_{s=1}^{t}G_s\biggr):
P\subseteq \bigcup_{s=1}^{t} G_s\biggr\},\
1 \le t \le \max\{\abs{P},1\}
\end{align}
\end{document}
答案2
这运行时没有错误,但我不知道你想要什么布局,我怀疑不是这个,但它可以调整。
\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
\title{Math Stack Question}
\author{bharathk98}
\date{May 2020}
\begin{document}
\maketitle
\begin{gather}
\lambda^{*}_{A}(S)=\\
\inf\{\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},\\
|\lambda^{*}(S)-\sum\limits_{k=1}^{m}\ell(I_{k,\epsilon})|\le \epsilon,\\
|\lambda^{*}(A)-\sum\limits_{k=1}^{n}\ell(J_{k,\epsilon})|\le \epsilon, 1\le m \le \max\{|S|,1\},\\
1 \le n \le \max\{|A|,1\};\\
P = S\cap I_{k,\epsilon},\\
P= A\cap J_{k,\epsilon} \ \text{or} \ P= A;\\
\mu(P)=\inf\{\text{sign}(\bigcup\limits_{s=1}^{t}G_s): P\subseteq \bigcup\limits_{s=1}^{t} G_s\},\\
1 \le t \le \max\{|P|,1\} \}
\end{gather}
\end{document}