On 04/03/2010 11:27 AM, Wolfgang Engelmann wrote:
Am Saturday 03 April 2010 15:13:22 schrieb rgheck:
On 04/03/2010 02:27 AM, Wolfgang Engelmann wrote:
Just wondering:

Would the following be difficult to implement in Lyx or to use it via
enter>file>   'external material' ?



Collect files related to a LaTeX job in a single directory.

The Perl script parses a LaTeX file recursively, scanning all child
files, and collects details of any included and other data files. These
component files, are then all put into a single directory (thus
“flattening” the document’s directory tree).

The author is Cengiz Gunay.
This looks like something that one would call as part of the converter

and how could I do it?

Define a new format, ltxpak, and then declare texdirflatten as a latex-->ltxpak converter. With appropriate arguments, of course. This all gets done under Tools>Preferences>File Handling.

There is a complication, namely, that everything is going to happen here in LyX's temporary directory. So what I think will happen is that texdirflatten will create its directory at e.g.
and now the question is: How do we export this? i.e., copy it to the original file location? Answer: We define a "copier", and tell it to copy this directory to the original document directory. Have a look at the ext_copy.py copier that is used with the LaTeX-->HTML converters. You may be able to use that, or at least to adapt it to your purposes.

Copiers, etc, are all discussed in the Customization manual.


Reply via email to