11

Preamble:

In some applications (astronomy, cosmology, etc), it is useful to measure things in solar quantities, say distances in $R_\odot$ or masses in $M_\odot$, and so on. Now and then I see Mathematica plots in respected papers, failing to display the symbol $\odot$ properly.

What happens:

In Mathematica the symbol is called \[CircleDot]. So, I write (it looks somewhat better in the cell):

Style["\!\(\*SubscriptBox[\(M\), \(\[CircleDot]\)]\)"] // TraditionalForm

enter image description here

As one can see, the symbol is cropped, and it is worrying.

Half of the solution:

Use ScriptBaseLineShifts, for example

Style["\!\(\*SubscriptBox[\(M\), \(\[CircleDot]\)]\)", 
  {ScriptBaselineShifts -> {-0.15}}] // TraditionalForm

enter image description here

However, this affects other indices, consider:

enter image description here (Method 1, cropped)

versus

enter image description here (Method 2, other indices affected).

Question:

How to make a nice looking $\mathrm{log_{10} M/M_{\odot}}$ in Mathematica in Style framework?

I couldn't find an analogue of StringJoin for Style expressions, and neither could I find a way to move indices around without using Style options (which one typically needs in the end anyway).


I am under Ubuntu 14, MMA 10, and was observed in older Mathematica version too.

Szabolcs
  • 234,956
  • 30
  • 623
  • 1,263
Alexey Bobrick
  • 1,652
  • 1
  • 14
  • 23

1 Answers1

11

The circle is not cropped when used in a Subscript:

Subscript["M", "⊙"]

Mathematica graphics

Thus, by using this answer you can easily do:

str = "This is some text with a CircleDot: " <> 
  ToString[Subscript["M", "⊙"], FormatType -> StandardForm]

Mathematica graphics

If you want some Style:

Style[str, Red, 20]

Mathematica graphics

Öskå
  • 8,587
  • 4
  • 30
  • 49
  • Fantastic, thanks again! – Alexey Bobrick Nov 24 '14 at 13:50
  • I don't understand the problem: I had no difficulty in getting the circle-dot subscript as a subscript on a character M, whether in an Input cell or an in-line math within a Text cell, simply by typing M Ctrl+_ Esc c. Esc Ctrl+space (where "+" indicates holding down two keys at once). – murray Nov 24 '14 at 18:11
  • @murray, the problem is version-dependent - occurs only in linux, plus see the example line in the question. I used Typesetting->Subscript in the menu. – Alexey Bobrick Nov 24 '14 at 22:32