Announcement

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

  • Inconsistent Display Using View and Help

    Hello friends!

    I got an issue when writing a help file (.sthlp) for my ado file. The view command displays perfectly in the viewer window.
    Code:
    view mycmd.sthlp
    Click image for larger version

Name:	see1.png
Views:	1
Size:	14.8 KB
ID:	1564548


    However, the help command displays slightly different in the viewer window. It seems some letters in the original .sthlp file are lost, leading to smcl directive not understood properly.
    Code:
    help mycmd
    Click image for larger version

Name:	see11.png
Views:	1
Size:	22.1 KB
ID:	1564547


    The original smcl code in .sthlp file looks like below. This means "s:Kamstr" is lost.
    Code:
    See {it:{help mycmd##references:Kamstra and Shi,2020}} for more.
    This situation happens in another part of the file where "both the test assets" became "both t assets" when using help.

    Since my intension is to post on SSC, I'm worried that users cannot see the help document properly using help command. Besides, nobody uses view mycmd.sthlp to check help files. Any idea what may cause this? and how to fix it?

    I'm using Stata 16.1 on Mac.
    My mycmd.ado requires version 14;
    I wrote sthlp file in do-editor then saved as .sthlp

    Thank you in advance!
    Cliff






  • #2
    Shorten your long lines by adding line breaks. Although this isn't documented as far as I can tell, lines in .sthlp files should not exceed ~244 characters. When lines are longer than this, spans of text go missing.

    (Apologies for necroing the thread. Posting an answer here for the benefit of people who find this post by searching.)

    Comment

    Working...
    X