Jean-Marc Lasgouttes wrote:
2/ how are you going to handle the weird preamble entries generated by
layout files and modules. Hardcode them all in tex2lyx?

I've been thinking about this too, for the obvious reason. Here's a suggestion.

Everything generated by a layout file or module should be wrapped in a comment of some appropriate sort, perhaps something like:

%% begin article.layout
...latex code here...
%% end article.layout

for what's added at the layout level and then something like

%% begin theorems-ams.module
...latex code here...
%% end theorems-ams.module

for things added by a module. Generating these would involve reworking the preamble generation code a bit, so we know where things come from, but it shouldn't be terribly hard. The idea, obviously, would be that tex2lyx would not add what was between such comments to the user preamble, much as it does now with some other comments.

A nice side-effect of this is that we would then be able to tell what modules had been used when we went to re-import the file, since an empty such block could be written if the module didn't add anything of its own.

Richard

Reply via email to