home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / text / tex / 13399 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  2.0 KB

  1. Path: sparky!uunet!news.univie.ac.at!apap4.pap.univie.ac.at!schmitt
  2. From: schmitt@apap4.pap.univie.ac.at (Peter Schmitt, Vienna)
  3. Newsgroups: comp.text.tex
  4. Subject: Re: Question: What to do about linefeeds?
  5. Message-ID: <1992Nov20.141015.57@apap4>
  6. Date: 20 Nov 92 14:10:15 GMT
  7. References: <1992Nov19.060810.7717@oucsace.cs.ohiou.edu>
  8. Distribution: na
  9. Organization: Vienna University Computer Center
  10. Lines: 31
  11.  
  12. In article <1992Nov19.060810.7717@oucsace.cs.ohiou.edu>, carlip@oucsace.cs.ohiou.edu (Walter C3arlip) writes:
  13. > Ok, here's a dumb question.
  14. > One of my colleagues is using TeX on two platforms: Macintosh and
  15. > (yuk) IBM-pc.  Evidently, the IBM-pc likes Carriage-Return *and*
  16. > Linefeed at the end of each line, and when he ports the files to
  17. > the mac, the linefeeds appear as characters in the file and TeX
  18. > hates them.  
  19. > I suggested inserting the line:
  20. > \catcode`^^J=9
  21. > to tell TeX to just ignore the linefeeds, but this did not seem
  22. > to help.  Anyone know why?  Is there an elegant solution to this
  23. > problem?  Is there any reason that IBM-pc's behave in such an anti-social
  24. > manner?
  25. (I have not seen an answer yet - therefore:)
  26. The <eol> symbol(s) is machine dependent - TeX takes this into account and
  27. reads the files line per line (according to the machine), removes the <eol>
  28. (and spaces before it) and replaces it by a CR.
  29. Thus TeX does not see the original <eof>, i.e. the ^^J, and therefore the
  30. catcode change has no effect.
  31. There are, however, implementations of TeX which can handle different
  32. <eol> symbols. I think sbtex (for PC) accepts all the four variants:
  33. cr, lf, cr/lf, and lf/cr.
  34. But in general, when transferring a textfile, one has to convert these <eol>
  35. symbols. There should exist a some tool on a MacIntosh.
  36. Or use a text editor and use search and replace.
  37.                           
  38. Peter Schmitt                           a8131dal@awiuni11.edvz.univie.ac.at  
  39. Institute of Mathematics 
  40. University of Vienna                                  schmitt@awirap.bitnet
  41.