Left-align math equations in VS code (KateX) markdown

75 Views Asked by At

I am trying to have VS code render left-aligned equations with big operators.

The equation I want to align is:

A(x) = \sum_{i \geq 0}a_i \times x^i

Normally, I would simply surround it with $ ... $ but it makes it impossible to create alignment across formulas and I dislike how the index (the i >= 0 part) of the sum operator appears on its right (like regular subscript/superscript) rather under it.

Incorrect limit placement and equal sign aligment

Alternatively, the solution below works on GitHub:

$$
\begin{flalign*}
& A(x) = \sum_{i \geq 0}a_i \times x^i &
\end{flalign*}
$$

VS code, instead of rendering it, shows an error stating KateX does not support the flalign environment (confirmed in the documentation):

ParseError: KaTeX parse error: No such environment: flalign* at position 7: \begin{̲f̲l̲a̲l̲i̲g̲n̲*̲}̲ & A(x) = \sum_…

Is it possible to have an equation that:

  1. renders big operators nicely,
  2. allows multi-line sets of formulas/equations,
  3. is rendered aligned to the left of the text in GitHub,
  4. renders with Katex/VS code?
    For that last part, I would ideally like it to be left-aligned too but I can accept centered alignment in VS code.
0

There are 0 best solutions below