On Wed, Sep 06, 2000 at 12:45:29AM +0300, Dekel Tsur wrote:
> On Tue, Sep 05, 2000 at 04:27:54PM +0100, Jose Abilio Oliveira Matos wrote:
>
> > One question Dekel, is the converter able to distinguish the linuxdoc and
> > the docbook cases, since both use the sgml extension?
>
> File formats are distinguished by the extension, so we need to use .docbook
> for docbook, and .linuxdoc (or .sgml) for linuxdoc.
This doesn't make much sense. The exporter does but to assign a file type
just by its extension looks a little bit limited.
Linuxdoc vs docbook is one of those cases where we have a conflict.
By concention every file written in a markup language, derived from SGML,
has the sgml extension. The same applies to files with xml extension
those are derived from XML. Remember XML is not a language is meta language.
I understand that every format should have a tag, what I find is that
the file extension is too restrictive. Why not to associate with every format
a label and an extension? That solves this case and future cases.
Format |Label |extension
----------------+---------------+----------
latex |tex |tex
linuxdoc |linuxdoc |sgml
docbook |docbook |sgml
website |website |xml
Is that acceptable to you?
> You also need to update Exporter::BufferExtension in exporter.C accordingly
> (I forgot to put there docbook support).
I noticed. :-)
> > I am trying to figure what your code does, to update the docbook and
> > linuxdoc generations.
> >
> > should it be:
> >
> > \converter linuxdoc dvi "sgml2latex -o dvi $$FName"
> > \converter docbook dvi "sgmltools -b dvi $$FName"
>
> Yes (linuxdoc can be replaced by sgml).
> One question: is there a reason to use sgml2latex for converting linuxdoc to
> dvi, instead of using it to convert linuxdoc to tex, and then run latex
> ourself (i.e. using the latex->dvi converter).
This was just fro comparison. The tools used to give a printed copy of
docbook use jadetex, that is a set of macros build over TeX, the same as
LaTeX is. I have choosen to do it that way because the same procedure could
be applied to linuxdoc. That is why you have the choice. There is nothing
that says that linuxdoc should first be converted to latex to be later
transformed into dvi.
Have I been clear?
> > > \viewer dvi "xdvi $$FName"
> > > \viewer ps "gv $$FName"
> > > \viewer pdf "acroread $$FName"
> > > \viewer html "netscape $$FName"
> >
> > Also is it possible to have different viewers for docbook and linuxdoc.
> > Example: most of the times the lyx file, when converted from docbook (or
> > linuxdoc) to html generates a directory.
> >
> > This directory is called `basename $$FName .sgml`
> >
> > With the present scheme this isn't possible. Or at least have a way
> > that works with both linuxdoc/docbook and latex.
>
> We don't need different viewers: we use the same program (netscape), except
> we need to replace $$FName by something different.
Yes, that is the point.
> I was aware of the problem, and I will fix it soon (I'm thinking of adding a
> converter flag which tells that the output of the converter is put in a
> directory).
That will be very usefull, for latex to html also.
--
José