Announcement

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

  • syntax highlighting in Stata do-file editor?

    I am using Stata (search) texdoc command to compile a LaTeX file with Stata output. Because the file contains both LaTeX and Stata formats, I wonder if I can use different highlighting in the (default) do-file editor. As is known, anything in the /* and */ appears in green. Can I set up a different color in the (texdos command) /*tex and tex*/ in the Stata do-file editor?
    Ho-Chuan (River) Huang
    Stata 19.0, MP(4)

  • #2
    I'm working on a Windows system, but I imagine the same sequence will work in Mac and Unix.

    Open the do-file editor. Open the Edit drop-down menu and select Preferences. Then click on the Syntax highlighting tab. From there select whatever things you want to change and make the corresponding changes.

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      I'm working on a Windows system, but I imagine the same sequence will work in Mac and Unix.

      Open the do-file editor. Open the Edit drop-down menu and select Preferences. Then click on the Syntax highlighting tab. From there select whatever things you want to change and make the corresponding changes.
      Dear Clyde: Following your suggestion, I find there are nine attributes. But, my question is how to tell Stata's do-file editor to change color (that I can select) of something whenever it encounters
      Code:
      /*tex
      something here
      tex*/
      or other color of "other thing here" if it encounters
      Code:
      texdoc stlog
      other thing here
      texdoc stlog close
      Ho-Chuan (River) Huang
      Stata 19.0, MP(4)

      Comment


      • #4
        I would be very surprised if that were supported.

        Is there any text editor that allows multiple syntax highlighting for a given file at a given time? That would be impressive -- and potentially confusing too.

        Personally I wouldn't want Stata's developers to be adding such features when there are so many more important priorities.

        Comment


        • #5
          Originally posted by Nick Cox View Post
          I would be very surprised if that were supported.

          Is there any text editor that allows multiple syntax highlighting for a given file at a given time? That would be impressive -- and potentially confusing too.

          Personally I wouldn't want Stata's developers to be adding such features when there are so many more important priorities.
          Dear Nick, I see and (mostly) agree with your point. However, for those who need this function, an option is favorable. And I expect it should be straightforward to allow for such functionality.
          Ho-Chuan (River) Huang
          Stata 19.0, MP(4)

          Comment

          Working...
          X