ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 10 Jun 2021 02:19:49 +0200how to bold and embiggen variable using latex_namehttps://ask.sagemath.org/question/57515/how-to-bold-and-embiggen-variable-using-latex_name/ I am attempting to recreate variables and expressions from an academic paper.
I would like to be able to calculate with the variables/expressions and to typeset
them using Latex.
Here is what is working in Command-Line, CoCalc, jupyter notebook but not SageMath Cell (which
just show a blank after evaluation):
P = var('P', latex_name='\mathscr{P}'); view(P)
An uppercase cursive/script P is shown.
If I try to em-bold it, like so:
P = var('P', latex_name='\bold\mathscr{P}'); view(P)
Then:
1) Command line SageMath produces about 200 lines of error message beginning with:
An error occurred.
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex 2021.6.3) 9 JUN 2021 13:50
...
2) SageMath cell server -- using doubled '\\'s -- again, produces blanks after evaluation
3) CoCalc -- again, using doubled '\\'s -- outputs "\bold" followed by a properly typeset cursive-script uppercase P
4) jupyter notebook produces 200+ error message lines beginning with:
An error occurred.
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex 2021.6.3) 9 JUN 2021 13:56
So...it may well be that using the MacOS 9.3.rc4 has issues, or that I have failed to properly install MacTex
but CoCalc should work -- if only I input the correct argument.
I apologize if this is/seems like a RTFM situation.
Wed, 09 Jun 2021 23:00:51 +0200https://ask.sagemath.org/question/57515/how-to-bold-and-embiggen-variable-using-latex_name/Answer by rburing for <p>I am attempting to recreate variables and expressions from an academic paper.
I would like to be able to calculate with the variables/expressions and to typeset
them using Latex.</p>
<p>Here is what is working in Command-Line, CoCalc, jupyter notebook but not SageMath Cell (which
just show a blank after evaluation):</p>
<p>P = var('P', latex_name='\mathscr{P}'); view(P)</p>
<p>An uppercase cursive/script P is shown.</p>
<p>If I try to em-bold it, like so:</p>
<p>P = var('P', latex_name='\bold\mathscr{P}'); view(P)</p>
<p>Then:</p>
<p>1) Command line SageMath produces about 200 lines of error message beginning with:</p>
<p>An error occurred.
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex 2021.6.3) 9 JUN 2021 13:50</p>
<p>...</p>
<p>2) SageMath cell server -- using doubled '\'s -- again, produces blanks after evaluation</p>
<p>3) CoCalc -- again, using doubled '\'s -- outputs "\bold" followed by a properly typeset cursive-script uppercase P</p>
<p>4) jupyter notebook produces 200+ error message lines beginning with:</p>
<p>An error occurred.
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex 2021.6.3) 9 JUN 2021 13:56</p>
<p>So...it may well be that using the MacOS 9.3.rc4 has issues, or that I have failed to properly install MacTex
but CoCalc should work -- if only I input the correct argument.</p>
<p>I apologize if this is/seems like a RTFM situation. </p>
https://ask.sagemath.org/question/57515/how-to-bold-and-embiggen-variable-using-latex_name/?answer=57518#post-id-57518You can define `P = var('P', latex_name=r'\pmb{\mathscr{P}}')`, which displays as $\pmb{\mathscr{P}}$.Wed, 09 Jun 2021 23:28:37 +0200https://ask.sagemath.org/question/57515/how-to-bold-and-embiggen-variable-using-latex_name/?answer=57518#post-id-57518Comment by enthor for <p>You can define <code>P = var('P', latex_name=r'\pmb{\mathscr{P}}')</code>, which displays as $\pmb{\mathscr{P}}$.</p>
https://ask.sagemath.org/question/57515/how-to-bold-and-embiggen-variable-using-latex_name/?comment=57521#post-id-57521OK! Thanks. I see my error. And I should be able to figure out how to embiggen.
This has been a trying day, like drilling a hole in concrete using a toothpick. But
good, since I didn't flake out :-)Thu, 10 Jun 2021 02:19:49 +0200https://ask.sagemath.org/question/57515/how-to-bold-and-embiggen-variable-using-latex_name/?comment=57521#post-id-57521