Announcement

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

  • chars in smcl disappears?

    Hey Stata users,

    I got a problem with the smcl. When I'm in paragraph mode and when the paragraph is a bit long, I would lose some characters, so {pstd}hello world{p_end} would read "hel world". Anyone has a clue of why this is happening?

  • #2
    I don't know why this is happening, but I confirm this is happening.
    Here is a link to the .hlp file I was preparing: http://radyakin.org/statalist/statab...aViewerBug.hlp
    And this is how it was rendered:





    The file is marked June 2013 still prior to Stata 13 so this has to be rendering from Stata 12/Windows. The problem disappeared after a few edits to the file and refreshing the help window, but it did occur quite consistently to make me do a screenshot and backing up the help file.

    Hope this helps tracking the problem. (the problem might be my careless smcl formatting of course, but the visual result is quite worrisome).

    Best, Sergiy Radyakin

    PS: the exi3 program is of course available: http://www.radyakin.org/statalist/2013080602/exi3.htm
    Attached Files

    Comment


    • #3
      Originally posted by Sergiy Radyakin View Post
      I don't know why this is happening, but I confirm this is happening.
      Here is a link to the .hlp file I was preparing: http://radyakin.org/statalist/statab...aViewerBug.hlp
      And this is how it was rendered:





      The file is marked June 2013 still prior to Stata 13 so this has to be rendering from Stata 12/Windows. The problem disappeared after a few edits to the file and refreshing the help window, but it did occur quite consistently to make me do a screenshot and backing up the help file.

      Hope this helps tracking the problem. (the problem might be my careless smcl formatting of course, but the visual result is quite worrisome).

      Best, Sergiy Radyakin

      PS: the exi3 program is of course available: http://www.radyakin.org/statalist/2013080602/exi3.htm
      Hi Sergiy,

      I noticed that if you put several carriage returns in the paragraph then it disappears:

      {pstd}
      hello
      world
      {p_end}

      will do but then there is a chance that you get "hello world" (2 white spaces) in the viewer...

      (why not Stata just use html for example...)

      Comment


      • #4
        We need to know about the input as well as the output. In the past I've noticed that SMCL doesn't accept arbitrarily long lines, but I don't remember reading of a documented limit.

        Comment


        • #5
          The question about HTML is longstanding. In essence, Stata emits non-graphical output line-by-line and with fixed-width fonts, so many of the assumptions and flexibilities behind HTML can't apply.

          Comment


          • #6
            Originally posted by Nick Cox View Post
            We need to know about the input as well as the output.
            Nick, the original input file, with which the screenshot was taken is linked in my post. Sergiy

            Comment


            • #7
              No doubt, but a lot easier just to show us the offending code. You mean I have to click on a link, open something, look for something?

              Comment


              • #8
                Originally posted by Nick Cox View Post
                The question about HTML is longstanding. In essence, Stata emits non-graphical output line-by-line and with fixed-width fonts, so many of the assumptions and flexibilities behind HTML can't apply.
                Text mode limitation is fine. There are a few text-only browsers for the real world. The question is really about the smcl, why create another markup language in addition to HTML, TeX?
                Most people would be perfectly fine if Stata supported a subset of HTML with clear-cut restrictions like no jscript/vbscript, no forms, no CSS (although why no CSS?! we love CSS!)

                It's probably not too late to introduce {html} mode in {smcl}!

                Best, Sergiy


                Comment


                • #9
                  There are answers to Why SMCL? on several different levels, or so I guess.

                  One is that StataCorp didn't want to be subject to some external standard that might change, or to adopt a subset of some existing standard arbitrarily.

                  There is undocumented conversion in Stata from SMCL to HTML exploited by log2html (SSC).

                  Comment


                  • #10
                    Originally posted by yellowlm View Post
                    I got a problem with the smcl. When I'm in paragraph mode and when the paragraph is a bit long, I would lose some characters, so {pstd}hello world{p_end} would read "hel world". Anyone has a clue of why this is happening?
                    Dear yellowlm, could you please confirm that you observe the bug happening with exactly the code fragment that you are showing, or the text was similar, but not exactly the same? I now have a reliable replicate of this bug, but my guess is that it is not applicable for the text you quoted. Thank you, Sergiy

                    Comment

                    Working...
                    X