<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 76: latex will not render for exponents of asin, acos, atan</title><link>https://sourceforge.net/p/stack/bugs/76/</link><description>Recent changes to 76: latex will not render for exponents of asin, acos, atan</description><atom:link href="https://sourceforge.net/p/stack/bugs/76/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 27 Feb 2012 05:40:34 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/stack/bugs/76/feed.rss" rel="self" type="application/rss+xml"/><item><title>latex will not render for exponents of asin, acos, atan</title><link>https://sourceforge.net/p/stack/bugs/76/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The problem is with the latex that is generated, it is the same for asin, acos, and atan. For example (asin(x))^3 is rendered as sin^{-1]^3(x) which causes problems due to the double exponent. One possibile fix would be to simply represent sin^{-1} as arcsin. I do not pretend to know your source code very well but I did manage to implement this by changing the file displayCASText to be:&lt;br /&gt;
else // Assume STACK returns raw LaTeX for subsequent processing, e.g. with JSMath.&lt;br /&gt;
{&lt;br /&gt;
$this-&amp;gt;strin = $str-&amp;gt;wrapAround();&lt;br /&gt;
$this-&amp;gt;captureFeedbackTags();&lt;br /&gt;
$this-&amp;gt;capturePRTFeedbackTags();&lt;br /&gt;
$this-&amp;gt;applyFilters();&lt;br /&gt;
$this-&amp;gt;restoreLatexValues();&lt;br /&gt;
$this-&amp;gt;insertPlaceHolders();&lt;br /&gt;
$this-&amp;gt;strin = str_replace('$ !html[','!html[',$this-&amp;gt;strin); //another modification. Stops &amp;lt;html&amp;gt; tags from being given $ tags and therefore breaking tth&lt;br /&gt;
$this-&amp;gt;strin = str_replace(']! $',']!',$this-&amp;gt;strin); //bug occurs when maxima returns &amp;lt;html&amp;gt;tags in output, eg plots or div by 0 errors&lt;br /&gt;
$this-&amp;gt; JSMath_LaTeXtoHTML();&lt;br /&gt;
//BEGIN CHANGE&lt;br /&gt;
$trigin = array("sin^{-1}", "cos^{-1}", "tan^{-1}");&lt;br /&gt;
$trigout = array("arcsin", "arccos", "arctan");&lt;br /&gt;
$this-&amp;gt;mathmlString = str_replace($trigin, $trigout, $this-&amp;gt;strin);&lt;br /&gt;
//END CHANGE&lt;br /&gt;
$this-&amp;gt;mathmlString =  $this-&amp;gt;strin;&lt;/p&gt;
&lt;p&gt;$this-&amp;gt;restoreHTML();&lt;br /&gt;
$this-&amp;gt;restoreFeedback();&lt;br /&gt;
$this-&amp;gt;restorePRTFeedback();&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 27 Feb 2012 05:40:34 -0000</pubDate><guid>https://sourceforge.netba56df93d1c8f46190d27d5b28ceebe03fda005a</guid></item></channel></rss>