ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 07 Aug 2011 01:49:11 -0500Extra curly braces in latex() command?http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/Hi,
I am trying to copy latex code generated by Sage to Lyx. It seems Sage generates additional curly braces around (). For example, with:
sage: latex((alpha^2-alpha)*theta)
I get:
{\left(\alpha^{2} - \alpha\right)} \theta
If I paste this code to Lyx math, then there are unnecessary {} around the () showing.
Maybe it's LyX's problem since if I paste it to an .tex source and compile it then it does not show. However I already have a long document in LyX so it would be great if there is any way to get rid of {}.
Thank you!Wed, 03 Aug 2011 05:25:55 -0500http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/Comment by joon for <p>Hi,</p>
<p>I am trying to copy latex code generated by Sage to Lyx. It seems Sage generates additional curly braces around (). For example, with:</p>
<pre><code>sage: latex((alpha^2-alpha)*theta)
</code></pre>
<p>I get:</p>
<pre><code>{\left(\alpha^{2} - \alpha\right)} \theta
</code></pre>
<p>If I paste this code to Lyx math, then there are unnecessary {} around the () showing.
Maybe it's LyX's problem since if I paste it to an .tex source and compile it then it does not show. However I already have a long document in LyX so it would be great if there is any way to get rid of {}.</p>
<p>Thank you!</p>
http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21410#post-id-21410@parzan I actually was not aware of this preview thing in lyx. Thanks for the tip!Sat, 06 Aug 2011 18:58:12 -0500http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21410#post-id-21410Comment by parzan for <p>Hi,</p>
<p>I am trying to copy latex code generated by Sage to Lyx. It seems Sage generates additional curly braces around (). For example, with:</p>
<pre><code>sage: latex((alpha^2-alpha)*theta)
</code></pre>
<p>I get:</p>
<pre><code>{\left(\alpha^{2} - \alpha\right)} \theta
</code></pre>
<p>If I paste this code to Lyx math, then there are unnecessary {} around the () showing.
Maybe it's LyX's problem since if I paste it to an .tex source and compile it then it does not show. However I already have a long document in LyX so it would be great if there is any way to get rid of {}.</p>
<p>Thank you!</p>
http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21419#post-id-21419Correct me if I'm wrong - the braces do not appear in the compiled pdf/dvi, so why do they bother you?Wed, 03 Aug 2011 07:12:21 -0500http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21419#post-id-21419Comment by kcrisman for <p>Hi,</p>
<p>I am trying to copy latex code generated by Sage to Lyx. It seems Sage generates additional curly braces around (). For example, with:</p>
<pre><code>sage: latex((alpha^2-alpha)*theta)
</code></pre>
<p>I get:</p>
<pre><code>{\left(\alpha^{2} - \alpha\right)} \theta
</code></pre>
<p>If I paste this code to Lyx math, then there are unnecessary {} around the () showing.
Maybe it's LyX's problem since if I paste it to an .tex source and compile it then it does not show. However I already have a long document in LyX so it would be great if there is any way to get rid of {}.</p>
<p>Thank you!</p>
http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21416#post-id-21416@parzan - So you are saying that it shows up in the Lyx source code, but the Lyx compiled document does not have them? Wed, 03 Aug 2011 16:48:44 -0500http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21416#post-id-21416Comment by joon for <p>Hi,</p>
<p>I am trying to copy latex code generated by Sage to Lyx. It seems Sage generates additional curly braces around (). For example, with:</p>
<pre><code>sage: latex((alpha^2-alpha)*theta)
</code></pre>
<p>I get:</p>
<pre><code>{\left(\alpha^{2} - \alpha\right)} \theta
</code></pre>
<p>If I paste this code to Lyx math, then there are unnecessary {} around the () showing.
Maybe it's LyX's problem since if I paste it to an .tex source and compile it then it does not show. However I already have a long document in LyX so it would be great if there is any way to get rid of {}.</p>
<p>Thank you!</p>
http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21415#post-id-21415@krisman @parzan is right. I never actually tried to compile it in LyX. I just tried that and the extra braces are not showing in the pdf, even though lyx is showing it.Thu, 04 Aug 2011 17:17:34 -0500http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21415#post-id-21415Comment by parzan for <p>Hi,</p>
<p>I am trying to copy latex code generated by Sage to Lyx. It seems Sage generates additional curly braces around (). For example, with:</p>
<pre><code>sage: latex((alpha^2-alpha)*theta)
</code></pre>
<p>I get:</p>
<pre><code>{\left(\alpha^{2} - \alpha\right)} \theta
</code></pre>
<p>If I paste this code to Lyx math, then there are unnecessary {} around the () showing.
Maybe it's LyX's problem since if I paste it to an .tex source and compile it then it does not show. However I already have a long document in LyX so it would be great if there is any way to get rid of {}.</p>
<p>Thank you!</p>
http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21411#post-id-21411You can see that these braces appear in red in LyX - this means that they only serve as a container. I recommend running LyX with Preview:on (in Pref. -> Look&Feel -> Display) - you then see immediately how the latex compiles (you might need to restart after enabling it).Sat, 06 Aug 2011 01:00:34 -0500http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21411#post-id-21411Comment by kcrisman for <p>Hi,</p>
<p>I am trying to copy latex code generated by Sage to Lyx. It seems Sage generates additional curly braces around (). For example, with:</p>
<pre><code>sage: latex((alpha^2-alpha)*theta)
</code></pre>
<p>I get:</p>
<pre><code>{\left(\alpha^{2} - \alpha\right)} \theta
</code></pre>
<p>If I paste this code to Lyx math, then there are unnecessary {} around the () showing.
Maybe it's LyX's problem since if I paste it to an .tex source and compile it then it does not show. However I already have a long document in LyX so it would be great if there is any way to get rid of {}.</p>
<p>Thank you!</p>
http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21420#post-id-21420I think you may be right about it being LyX's problem. We recently removed something like this for multiplication (see http://trac.sagemath.org/sage_trac/ticket/11415), not sure whether removing this would break something else.Wed, 03 Aug 2011 06:07:16 -0500http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21420#post-id-21420Comment by parzan for <p>Hi,</p>
<p>I am trying to copy latex code generated by Sage to Lyx. It seems Sage generates additional curly braces around (). For example, with:</p>
<pre><code>sage: latex((alpha^2-alpha)*theta)
</code></pre>
<p>I get:</p>
<pre><code>{\left(\alpha^{2} - \alpha\right)} \theta
</code></pre>
<p>If I paste this code to Lyx math, then there are unnecessary {} around the () showing.
Maybe it's LyX's problem since if I paste it to an .tex source and compile it then it does not show. However I already have a long document in LyX so it would be great if there is any way to get rid of {}.</p>
<p>Thank you!</p>
http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21409#post-id-21409Glad to helpSun, 07 Aug 2011 01:49:11 -0500http://ask.sagemath.org/question/8257/extra-curly-braces-in-latex-command/?comment=21409#post-id-21409