Jean-Marc, I am not sure if you have looked at the format of the
external_templates file. Anyway as you can it is very layout like, and
I think it also has a trick that we could use in the regular layout
files: The format specification.

I think we should be able to do the same in the layout files so that
we will have all the code needed for exporting to different markup
formats in the layout files. I have not looked closely on this so I
don't know what unforseen problems we will encounter.

One example:

Style Chapter
        Margin          Static
        NextNoIndent    1
        ParSkip         0.4
        TopSep          4
        BottomSep       0.8
        ParSep          0.8
        Align           Block
        AlignPossible   Block, Left
        LabelType       Counter_Chapter
        LabelString     "Chapter "
        LabelStringAppendix "Appendix "

        Format LaTeX
                Type    Command
                Name    chapter
                NeedProtect     1
        EndFormat
End

And in addition we could have a 

FormatSpecification LaTeX
        Type Command
                opentak \\$Name{
                closetag }
        EndType
        Type Environment
                opentag \\begin{$Name}
                closetag \\end{$Name}
        Endtype
End

Of course I see that this need work to handle options and such. But I
think this could be a way to go...
I belive that this should make it possible to export to ascii, latex,
sgml, docbook, lout etc. without too much trouble. And it would be a
lot better than hardcoding all the export formats. (of course
something will still have to be hardcoded...)

        Lgb

Reply via email to