Skip to content

Commit 8dce5aa

Browse files
authored
Merge pull request sympy#19235 from eric-wieser/include-hyperbolic-in-inv_trig
Respect `inv_trig_style` in inverse hyperbolic trig functions
2 parents 15fb498 + fed2f37 commit 8dce5aa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

sympy/printing/latex.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,12 @@ def _print_Function(self, expr, exp=None):
851851
len(args) == 1 and \
852852
not self._needs_function_brackets(expr.args[0])
853853

854-
inv_trig_table = ["asin", "acos", "atan", "acsc", "asec", "acot"]
854+
inv_trig_table = [
855+
"asin", "acos", "atan",
856+
"acsc", "asec", "acot",
857+
"asinh", "acosh", "atanh",
858+
"acsch", "asech", "acoth",
859+
]
855860

856861
# If the function is an inverse trig function, handle the style
857862
if func in inv_trig_table:

sympy/printing/tests/test_latex.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
Lambda, LaplaceTransform, Limit, Matrix, Max, MellinTransform, Min, Mul,
99
Order, Piecewise, Poly, ring, field, ZZ, Pow, Product, Range, Rational,
1010
RisingFactorial, rootof, RootSum, S, Shi, Si, SineTransform, Subs,
11-
Sum, Symbol, ImageSet, Tuple, Ynm, Znm, arg, asin, acsc, Mod,
11+
Sum, Symbol, ImageSet, Tuple, Ynm, Znm, arg, asin, acsc, asinh, Mod,
1212
assoc_laguerre, assoc_legendre, beta, binomial, catalan, ceiling,
1313
chebyshevt, chebyshevu, conjugate, cot, coth, diff, dirichlet_eta, euler,
1414
exp, expint, factorial, factorial2, floor, gamma, gegenbauer, hermite,
@@ -379,6 +379,8 @@ def test_latex_functions():
379379
r"\sin^{-1} {x^{2}}"
380380
assert latex(acsc(x), inv_trig_style="full") == \
381381
r"\operatorname{arccsc}{\left(x \right)}"
382+
assert latex(asinh(x), inv_trig_style="full") == \
383+
r"\operatorname{arcsinh}{\left(x \right)}"
382384

383385
assert latex(factorial(k)) == r"k!"
384386
assert latex(factorial(-k)) == r"\left(- k\right)!"

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy