Jose Luis Gomez Dans a écrit : > Hi all, > I have been toying with the idea of writing some document in XML. So far, > some of it has been done in KomaScript (article, I think). I have to put > graphics and stuff, and I'd like to tranlsate it to a webpage as well. I > also want > to get to know XML and stuff. > I have found a Lyx-SGML-XML-HOWTO kinda document, but it assumes that your > documents are already in DocBook format. If I just change the Layout from > Article(Koma)->Docbook, the resulting DVI isn't good at all. And I don't > like the > look of the docbook produced stuff anyway! I guess that my questions are: > (i) Is there a way to transparently write a latex document and then > translate it to SGML/XML using lyx? It is clear to me that a simple Layout > change is > not enough.
I'm afraid not. I don't know many xxx2docbook, but in any case there are troubles (even html2docbook). In fact the expected way is starting from SGML and publishing it in the other formats (HTML, DVI, etc.). Changing style from Komascript to DocBook within LyX is a good start but you need to rearrange the doc. Besides, that is really true that the publishing formats are not satisfying (expecially PDF) and need some tricky customization. If you want SGML to pure LaTeX translation there are some stylesheets (db2latex) but you need to customize them to have pretty output too. > (ii) What about images? I understand that in Docbook you need a mediaobject > tag, and you throw in the EPS and a PNG and so on, so that the docbook > parser > uses either depending on the document type. How is this done in Lyx? Do I > have to manually modify the output sgml file or is there a way of doing this > automagically? AFAIK the DocBook image support in lyx will change, but currently it only uses the <graphic> element. There is not extension to the pointed image file so that the expected format depends on the translation done (eps for jadetex/DVI, png or jpg for HTML). BG