Hi, I am a novice of LyX. Now I am preparing a research paper. I would like to input an optimization problem in the following format:
min f(x) (1)
s.t. x<=a (1a)
x>=b (1b)
"min" and "s.t." need to be aligned along their right-hand side, and the mathematical formula parts need to be aligned along their left-hand side. I want to know how to input this kind of formula in LyX system. Thank you very much.
LyX ⇒ Multi-line Formula
NEW: TikZ book now 40% off at Amazon.com for a short time.

-
- Posts: 707
- Joined: Tue Mar 25, 2008 5:02 pm
Multi-line Formula
Try the amsmath package's "align" environment. I don't use LyX, but here's how to do it in LaTeX:
The above code will produce this:
I hope that's what you wanted, because it wasn't clear from your first post.
Code: Select all
Code, edit and compile here:
\documentclass{article}\usepackage{amsmath}\begin{document}\begin{equation}\begin{split}\min{}& f(x) \\\text{s.t.\,} & x <= a \\& x >= b\end{split}\end{equation}\end{document}
Code: Select all
min f(x)s.t. x <= ax >= b