1
$\begingroup$

I'd like to be able to feed an expression into Mathematica, and have Mathematica convert that expression to TeXForm WITHOUT ANY SIMPLIFICATION WHATSOEVER.

As a trivial example, currently, if I enter

6/9 //TeXForm

MM returns

\frac{2}{3}

I'd like to be able to feed it 6/9 and have it return

\frac{6}{9}

Obviously there are solutions that would effectively involve writing my own parser, but I'm specifically looking for relatively short and clean solutions, if there are any.

$\endgroup$
1

1 Answer 1

6
$\begingroup$

HoldForm is your friend:

6/9 // HoldForm // TeXForm

\frac{6}{9}

$\endgroup$
1
  • $\begingroup$ Lovely, thanks! $\endgroup$
    – Twiffy
    Commented Apr 26, 2014 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.