Announcement

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

  • Special characters in graph title

    Dear statalisters,

    I would appreciate your advice on the inclusion of special characters in the graph of a title. I am trying to use notation that is consistent with the body of an article that is written in LaTeX. I would like to include the latex expression $\overline{r}^{FC}_{t,t+1}$. So far, after about 2 hours of research on special characters in graph title, I have found that:
    i) I can create the overline part separately with "local overline = char(175)";
    ii) I can insert "`overline'r{superscript:FC}{subscript:t,t+1}" in the title of my graph.

    It is still not satisfactory, since the overline/macron is not above the r, and the superscript and subscript appear sequentially, instead of stacked.

    Any advice will be greatly appreciated.

    Thank you,

    Max

  • #2
    The reason that you got no response probably is that nobody has a solution for you. It probably cannot be done in Stata's graphics.

    Comment


    • #3
      I think Svend is right. You can insert characters using calls to char() or equivalently {c #} and you can insert special characters, including superscripts and subscripts, as documented, but Stata does not purport to offer TeX or LaTeX support. I'd name the beast on the graph and use the notation in your text caption.

      Comment


      • #4
        Agreed. Earlier today, I tried using a trick that I used to use with Microsoft's Word years ago in order to produce a macron over a letter, which was to create a "field" that contained (in order) the letter, a backspace character (ANSI code decimal 008) and the code for a macron. When the "field" is evaluated, the backspace character moves the cursor back to the position of the character before the macron is rendered. It didn't work when trying to the same thing in Stata's graph title--it produces some ugly DOS-like placeholder character for the nonprinting backspace instead of moving the cursor back one space..

        About the only thing that I could suggest, other than reiterating Nick's suggestion, is to create a text box in Stata's Graph Editor to contain the macron, and position the text box over the "r" with your mouse so that the overlaid macron is centered over the "r". You can use the recorder function to save the actions to a script file in case you have to produce many graphs with the same title.

        Comment


        • #5
          Thanks all. I appreciate your suggestions Joseph. I'll give it a try.

          Comment


          • #6
            Hi Joseph, the "add text tool" of the graph editor, with the macron produced by inserting "{c 175}" in the textbox, and moving the macron around with the "select tool" was a good trick . Similarly, if a superscipt is already added to a variable (say {it:r}), one can insert a stacked subscript by using the text box and producing the subscript with "{subscript: t, t+1}". It requires some playing around, because things can get out of alignment somewhere along the chain of saving the graph as an .eps file and getting the final ouput in LaTeX, but I got want I wanted at the end.

            Comment

            Working...
            X