Skip to main content
1-Visitor
August 18, 2010
Question

Arbortext 5.4 displays linebreaks from SGML

  • August 18, 2010
  • 11 replies
  • 2161 views

We recently migrated from 4.3.1 to 5.4. On 4.3.1, the editor did not acknowledge line breaks in the SGML, which is how an SGML editor is supposed to behave. On 5.4, however, line endings in the SGML are recognized and displayed on screen. This makes it very difficult for the authors to search on phrases.

Any ideas? Thank you.

    11 replies

    August 18, 2010
    You could run a quick ACL script to do read the file, do a Perl-chop on
    the lines, and write them back into another file. The chop(var,len)
    removes the number of specified chars (1 by default) from the end of a
    var, good for removing newline characters.



    old=open(sgmlfile,'r')

    new=open(sgmlotherfile,'w')



    while(getline(old,line)) {

    chop(line,1)

    put(new,line)

    }

    Close(new)

    Close(old)






    1-Visitor
    August 18, 2010
    This may be related to a new environment varaible that controls how
    whaitespace is handled. In older releases Arbortext showed all the
    whitespace if you pretty printed your document. Not sure what it might do
    for the search functionality. I think this is showspaces


    I see there is a shownewlines toggle as well

    ..dan
    > You could run a quick ACL script to do read the file, do a Perl-chop on
    > the lines, and write them back into another file. The chop(var,len)
    > removes the number of specified chars (1 by default) from the end of a
    > var, good for removing newline characters.
    >
    >
    >
    > old=open(sgmlfile,'r')
    >
    > new=open(sgmlotherfile,'w')
    >
    >
    >
    > while(getline(old,line)) {
    >
    > chop(line,1)
    >
    > put(new,line)
    >
    > }
    >
    > Close(new)
    >
    > Close(old)
    >
    >
    >
    >
    >
    >
    >
    1-Visitor
    August 18, 2010
    Or, you could just set 'outputrecordlength' to 'Infinity' and save the file. No carriage returns.

    Setting is found by going to Tools -> Preferences and clicking the "Advanced" button. List is alphabetical.

    HTH,
    Steve Thompson
    +1(316)977-0515
    When the only tool you have is a hammer,
    Everything looks like a hard disk...
    1-Visitor
    August 18, 2010


    Thanks, Steve. Unfortunately, that had no effect--the line endings in the SGML still are being honored in the editor. I consider this a bug and I am submitting it to PTC. Thanks for taking the time to reply--sounded to me like it would work.

    DebraLee


    In Reply to Steve Thompson:

    Or, you could just set 'outputrecordlength' to 'Infinity' and save the file. No carriage returns.

    Setting is found by going to Tools -> Preferences and clicking the "Advanced" button. List is alphabetical.

    HTH,
    Steve Thompson
    +1(316)977-0515
    When the only tool you have is a hammer,
    Everything looks like a hard disk...
    1-Visitor
    August 18, 2010
    Thanks, Dan. I played around with the variables, but made no progress. thanks for responding.
    1-Visitor
    August 18, 2010
    Thanks, Jason. I want to exhaust all other approaches before I resort to a programming solution to what I believe is a bug, but we will do what we have to do.
    1-Visitor
    August 18, 2010
    Are you sure your FOSI doesn't have some e-i-c specifying a quadding of 'asis'? If this is on a high level element's e-i-c and you inherit from there down, then your FOSI could be causing both the display and saving issue.
    My publication process is custom, proprietary, and very sensitive to spaces being replaced by carriage returns.
    Just another shot in the dark,

    -Bill
    1-Visitor
    August 18, 2010
    DebraLee,
    Either I'm not understanding what you mean by "line endings", or something was missing in what I suggested to you. If the problem is carriage returns in the SGML that's loaded into the Editor, then saving it with outputrecordlength set to 'Infinity' should have fixed the problem. Looking at my reply, I did not say that after you save the file, you should close the file and then re-open it.

    OTOH, if you're meaning something other than carriage returns, then more info would help. Maybe a small example file with a precise explanation of where one of the offending "endings" is located.

    Puzzled,
    Steve Thompson
    +1(316)977-0515
    1-Visitor
    August 18, 2010
    In a totally unrelated response, DebraLee is yet another person from Lockheed Martin whose Adepters posts I never see, along with Andy Esslinger's and my own (and who knows who else?). Like I told her in a separate email, I suspect a conspiracy...somewhere.
    1-Visitor
    August 18, 2010

    I've attached a Word document that illustrates the problem.

    The first line of text, "FS 158.00 BULKHEAD" has a carriage return at the end. On our prior version of EPIC 4.3.1, EPIC would ignore carriage returns, soft-wrapping text where it saw fit. The author expects to be able to search on phrases like

    "FS 158.00 BULKHEAD CAP, PN 16B1240"

    So the issue is simply that we would lile Arbortext Editor to ignore carriage returns like it used to.

    Thanks.

    Debra Lee