On Thursday 30 April 2009 16:26:08 Richard Heck wrote:
> Yes, I think that's right. But if we're thinking of HTML as a different
> output format, then of course LaTeX-based ERT isn't really relevant, any
> more than it would be to DocBook.
>
> I'm trying to think of this more in a way that involves easily switching
> output formats than in terms of having completely different ones, so
> that we're not supposed to have totally different layouts for HTML and
> LaTeX, as with DocBook vs LaTeX. But you could have a completely
> different output format, too.

After reading most of the lost threads over gmane this is my take on this 
issue.

It should be possible to do what you propose. That is to have an independent 
format of lyx that does not care about the used back-end be it latex, docbook 
or html.

Your proposal and Jean-Marc's before (in 2000 or so), if I understand it well, 
is to be able to write in the textclass the layout code to convert the lyx 
files to the different output formats. These output formats are those that we 
care the most pdf, html and simple text.

We have developed the layout files and we have been cleaning and improving  
them over last releases.

IMHO the reason why this goal is not (yet) achieved is that our layout 
language is not yet powerful enough to express the different kinds of 
transformations needed to produce the output.

I will choose now one example that is simply latex related to show some of 
inadequacies of our transformation language (the layout files). There are 
latex classes where the table captions should come first and only then the 
table, there are others where the caption must go after the table.

I have worked with both types of latex classes so this is a real example and 
not a fancy example to make my point. It happened at several conferences where 
they started with one style and then for some reason changed the mandatory 
latex style to be another depending on the target journal.

When I change the latex class of the lyx document I must manually catch all 
the tables and do the appropriate change or else the new document will fail.

Ideally what I would like to have is a system where lyx has a clear set of 
instruction that says that every table float should be written according to 
the appropriate rule.

Another strange classes that I have worked before placed all the title 
examples in the preamble and so maketitle was called before the beginning of 
the document. In this case I would like to have lyx placing the title chunk in 
the preamble automatically.

Since we can't even having this class change working seamlessly between latex 
classes how do we expect to have this working before different output formats?

One possible solution would be to use a more dynamic language to allow some of 
the out of the order changes.

FWIW the language that was made specially for this purpose was xslt. I am not 
saying that we should adopt this but at least we could learn from the way it 
works.

I hope this makes sense.
-- 
José Abílio

Reply via email to