0
$\begingroup$

I want to write a fraction which contains subscript in a graph. But my code doesn't work.

 Graphics[{Text[
 Style["-Subscript[\[CapitalGamma],r] /v", Large, Bold, White], 
 Automatic, {2.7, 13}]
$\endgroup$

1 Answer 1

1
$\begingroup$

Eliminate the quotation marks (which mean you want the verbatim code), fix the closing bracket and make the text Blue so you can see it:

Graphics[
 Text[Style[-Subscript[\[CapitalGamma], r] /v, Large, Bold, Blue], 
  Automatic, {0, 0}]]

Also... there's no need for Automatic.

This looks much nicer, to my eye:

Graphics[
 Text[Style[ 
   "\!\(\*FractionBox[SubscriptBox[\(\[CapitalGamma]\), \(r\)], \
\(v\)]\)", Large, Bold, Blue, FontFamily -> "Times"], {0, 0}]]
$\endgroup$
6
  • $\begingroup$ How can I multily numerator by x? I tried Graphics[Text[ Style["\!(* FractionBox[ SubscriptBox[([CapitalGamma]), (r)] \ x, (v)])", Large, Bold, Black, FontFamily -> "Times"], {0, 0}]] but it doesn't work $\endgroup$ Commented Sep 28, 2017 at 17:08
  • $\begingroup$ Graphics[Text[ Style["\!\(\* FractionBox[SubscriptBox[\(x \[CapitalGamma]\), \ \(r\)], \(v\)]\)", Large, Bold, Blue, FontFamily -> "Times"], {0, 0}]] $\endgroup$ Commented Sep 28, 2017 at 17:12
  • $\begingroup$ Sorry, but another question, is it possible to write your previous comment with gamma ^2_r? $\endgroup$ Commented Sep 28, 2017 at 17:31
  • 1
    $\begingroup$ Why switch from expressions to strings? Just -x Subscript[Γ, r] /v would be a lot easier to comprehend. $\endgroup$
    – Carl Woll
    Commented Sep 28, 2017 at 18:04
  • $\begingroup$ @AlbertNestler -x Subsuperscript[Γ, r, 2]/v would work. $\endgroup$
    – Carl Woll
    Commented Sep 28, 2017 at 18:06

Your Answer

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

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