0
$\begingroup$

When I have an equation like (example)...

enter image description here

...I can derived it and turn it into TeXForm afterwards (that is what I want). Therefore, I might want to additionaly display it as an equation - as described in the last lines. Thus, I have to use HoldForm since I do not want to evaluate but just want to display it. Here, the operation that I want to show in $\LaTeX$ is an derivation and implicite definition.

If I have more parameters then $(x,y,z)$ it might come in handy to use a list varlist to store my variables and then derive the function considering another variable during each iteration. Thus, I take varlist[[i]] as my argument for the derivation of $f$. Obviously, $i$ is my loop variable. The exact same derivative of $f$ - considering $x$ in this case - should be expressed through...

enter image description here

But as you can see, the list's name and $i$ as an argument are kept and the list is not evaluated at position $i$ so that $x$ does not appear in my final TeXForm. How to evaluate my list correctly while HoldForm is active?

$\endgroup$
1
  • 2
    $\begingroup$ People here generally like users to post code as Mathematica code instead of just images or TeX, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. You may find this meta Q&A helpful $\endgroup$
    – Michael E2
    May 27, 2019 at 17:33

1 Answer 1

2
$\begingroup$

Something like this should work:

With[{i = varlist[[1]]},
   TeXForm[HoldForm[D[f[x, y, z], x] = i]]
]

With holds all of the functions, searches through them, and replaces them before evaluating anything, and can therefore bypass HoldForm.

$\endgroup$

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.