11
$\begingroup$

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.

$\endgroup$
8
  • $\begingroup$ @Öskå: My apologies, I believe it is standard in MMA 10, but might not be present in older versions. $\endgroup$ Nov 24, 2014 at 13:29
  • $\begingroup$ @Öskå: Yes, that should work (even with Salmon), but how would it help to form a line with $M_\odot$ as part of it? $\endgroup$ Nov 24, 2014 at 13:34
  • $\begingroup$ Applause, thank you!!! Would you care to combine your two last comments into an answer? $\endgroup$ Nov 24, 2014 at 13:44
  • $\begingroup$ @Öskå: Yes, CircleDog would probably look more like a torus. Otherwise, please do, for it completely answers my question. $\endgroup$ Nov 24, 2014 at 13:47
  • 2
    $\begingroup$ Tested on three platforms. Win: works. Mac: works. Linux: cropped. Tagging as such. @AlexeyBobrick Please do report the problem to WRI. $\endgroup$
    – Szabolcs
    Nov 24, 2014 at 14:01

1 Answer 1

11
$\begingroup$

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

$\endgroup$
3
  • $\begingroup$ Fantastic, thanks again! $\endgroup$ Nov 24, 2014 at 13:50
  • $\begingroup$ 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). $\endgroup$
    – murray
    Nov 24, 2014 at 18:11
  • $\begingroup$ @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. $\endgroup$ Nov 24, 2014 at 22:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.