The ToExpression command works well with scalars \frac{x}{\sqrt{5}} \mu S_1
ToExpression["\\frac{x}{\\sqrt{5}} \\mu S_1", TeXForm] but fails when trying to use the aligned environment:
ToExpression["\\begin{aligned} \\frac{dS}{dt} & = - \\frac{S}{N} \\left( \\beta_1 i_1 + \\beta_2 \ i_2 \\right) + \\sigma_1 R_1 + \\sigma_2 R_2, & & \\\\ \\frac{di_1}{dt} & = \\frac{\\beta_1}{N} S i_1 - \\gamma_1 i_1, & \ \\frac{di_2}{dt} & = \\frac{\\beta_2}{N} S i_2 - \\gamma_2 i_2 \\end{aligned}", TeXForm] giving a lot of ErrorBoxes.
Is there a way to import this $\TeX$ expression to Mathematica? The problem disappears when replacing the 'aligned' environment manually by a list:
ToExpression["\\{\\frac{dS}{dt} =\\frac{\\beta_1}{N} (N-i_1-R_1-i_2- \ \\epsilon R_2) i_1- \\gamma_1 i_1,\\frac{dS}{dt} \ =\\frac{\\beta_1}{N} (N-i_1-R_1-i_2- \\epsilon R_2) i_1- \\gamma_1 \ i_1\\}", TeXForm] which compiles correctly. So, it seems this part of the conversion, i.e. removing the 'aligned' , should be done manually, which makes sense, for how could Mathematica have guessed what to do with the 'aligned'?
TeXForm[{{a + b, c}, {d, e}}], you see that it givesarray. However, when parsing back,ToExpression[ToString@TeXForm[{{a + b, b, c}, {d, e, f}}], TeXForm], it gives a weird looking matrix ... $\endgroup$