Message Boards Message Boards

0
|
2191 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Converting the inverse hyperbolic/trig function to TeX

Posted 2 years ago

In Mathematica,the inverse hyperbolic functions are displayed with the prefix "Arc" like "ArcSinh[]", which I thought incorrect and misleading. Since the hyperbolic angle is defined by the area of the hyperbolic triangle rather than the arclength of a sector like the radius angle in trigonometric functions, the more appropriate prefix "Ar" abbreviated for "Area" like "ArSinh" looks much more satisfactory and pleasant to me. As a result, I have defined my own form of inverse hyperbolic functions as below (To save space, only take the ArSinh[] as an example):

1.Make any result including inverse hyperbolic functions display in the way I prefer:

Unprotect[ArcSinh];MakeBoxes[ArcSinh[x_], fmt_] := MakeBoxes[ArSinh[x], fmt];

2.Make my input including inverse hyperbolic functions passed to the system in the default and original way so that the system can evaluate them correctly instead of being strange to them and returning them unchanged:

$PreRead =# /. {"ArSinh" -> "ArcSinh"}&

The 2 steps above work perfectly so far. But then I encountered my puzzle:how can I make the Mathematica convert the inverse hyperbolic function I defined to TeXForm the way I prefer?

Currently, Mathematica converts the ArSinh[x] to TeXForm as "\text{ArSinh}\left(x\right)" i.e. $\text{ArSinh}\left(x\right)$ which is not canonical in LaTex. I would like Mathematica to convert the ArSinh[x] to TeXForm as "\sinh^{-1}(x)" i.e. $\sinh^{-1}(x)$ or"\text{arsinh}(x)"i.e. $\text{arsinh}(x)$ .

Moreover, preset built-in rules to convert inverse trigonometric functions to TeXForm are converting them to the form of the -1 power of the original function name like ArcTan[x]→$\tan^{-1}(x) $, which might be ambiguous in some way. I would like to define my own rule to convert the inverse trigonometric functions as arc+the original function name like "\arctan(x)"i.e. $\arctan(x) $ or "\text{arctan}(x)"i.e. $\text{arctan}(x)$.

I hope the way to achieve those above works well when I right click->copy as->LaTeX as well as save the notebook in TeX format entirely.

I also posted this question on Mathematica Stack Exchange 14 hours ago([How can I convert the inverse hyperbolic function I defined and built-in inverse trig functions to TeXForm the way I prefer? ][1]), but so far only got an answer that works when the TeXForm[] function is employed, but under the two circumstances I mentioned above, it simply does not work.

Is there any good way to realize those goals?

POSTED BY: Albert Lew
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract