Processing math: 100%
Ask Your Question
2

how to bold and embiggen variable using latex_name

asked 3 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
3

answered 3 years ago

rburing gravatar image

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

Preview: (hide)
link

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 ( 3 years ago )

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: 3 years ago

Seen: 401 times

Last updated: Jun 09 '21