Loading ...
Sorry, an error occurred while loading the content.

Re: [Clip] What is wrong in this clip?

Expand Messages
  • hsavage
    ... I, also, don t see an array. An array has to be created and configured and manipulated by the clip commands. Assigning a delimiter is a small part of
    Message 1 of 4 , Feb 18, 2006
    • 0 Attachment
      Don Daugherty wrote:
      > tu2006li wrote:
      >
      >> The clip below does not work right. What is wrong?
      >> _________________________
      >> Original text is this:
      >>
      >> "Sillä me tiedämme, että vaikka tämä meidän maallinen majamme
      >> hajotetaankin maahan, meillä on asumus Jumalalta, iankaikkinen maja
      >> taivaissa, joka ei ole käsin tehty." 2. Kor 5:1
      >> ------------------------------
      >> Result must be this:
      >>
      >> <b>"Sillä me tiedämme, että vaikka tämä meidän maallinen majamme
      >> hajotetaankin maahan, meillä on asumus Jumalalta, iankaikkinen maja
      >> taivaissa, joka ei ole käsin tehty." 2. Kor 5:1</b><br><br>
      >>
      >> ------------------------------
      >> ;start at the top (assuming whole file)
      >> ^!Jump Doc_Start

      >> ;set list delimiter to ( and get array elements
      >> ^!SetListDelimiter "("
      >
      > I'm not seeing what function the above line would have; you have no
      > array operations in the clip that I see.

      I, also, don't see an array. An array has to be created and configured
      and manipulated by the clip commands. Assigning a delimiter is a small
      part of making an array.

      On the bright side, I see no need for an array with the example provided.

      >> ;verify that there are no blank leading lines
      >> :Check_Leading_Returns
      >> ^!Select Eol
      >>
      > I'm assuming that the original text did NOT have the line-wraps shown
      > above, and that line 1 really starts with ""Sill" and ends with "Kor
      > 5:1" . Is that correct?

      This is critical, in NoteTab Pro a carriage return is a paragraph
      ender. It ends the sentence, no matter the length, and starts a new
      paragraph. Each line that ends with c/r is a standalone paragraph.

      >> ;make sure it isn't empty item if it is END
      >> ^!If "^$GetSelection$" = "" Leading_Returns ELSE Format_Line_One
      >> :Leading_Returns
      >> ^!Continue You have a blank line at the top of your document, can we
      >> delete it?
      >> ^!Keyboard DELETE
      >> ;Format First Line
      >> :Format_Line_One
      >> ^!InsertHtml <b>^$GetSelection$</b><br /><br />
      > Should this read:
      > ^!InsertHtml <b>^$GetSelection$</b><br><br>
      >> ^!Jump +1
      >> ;Find end of (1)
      >> ^!Find "1)" TIS

      > I don't see "1)" or "(1)" anywhere in the original text

      >> ^!IfError ABORT
      >> ;find next paragraph
      >> :Process_Paragraph
      >> ^!Replace "^P(" >> "<br />^P(" TIS

      > I'm not seeing "(" in the text; i'm assuming "^P" in the usual NoteTab
      > tag for a hard-return.

      Control-P (^p) is the token for carriage-returns.

      >> ^!IfError Process_Final_Paragraphs
      >> ^!Goto Process_Paragraph
      >> :Process_Final_Paragraphs
      >> ^!Replace ".^P" >> ".<br /><br />^P" ATIS
      >> ^!Info [C]Successful Run, Congratulations
      >> ^!Goto End
      >> :ABORT
      >> ^!Info [C]An Error Has Occurred -- Sorry

      > As a possible alternative to the above clip you might start with
      > ^!SetWordwrap OFF
      > ^!Menu "Modify/Document To Html/With Paragraph Tags"

      tu2006li,

      If all, or most, of the documents you need to convert are formatted in
      the same fashion as the example the clip below should suffice. There
      will probably be exceptions but they can be worked thru with clip
      modifications.

      <>··········Separator··········<>
      H="what is wrong with this clip"
      ^!SetWordWrap 0
      ; - jump to top (assuming whole file)
      ^!Jump 1
      ; - remove leading blank lines
      :LEADING_RETURNS
      ^!Select EOL
      ^!If ^$GetSelection$ = "" NEXT ELSE SKIP_2
      ^!DeleteLine
      ^!Goto LEADING_RETURNS
      ;
      ; Format First Line
      ; - in this application ^!InsertText works as well as ^!InsertHtmL
      ^!InsertHtmL <b>^$GetSelection$</b>
      ^!Jump 1
      ;
      ^!Replace \n+ >> <br /><br />\n RSA
      <>··········Separator··········<>

      ºvº
      06.02.18
      -Newspaper HeadLine...
      "Hospitals are Sued by 7 Foot Doctors"
      hrs ø hsavage@...
    • omo
      ··········Separator·········· ... Thanks, Now it works.
      Message 2 of 4 , Feb 20, 2006
      • 0 Attachment
        <>··········Separator··········<>
        > H="what is wrong with this clip"
        > ^!SetWordWrap 0
        > ; - jump to top (assuming whole file)
        > ^!Jump 1
        > ; - remove leading blank lines
        > :LEADING_RETURNS
        > ^!Select EOL
        > ^!If ^$GetSelection$ = "" NEXT ELSE SKIP_2
        > ^!DeleteLine
        > ^!Goto LEADING_RETURNS
        > ;
        > ; Format First Line
        > ; - in this application ^!InsertText works as well as ^!InsertHtmL
        > ^!InsertHtmL <b>^$GetSelection$</b>
        > ^!Jump 1
        > ;
        > ^!Replace \n+ >> <br /><br />\n RSA
        > <>··········Separator··········<>
        >
        Thanks,

        Now it works.
      Your message has been successfully submitted and would be delivered to recipients shortly.