![编写极其简单的线性程序](https://linux22.com/image/348259/%E7%BC%96%E5%86%99%E6%9E%81%E5%85%B6%E7%AE%80%E5%8D%95%E7%9A%84%E7%BA%BF%E6%80%A7%E7%A8%8B%E5%BA%8F.png)
我正在尝试创建一个线性程序
如同:
有人可以帮忙吗?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{thmtools}
\setlength\parindent{0pt}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\theoremstyle{plain}
\declaretheorem[name=Theorem, numberwithin=section]{thm}
\declaretheorem[name=Lemma, numberwithin=section]{lem}
\declaretheorem[name=Proposition, numberwithin=section]{prop}
\declaretheorem[name=Corollary, numberwithin=section]{cor}
\declaretheorem[name=Conjecture, numberwithin=section]{conj}
\declaretheorem[name=Claim, numberwithin=section]{claim}
\theoremstyle{remark}
\newtheorem{remark}{Remark}[section]
\newtheorem{example}{Example}[section]
\usepackage{hyperref}
\begin{document}
\section{Introduction}
\begin{equation*}
\begin{aligned}
& \text{maximize}
& f(x) \\
& \text{subject to}
& x_1+x_2 = 8\\
& & x_3 + x_4 = 2
\end{aligned}
\end{equation*}
\bibliographystyle{plain}
\bibliography{references}
\end{document}
答案1
答案2
对齐环境的每一行都以 & 开头。删除它并将每行上剩余的 & 替换为 &~。