Inline comments on math equations. Is there a way?

Just writing "LHS &= "RHS" & "(comment)" might be enough?

When equations include multiple alignment points (&), this creates blocks of alternatingly right- and left-aligned columns.

An example

$
  & norm(abs(f+g)^(p-1) dot f)_1 + norm(abs(f+g)^(p-1) dot g)_1 \
  &= norm(abs(f+g)^(p-1) dot (abs(f) + abs(g)))_1
    &wide "(积分是线性运算)" \
  &>= norm(abs(f+g)^(p-1) dot abs(f+g))_1
    &wide "(绝对值的三角不等式)" \
  &= norm(abs(f+g)^p)_1 \
  &= norm(f+g)_p^p
    &wide "(定义)"
$

Note that wide in math means #h(2em).

1 Like