我正在嘗試創建一個線性程序
如同:
有人可以幫忙嗎?
\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
對齊環境的每一行都以 & 開頭。刪除它,並將每行剩餘的 & 替換為 &~。