On Tue, Dec 10, 2002 at 11:27:50PM +0100, David Kastrup wrote: > The following message is a courtesy copy of an article > that has been posted to de.comp.text.tex as well.
I'll try to translate this (freely) into English lest we get examples of Norwegian or Hebrew poetry next time (comments in [] are mine) ------ David says something like ---- Stupid question: What about trying to write a [LaTeX/TeX] package that writes out a LyX .layout file. I was about to write that preview-latex has no problems detecting the structure of the document even if it does not now the [LaTeX document-] class and bla, bla but I censored this myself. Then it occured to me that preview-latex is only able to do that because \@startsection and similar are called with suitable parameters and \thesection etc. are defined. LyX could hook into it and would obtain a lot of information on [Verzeichnisebenen?], math environments, counters etc. In the extreme case one could simply use "\nonstopmode\AtBeginDocument{\RequirePackage{lyxlayout}}\input{doc.tex}" on unknown [LaTeX] documents and end up with a basic LyX .layout. Idea or nonsens? I'll send a copy to lyx-devel. David Kastrup ---- This is not an exact translation and not authorized by David.... Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson)