#4499: [with patch, needs review] Fix latex for sech and csch
---------------------+------------------------------------------------------
Reporter: mhansen | Owner: mhansen
Type: defect | Status: assigned
Priority: minor | Milestone: sage-3.2
Component: misc | Resolution:
Keywords: |
---------------------+------------------------------------------------------
Comment (by mvngu):
I'm using sage-3.1.4 here, so I can't say anything about applying this
patch against the latest alpha release of sage-3.2. Perhaps other folks
can review the patch using the latest alpha release. Before applying the
patch '''trac_4499.patch''' against sage-3.1.4, we'd get these:
{{{
sage: # sech and arcsech
sage: sech._latex_()
'\\sech'
sage: asech._latex_()
'\\sech^{-1}'
sage: arcsech._latex_()
'\\sech^{-1}'
sage: latex(sech)
\sech
sage: latex(asech)
\sech^{-1}
sage: latex(arcsech)
\sech^{-1}
sage:
sage: # csch and arccsch
sage: csch._latex_()
'\\csch'
sage: acsch._latex_()
'\\csch^{-1}'
sage: arccsch._latex_()
'\\csch^{-1}'
sage: latex(csch)
\csch
sage: latex(acsch)
\csch^{-1}
sage: latex(arccsch)
\csch^{-1}
}}}
As far as I know, the returned LaTeX strings would cause tex-live to go
berserk and complain about "Undefined control sequence" even if we compile
with or without the macro {{{\usepackage{amsmath,amssymb,amsthm}}}} in the
preamble of a .tex file.
[[BR]][[BR]]
After applying the patch against sage-3.1.4, we get these:
{{{
sage: # sech and arcsech
sage: sech._latex_()
'\\text{sech}'
sage: asech._latex_()
'\\text{sech}^{-1}'
sage: arcsech._latex_()
'\\text{sech}^{-1}'
sage: latex(sech)
\text{sech}
sage: latex(asech)
\text{sech}^{-1}
sage: latex(arcsech)
\text{sech}^{-1}
sage:
sage: # csch and arccsch
sage: csch._latex_()
'\\text{csch}'
sage: acsch._latex_()
'\\text{csch}^{-1}'
sage: arccsch._latex_()
'\\text{csch}^{-1}'
sage:
sage: latex(csch)
\text{csch}
sage: latex(acsch)
\text{csch}^{-1}
sage: latex(arccsch)
\text{csch}^{-1}
}}}
The returned LaTeX strings now look reasonable to me and work as expected
when embedded within math mode and using the macro
{{{\usepackage{amsmath}}}}.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4499#comment:2>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---