Bo Peng wrote:

> Since lyx/latex often uses external files, we need to have a clear
> mind what to do exactly. I haven't thought about this clearly, but
> figures etc may be all over the places, and in subdirectories.

Yes. It does not matter where exactly these files are, the different insets
know how to find them.

> Export->latex etc may help but I would like to keep the original
> figures, not the converted ones. And lyx needs to be really clever to
> handle the inclusion of .bst, .layout etc.

Not really. The .layout files are a separate problem (because just including
them is not enough). For the other files I would use a very simple rule:
Don't include anything that can be found via TEXMF, only include files that
are local.

> So, the easiest solution, I think, is to let the user do the packing
> job. What lyx can do, is

No, please not. That will be difficult to teach to users, and it is possible
to do it automatically. This could for example be done with something
similar to

runparams.exportdata->addExternalFile(tex_format, writefile, exportfile);

in the write() methods (The example above is from InsetInclude::latex).

> 1. provide a include ... menu so users can tell lyx which file(s) to
> include in the saved .lyz file. Of course lyx can be a little more
> clever to include the obvious ones.

I would only use this possibility as a tool for advanced users to manually
include the missing 5% of files. For most users the automatic inclusion
should just work.


Georg

Reply via email to