Announcement

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

  • Stata help file not displayed correctly

    I have written a Stata program and a help file to accompany it. When I ask Stata to view the file, everything looks normal. But when I type help mycommand, individual letters or words are simply not displayed, in seemingly random fashion. For example, the sentence

    The file name for the output files is specified under the name() option.
    becomes

    The file name for the output files is specified e name() option.
    Does anyone have an explanation for this behavior?

  • #2
    You need to show us enough of the help file to allow us to reproduce the problem.

    Comment


    • #3
      I had a similar problem, see for example: https://www.statalist.org/forums/for...mcl-disappears

      From my experience it always helps to add a new line after each sentence. So for example:
      Code:
      {p 4 8} this is just a test and this is the first sentence.
      The 2nd sentence is on a new line, but in the helpfile it will show up on one.{p_end}
      Hope this helps.

      Comment


      • #4
        Hi Jasper,
        I agree with Jan Ditzen. I've also had this problem, and it does seem to be connected with lines in the (smcl-coded) help file being "too long" in some way. Like Jan, I get around this by adding line-returns in convenient places, such as at the ends of sentences. Note that this should not have any effect on what is outputted when viewing the file using help [command].
        David.

        Comment


        • #5
          Jan makes a good point. SMCL can't digest very long lines. I was bitten by this a few times but since I prefer to have lines within 72 characters it doesn't bite often. I can't recall this being documented, but a source would be welcome.

          Comment


          • #6
            Originally posted by David Fisher View Post
            Like Jan, I get around this by adding line-returns in convenient places, such as at the ends of sentences. Note that this should not have any effect on what is outputted when viewing the file using help [command].
            Yet, it does make a difference. A line break after a period causes the viewer to add an extra space between the two sentences. Like Nick, I try to keep my lines (code or SMCL) within the limits of 80 characters.

            Best
            Daniel

            Comment


            • #7
              Jan was right, long lines were the source of the problem. Thanks, everyone!

              Comment

              Working...
              X