Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Superscript and subscript

    Dear Stata users,

    I have a variable with both superscript and subscript. When I wrote both superscripts and subscript for that variable as in the following code, the K is far too apart from the variable 'P'. I'm wondering how to align both the superscript and subscript of 'P' variable so that it looks similar to what I have in the text?

    Code:
    twoway (tsline MA in `i'/`j') (tsline l in `i'/`j'),  tlabel(1970m01(60)2014m12, format(%tmcY))  ytitle("Smoothed {it:P{subscript:TW}{superscript:K}}")  name(MA, replace)
    Any help is much appreciated!

  • #2
    So far as I know, there isn't syntax to do better than what you got. SMCL isn't LaTeX! (Did you try dragging in the Graph Editor?)

    Comment


    • #3
      Hi Nick, many thanks for your reply!

      I tried dragging it but it doesn't seem to work. The superscript is also part of ytitle, so it moves together with the variable name and subscript when I drag the title of the y-axis. Anyway, thanks!

      Comment


      • #4
        I tried the following:

        Code:
        tsline D.y, ytitle("{stSerif:{&Delta}y}")
        graph export Dy.pdf, as(pdf) replace
        The subscript/superscripts does not get translated on to the document (even though it is displayed correctly on the .gph window); instead the PDF document has {fontface "stSymbol":D} in the y-axis title.

        Can someone help?

        Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	9.5 KB
ID:	1502524
        Last edited by Jaya J; 10 Jun 2019, 12:47.

        Comment

        Working...
        X