[texhax] writing about 2 parallel developments of a product with the same base code

Steve Schwartz s.schwartz at imperial.ac.uk
Tue Jan 30 10:22:12 CET 2007


Vaida,

Just divide all your material into separate files (as many as you
want/need). Create two separate master documents corresponding to the
two documents you want to generate.

Then use latex's \include, \includeonly, and/or \input commands in these
to put in the specific material for each document. Note that \include
will invoke a \clearpage, and is thus used mainly for main segments
(e.g., book chapters). This is well-described in most (all?) books and
guides to latex, but to get you going here's the description from the
info tree on my (linux) system:

--------------------------------------
`\include{file}'

   The `\include' command is used in conjunction with the
`\includeonly' command for selective inclusion of files.  The `file'
argument is the first name of a file, denoting `file.tex'.  If `file'
is one the file names in the file list of the `\includeonly' command or
if there is no `\includeonly' command, the `\include' command is
equivalent to

     \clearpage \input{file} \clearpage

   except that if the file `file.tex' does not exist, then a warning
message rather than an error is produced.  If the file is not in the
file list, the `\include' command is equivalent to `\clearpage'.

   The `\include' command may not appear in the preamble or in a file
read by another `\include' command.

-----------------------------------------
`\includeonly{'file_list`}'

   The `\includeonly' command controls which files will be read in by
an `\include' command.  file_list should be a comma-separated list of
filenames. Each filename must match exactly a filename specified in a
`\include' command. This command can only appear in the preamble.

------------------------------------------
`\input{file}'

   The `\input' command causes the indicated `file' to be read and
processed, exactly as if its contents had been inserted in the current
file at that point.  The file name may be a complete file name with
extension or just a first name, in which case the file `file.tex' is
used.


HTH

Steve

On Mon, 2007-01-29 at 16:39 +0200, Vaida Bogdan wrote:
> Hi, can someone tell me how can I write 2 documents that have 90% of
> the content the same, the rest 10% modified, some sections added, some
> modified and some deleted?
> Basically I need to write about 2 parallel developments of a product
> with the same base code.
> 
> Please CC me the replies as I'm not on your list.
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> 
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
-- 
+-------------------------------------------------------------------+
Professor Steven J Schwartz      Phone: +44-(0)20-7594-7660
Space and Atmospheric Physics    Fax:   +44-(0)20-7594-7772
The Blackett Laboratory          E-mail: s.schwartz at imperial.ac.uk
Imperial College London          Office: Huxley 6M70 
London SW7 2BW, U.K.             Web: http://www.sp.ph.ic.ac.uk/~sjs
+-------------------------------------------------------------------+



More information about the texhax mailing list