New answers tagged

3

The following also works. It doesn't require any string replacements in the output. All I did is to re-define the set of variables u such that it contains the second power of x as a String: v={5,-13,5,6,-20,17}; u={"\!\(\*SuperscriptBox[\(x\), \(2\)]\)",x,1}; Abs[{v[[1]],v[[2]],v[[3]]}.u]=={v[[4]],v[[5]],v[[6]]}.u//TeXForm \left| 5 x^2-13 x+5\right| =6 ...


5

It's a bug in TeXForm. It shows up when there are exponents in the argument for Abs[], suggesting that it adds \left and \right when it thinks it needs to to make the absolute value bars bigger for the exponent, not realizing that Abs[] already generated \left| and \right|. This applies the equation generation, the TeXForm, and a workaround for the bug to ...



Top 50 recent answers are included