I want to make my formula align left, so I write like this:
\documentclass[UTF8]{ctexart}
\usepackage[fleqn]{lmodern,amsmath}
\title{标题}
\author{roger}
\begin{document}
公式如下:
\begin{flalign*}
d1 = (x_1, ...x_N) \\
BM25(w_i, d1) = \frac{(k+1)c(w_i, d1)}{c(w_i, d1) + k(1 - b + b\frac{|d|}{avdl})} \\
x_i = \frac{BM25(w_i, d1)}{\Sigma_{j=1}^NBM25(w_j, d1)}
\end{flalign*}
\end{document}
Best Answer
flalign
is a variant ofalign
but uses the full width of the page (length of the line, hence fl). Like the other AMS alignments it is designed to set equations as pairs of columns with a left column right aligned (typically to&=
) and a left column left aligned, and then the next two columns again being right-left aligned.You have specified no alignment points so the entire structure is in the first, right aligned part of the first equation.
You want
&=
on each row, and perhaps usealign
rather thanflalign
.