Ask Your Question
2

how to bold and embiggen variable using latex_name

asked 2021-06-09 23:00:51 +0100

enthor gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-06-09 23:28:37 +0100

rburing gravatar image

You can define P = var('P', latex_name=r'\pmb{\mathscr{P}}'), which displays as $\pmb{\mathscr{P}}$.

edit flag offensive delete link more

Comments

1

OK! 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 :-)

enthor gravatar imageenthor ( 2021-06-10 02:19:49 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-06-09 23:00:51 +0100

Seen: 361 times

Last updated: Jun 09 '21