home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / text / tex / 15257 < prev    next >
Encoding:
Internet Message Format  |  1993-01-21  |  4.1 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!howland.reston.ans.net!usc!news.service.uci.edu!unogate!mvb.saic.com!info-tex
  2. From: LATEX@VTVM1.CC.VT.EDU (RW Hendricks)
  3. Newsgroups: comp.text.tex
  4. Subject: lf-2-crlf
  5. Message-ID: <10235846@MVB.SAIC.COM>
  6. Date: 21 Jan 93 14:27:19 GMT
  7. Organization: Info-Tex<==>Comp.Text.Tex Gateway
  8. Lines: 87
  9. X-Gateway-Source-Info: Mailing List
  10.  
  11.  
  12. A few days ago I had a problem with lollipop on an IBM pc because the
  13. (required) translation of lines ending in LF were not being translated to
  14. CRLF.  I found a little trick using AWK - a single line program
  15.  
  16. $print >"filename.new"
  17.  
  18. which would do the conversion of an input file "filename.old". This
  19. works because AWK (written by some of the folks who brought us C (and
  20. Unix) knows  automatically what is required for the platform on which
  21. it is operating and makes the conversion.
  22.  
  23. When I posted this solution, I got three interesting (and better)
  24. solutions as listed below. Note that some of them also use the fact that
  25. Unix systems seems to know how to do this automatically.
  26.  
  27. Thanks to everyone who responded.
  28.  
  29. Bob
  30. =============================================================================
  31. From: eijkhout@cs.utk.edu
  32.  
  33. Bob,
  34.  
  35. I think I have it figured out: when you move your files from
  36. Unix to the PC you have to take care of line ends. Unix puts
  37. only a LF at line ends, so the unpacked files have precisely that.
  38. MsDos expects CR/LF, and the trouble from \comment comes from
  39. \comment wanting one sort of line end (the native type) and
  40. finding the foreign one.
  41.  
  42. Do you unpack on Unix, and copy with mcopy? In that case use
  43. the -t option. If you untar etc on the PC I have no idea what
  44. you should do, but several people have managed to get Lollipop
  45. working on PC's so it should be possible.
  46.  
  47.  
  48. Victor Eijkhout
  49. =============================================================================
  50. There is yet a better (well, easier) way to achieve this.  The -a switch in
  51. the platform-independent version of UNZIP (5.0) supports the translation of
  52. LF to CRLF and CRLF to LF (depending on platform).  Under DOS, the -a
  53. switch converts LF to CRLF (where such a thing is expected); under other
  54. systems, the -a switch converts CRLF to LF (where such a thing is
  55. expected).  At your system-level prompt, type unzip for the menu of
  56. switches available -- it's amazing how much flexibility is at your disposal
  57. with this utility.
  58.  
  59. In general, the ZIP files at SHSU are created in LF format (as opposed to
  60. CRLF) as this is the most commonly-employed format.  If supplied by an
  61. author in ZIP format, the archive file is left per their submission (i.e.,
  62. I generally don't mess with them further).
  63.  
  64. Regards,   George Greenwade
  65. =============================================================================
  66. From: Lance Tagliapietra <96720919@ucs.uwplatt.edu>
  67. Subject: Re: Lollipop problem resolved!
  68.  
  69. If you have DOS 5 on your pc, the dos editor will read in files which have
  70. LF ending all lines, and write back out the file in the standard DOS CRLF
  71. line ending.
  72.  
  73. -Lance
  74.  ---------------- Amiga - The Wild Side of Power Computing -----------------
  75.  Lance Tagliapietra                       Internet: 96720919@ucs.uwplatt.edu
  76.  P.O. Box 26                                BitNet: 96720919@uwplatt
  77.  Platteville, WI 53818
  78. =============================================================================
  79. From: toin@stack.urc.tue.nl (Toin Bloo)
  80. Message-Id: <9301201537.AA24636@blade.stack.urc.tue.nl>
  81. To: LATEX@VTVM1.CC.VT.EDU
  82.  
  83.  
  84. An other way to solve the LF/CRLF problem is to use an FTP program.
  85. If you set the type to ASCII, the program will translate the EndOfLine
  86. characters (on Unix only LF, on Dos both CRLF) in a proper way, depending
  87. on the from and to machine.
  88.  
  89. So if you want to translate the LF's to CRLF's, put your file by FTP to a
  90. Unix machine and get it back with the type set to Ascii. There you are!
  91.  
  92. --
  93. Toin Bloo                                 The Young Scientists Eindhoven
  94. +31 40 622681 (home)                      Frederiklaan 163  5616 NE  Eindhoven
  95. toin@stack.urc.tue.nl                     The Netherlands, Europe
  96.                                           (toin%storc@dutentb.et.tudelft.nl)
  97. =============================================================================
  98.