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

Re: [Clip] Replacing carriage returns with line breaks

Expand Messages
  • Tony Hirtenstein
    Dear Larry, Thank you very much for replying to a query I raised in July about converting carriage returns to line feeds for the purpose of a Pagemaker
    Message 1 of 5 , Oct 15, 2003
    • 0 Attachment
      Dear Larry,

      Thank you very much for replying to a query I raised in July about
      converting carriage returns to line feeds for the purpose of a Pagemaker
      publication. My delayed response is due to having been away for two months.

      ; I have actually written a couple of clips that will allow you to switch
      ; back and forth between the UNIX and DOS/Windows formats.
      H="Convert2UNIX"
      ;lrt@... e¿ê
      ;07/14/2003, 12:38:02 AM
      ^!Replace ^p^p^p >> ^p^p WAIST
      ^!IfError Next ELSE Skip_-1
      ^!Keyboard Alt+D P &50 Alt+V #UNIX# Enter
      ^!Save As ^##

      I see that these clips change the way the file is saved. But bringing
      the 'UNIX' text into Pagemaker does not show any lines ending in line feeds
      instead of CR+LF.

      I should explain that the object is to bring a long list of addresses
      into a Pagemaker publication (for printing mailing labels) and have them
      converted to:-
      a line feed between each line of the address; and then
      a carriage return (CR+LF) at the end of the last line of the address.

      The true carriage return causes Pagemaker to advance down the page to
      the beginning of the next label. The line feed on its own goes to the next line
      of the address.

      Perhaps I should attack this problem from the Pagemaker end with a
      script.


      --

      ******************* A.T.Hirtenstein ****************************
      West Oxfordshire ******************* <tonyh@...>
      "If you take refuge in God, He will bring what you need when you need it."
    • Larry Thomas
      Hi Tony, ... next line ... I cannot see how I can help here. The UNIX format converts all ODOA pairs (CR/LF) in the file to a single OA (Line Feed). I did
      Message 2 of 5 , Oct 15, 2003
      • 0 Attachment
        Hi Tony,

        At 10:14 PM 10/15/03 +0100, you wrote:
        >Dear Larry,
        >
        > Thank you very much for replying to a query I raised in July about
        >converting carriage returns to line feeds for the purpose of a Pagemaker
        >publication. My delayed response is due to having been away for two months.
        >
        >; I have actually written a couple of clips that will allow you to switch
        >; back and forth between the UNIX and DOS/Windows formats.
        >H="Convert2UNIX"
        >;lrt@... e¿ê
        >;07/14/2003, 12:38:02 AM
        >^!Replace ^p^p^p >> ^p^p WAIST
        >^!IfError Next ELSE Skip_-1
        >^!Keyboard Alt+D P &50 Alt+V #UNIX# Enter
        >^!Save As ^##
        >
        > I see that these clips change the way the file is saved. But bringing
        >the 'UNIX' text into Pagemaker does not show any lines ending in line feeds
        >instead of CR+LF.
        >
        > I should explain that the object is to bring a long list of addresses
        >into a Pagemaker publication (for printing mailing labels) and have them
        >converted to:-
        > a line feed between each line of the address; and then
        > a carriage return (CR+LF) at the end of the last line of the address.
        >
        > The true carriage return causes Pagemaker to advance down the page to
        >the beginning of the next label. The line feed on its own goes to the
        next line
        >of the address.
        >
        > Perhaps I should attack this problem from the Pagemaker end with a
        >script.

        I cannot see how I can help here. The UNIX format converts all ODOA pairs
        (CR/LF) in the file to a single OA (Line Feed). I did the conversion on
        your text and displayed it in a hex viewer to see the result below:

        Windows/DOS format

        00000000 09 49 20 73 65 65 20 74 68 61 74 20 74 68 65 73 I see that thes
        00000010 65 20 63 6C 69 70 73 20 63 68 61 6E 67 65 20 74 e clips change t
        00000020 68 65 20 77 61 79 20 74 68 65 20 66 69 6C 65 20 he way the file
        00000030 69 73 20 73 61 76 65 64 2E 20 20 42 75 74 20 62 is saved. But b
        00000040 72 69 6E 67 69 6E 67 0D 0A 74 68 65 20 27 55 4E ringing the 'UN
        00000050 49 58 27 20 74 65 78 74 20 69 6E 74 6F 20 50 61 IX' text into Pa
        00000060 67 65 6D 61 6B 65 72 20 64 6F 65 73 20 6E 6F 74 gemaker does not
        00000070 20 73 68 6F 77 20 61 6E 79 20 6C 69 6E 65 73 20 show any lines
        00000080 65 6E 64 69 6E 67 20 69 6E 20 6C 69 6E 65 20 66 ending in line f
        00000090 65 65 64 73 0D 0A 69 6E 73 74 65 61 64 20 6F 66 eeds instead of
        000000A0 20 43 52 2B 4C 46 2E 0D 0A CR+LF.

        UNIX format

        00000000 09 49 20 73 65 65 20 74 68 61 74 20 74 68 65 73 I see that thes
        00000010 65 20 63 6C 69 70 73 20 63 68 61 6E 67 65 20 74 e clips change t
        00000020 68 65 20 77 61 79 20 74 68 65 20 66 69 6C 65 20 he way the file
        00000030 69 73 20 73 61 76 65 64 2E 20 20 42 75 74 20 62 is saved. But b
        00000040 72 69 6E 67 69 6E 67 0A 74 68 65 20 27 55 4E 49 ringing the 'UNI
        00000050 58 27 20 74 65 78 74 20 69 6E 74 6F 20 50 61 67 X' text into Pag
        00000060 65 6D 61 6B 65 72 20 64 6F 65 73 20 6E 6F 74 20 emaker does not
        00000070 73 68 6F 77 20 61 6E 79 20 6C 69 6E 65 73 20 65 show any lines e
        00000080 6E 64 69 6E 67 20 69 6E 20 6C 69 6E 65 20 66 65 nding in line fe
        00000090 65 64 73 0A 69 6E 73 74 65 61 64 20 6F 66 20 43 eds instead of C
        000000A0 52 2B 4C 46 2E 0A R+LF.

        The reason that I cannot see how to help you is that the conversion is all
        or nothing. It does not allow CR/LF pairs in a UNIX file. I don't know
        what you mean "attacking the problem from the Pagemaker end with a script"
        but if you can do it then that is what you may have to do.

        Regards,

        Larry
        lrt@... e¿ê
      Your message has been successfully submitted and would be delivered to recipients shortly.