6
$\begingroup$

In the Wolfram Documentation page for \ℓ, there are two formats for the script letter shown. How can I select the first format, which looks more like "\ell" symbol in latex? For instance, I have the following input:

Graphics[{Text[Style[Subscript[ℓ, 2], FontSize -> 20], {1/6, 1/30}]}]

the output appears as

enter image description here

I get the same output if I use:

Graphics[{Text[
   Style[ToExpression["\\ell_{2}", TeXForm], FontSize -> 20], {1/6, 1/30}]}]

I've been playing around with various formatting options but haven't figured it out. How can I get Mathematica to output the curlier version of ?

$\endgroup$
4
  • $\begingroup$ I see this on my machine (OS X): i.stack.imgur.com/GLKwl.png This is also the second format shown on my machine on the doc page. $\endgroup$
    – Szabolcs
    Feb 3, 2017 at 15:06
  • $\begingroup$ Instead of ToExpression["\ell", TeXForm] you should use ToExpression["\\ell", TeXForm]. It is important to double the ``, even though it works in this case. Of course this makes absolutely no difference to your question. $\endgroup$
    – Szabolcs
    Feb 3, 2017 at 15:07
  • $\begingroup$ You can use TraditionalForm to select the first form ... TraditionalForm@Style[\[ScriptL], FontSize -> 64] $\endgroup$
    – Szabolcs
    Feb 3, 2017 at 15:09
  • $\begingroup$ @Szabolcs Thanks. I do see the correct formatting if I Input Subscript[[ScriptL], 2] by itself. Perhaps the issue may be what happens within Graphics. In my ToExpression, I do have the extra backslash, however, it looks like it ran away during copy/paste. $\endgroup$ Feb 3, 2017 at 15:15

1 Answer 1

6
$\begingroup$

In v10.1.0 under Windows 7 x64:

Graphics[{Text @ Style[Subscript[\[ScriptL], 2], FontSize -> 30, FontFamily -> #]}, 
   ImageSize -> 50] & /@ {"Times", "Arial", "Mathematica1"}

enter image description here

Terser and possibly safer code using styles from the core stylesheet:

Graphics[{Text @ Style[Subscript[\[ScriptL], 2], 30, #]}, 
   ImageSize -> 50] & /@ {"TR", "SR", "MR", "MB"}

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Perfect. The "TR" font is exactly what I'm looking for. Thanks! $\endgroup$ Feb 3, 2017 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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