On 06/10/2013 06:05 PM, Steve Litt wrote:
These days, it could be used as a front end to anything with the proper
styles defined, and the proper converter. So the same LyX file could be
used to output LaTeX, MSWord doc, XHTML, HTML, simple HTML, or who
knows what else.

To more easily accommodate this, it seems to me like layout files
should be split into an input side and an output side, with the output
side capable of multiple output formats. So the input side might look
something like this:

CharStyle MyEmph
Font
        Shape Italic
EndFont

if outputtype == latex
    outputName  latexlayout.layout/myemphL
    outputType  Command
elsif outputtype == simplehtml
    outputName  simphtmllayout.layout/myemphH
    outputType  InlineTag
else outputtype == msword
    outputName  winwordlayout.layout/myemphW
    outputType  CharacterStyle
End

Environments would be similar.

Ideally it would be designed so that it doesn't syntax check inside the
output type's it's not. That way you can develop one output type at a
time without getting errors from the ones you haven't developed yet.

This can already be done, more or less. That is, I can't imagine anything you'd want to do, as far as XHTML export goes, that isn't provided for in the layout files.

Indeed, I am sufficiently confident about this that I'd be surprised if it were not possible to build the sort of simple HTML export you want simply by writing a new layout file.

Richard


It seems to me that something like this would be a logical way of
turning LyX into a universal front end while changing very little of
LyX's core code.

I'm not a good enough programmer to do this in C++, so feel free to view
this suggestion with some healthy skepticism.

Thanks,

SteveT

Steve Litt                *  http://www.troubleshooters.com/
Troubleshooting Training  *  Human Performance

Reply via email to