Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!munnari.oz.au!csc.anu.edu.au!csis!ken From: ken@csis.dit.csiro.au (Ken Yap) Newsgroups: comp.text.tex Subject: Re: Expanding \input, \include to obtain single file Message-ID: <1991Jan14.223142.4594@csis.dit.csiro.au> Date: 14 Jan 91 22:31:42 GMT References: <25080@dime.cs.umass.edu> Organization: CSIRO Division of Information Technology Lines: 18 >When shipping TeX and LaTeX files to others which may or may not have >the same operating system (and file naming convention) and probably no >access to all style files used, it would be helpful to "expand" or merge >all input, includes and documentstyle options to generate a single file. >In other words, each input, include, etc. would be replaced by the file >contents it references. A crude approach is to use SED on Unix to >convert \include and \input to #include's and then run the C >preprocessor across the root file, but that still does not handle the >style files (and has other problems). Is anybody aware of easier >alternatives? I'd be careful with the C preprocessor, if you have the word "unix" in the input you may find it replaced by 1. Also unbalanced quotes, etc will make strict cpps grumble. Kamal Al-Yahaya's textools contains a texexpand if I remember correctly. I don't think it does sty files, but maybe a sed script in front will fix that. Where: uunet.uu.net:comp.sources.unix at least.