OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK: Re: LyX with Docbook


howard mann wrote:
> 
> Bob Stayton wrote:
> >
> > Could someone explain how this latest version of LyX works
> > with Docbook files? I tried to find out more about it, but
> > neither the LyX website nor the referenced mail archive
> > said much about it.
> 
> I second this request. I have the DocBook tools from Mark
> Galassi/Cygnus, and wonder if I can use them with Lyx to write SGML
> using the DocBook DTD.
> 

Apologies for the long reply to those who are not interested in the
thread.

Before I begin, I sould point out that, as far as I know, LyX,
unfortunately, cannot import sgml source, as it can, with some
limitations, with TeX source. There is an sgml2lyx utility that worked
for LinuxDoc sgml files but I am not aware of any converters to LyX
format for DocBook sgml files.

Now, I work on an Intel machine with RedHat 6.1 and I have no experience
whatsoever with installation on other OSes or from source files. Being
lazy, I have installed the following *rpm* packages.

>From the distribution cd or any mirror of the RedHat ftp site
tetex-1.0.6-7
tetex-afm-1.0.6-7
tetex-dvilj-1.0.6-7
tetex-dvips-1.0.6-7
tetex-fonts-1.0.6-7
tetex-latex-1.0.6-7
tetex-xdvi-1.0.6-7

>From ftp://ftp.sylvan.com/pub/lyx/
tetex-lyx-1.1.2-1
lyx-1.1.2-1

>From the powertools collection from
ftp://ftp.nluug.nl/site/ftp.redhat.com/redhat/powertools/6.1/noarch or
any other mirror of the RedHat ftp site
sgml-common-0.1-6
stylesheets-0.11rh-2

>From ftp://ftp.us.sgmltools.org/pub/SGMLtools/v2.0/RH6/
sgmltools-CVS19990807-2

For those who want source files, I guess that they would be available in
the relevant directories of the above links, although I did not check
for all of them.

When I open LyX, I can create a new LyX document choosing "DocBook
article" from the available templates. What I get on the LyX window is a
document with dummy title, date, author, and first section, which I can
of course change. If  I want, for example, a new section, I write the
title of the section and, from a dropdown menu, I choose Section. On my
screen, I see, in a semi-WYSIWYG way, the numbered section formatted in
bold. LyX knows that Section corresponds to sect1. Also available, are
bibliography, subsection, etc.

Now, not all DocBook tags are available. Nevertheless, if I want to
insert a tag, I just write the tag, enclosed in angle brackets, as I
would with any other editor. I then highlight it and choose sgml from
the dropdown menu. LyX now knows that this is markup, not "real" text.

While writing my LyX document, I have various choices. I can preview it
as dvi or postscript without leaving LyX. The latter invokes xdvi or
ghostview for that purpose. I can export my document in dvi, ps, or
Docbook sgml source. If I export it as sgml, I can work with it like
with any other sgml document.

My conclusion is that if I want something simple like an "article", LyX
can do the job quickly and efficiently. For more complex stuff, I tend
to use Emacs with psgml.

Well, this my naive way of creating DocBook articles. Gurus' corrections
and criticism will hurt but are welcome :-).

Prokopis

PS. The masterpiece that follows is newfile.sgml, which was exported by
LyX. Not very nice indentation as you can see, yet it worked: I managed
to create dvi and html versions of it without problems, using the db2dvi
and db2html commands from stylesheets-0.11rh-2

<!doctype article public "-//OASIS//DTD DocBook V3.1//EN"
 [ <!entity header system "header.sgml">
]>

<!-- DocBook file was created by LyX 1.0 (C) 1995-1999
by <prokopis> Fri Nov  5 10:00:03 1999
 -->
 <article>
  <artheader>
   <title>
  Test
  </title>
  <author>
  <firstname>Prokopis</firstname><surname>Prokopidis</surname>
  </author>
  <abstract>
  <para>
  Abstract
  </para>
  </abstract>
  </artheader>
  <sect1>
   <title>
  First Section
  </title>
  <para>
  Test
  </para>
  </sect1>

 </article>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC