On Fri, Oct 05, 2001 at 08:20:51PM +0200, Michael.Abshoff wrote:
> If you want to put each chapter with its included files into a
> subdirectory, you can write yourself a script that copies all 
> files from your subdirectories and the global file in a temp-directory,
> exports the global document and then deletes the temp-files.

Copying files around is a waste of IO and disk space.  Just use
symlinks.  I haven't done this before (but a quick test shows no
problems) I'd do something like:

~/LyX/thesis/chap1/{*.lyx,*.fig,*.eps}
             chap2/...
             ...
             chap#/...
             build/master.lyx (and symlinks)

Where the build directory has symlinks to the files in the other
directories.  That way the files and figures are still somewhat
separated and if LyX ever gets fixed you just move the master file and
punt the build directory.

To make the symlinks you could just do this whenever you add files:

cd ~/LyX/thesis/build
ln -sf ../chap*/* .

When editing or formating the individual chapter files you'd do nothing
special.  Edit them in either location (although I assume it would be
more convenient to use the chap# subdirs for this).  The only issue is
that the master document needs to include files as "xxx.lyx" and not
"chap1/xxx.lyx" so it's easiest to create it in the build directory
if using the GUI's "browse" dialogue.  That's also where you'd have
to format the master document from due to LyX's inane handling of
subdirectories.

-- 
Dave Chapeskie

Reply via email to