This question asked about setting the output of tex1
for a numerical fraction (i.e. x
where ratnump(x) = true
); however, this does not seem to cover all objects that are printed as a fraction, e.g. 1/x
or diff(ln(x),x))
.
Following this answer, I tried using :lisp $x
to query the lisp form, and I get ((MEXPT SIMP) $X -1)
for 1/x
and ((%DERIVATIVE SIMP) (($LN SIMP) $X) $X 1)
for diff(ln(x),x)
; however, I have no idea how to use this info with texput
to specify the desired formatting.
Although I don't think it is necessarily relevant to the question, I wanted to call on a different LaTeX function, instead of \frac
(e.g. \tfrac
).