On 22-Oct-98 Allan Rae wrote:
> On Wed, 21 Oct 1998, Jose Abilio Oliveira Matos wrote:
>> One of the good news, is that there will be not one but several layouts
>> to
>> produce linuxdoc documents. Probably one for book, another for report,
>> another for man pages, ...
>
> But each layout will have the same (or mostly the same) styles so if I'm
> writing a document that I want to be used as a man page and as a html
> online document then I have to switch layouts and regenerate (is this
> correct?). So the styles in each doc will be the same then?
If the dtd permits that construct, then yes.
All the information regarding the document struture is in linuxdoc.dtd, and
there it says this:
<!element linuxdoc o o
(sect | chapt | article | report |
book | letter | telefax | slides | notes | manpage ) >
That is (if I'm not wrong) the top element of a linuxdoc document can be
any of these elements. Currently LyX only supports article as the top
element, that is very easy to implement with the textclass approach , ok?
The manpage element is defined as:
<!element manpage - - (sect1*)
-(sect2 | f | %mathpar | figure | tabular |
table | %xref | %thrm )>
That says that a manpage is composed only of sections, and all the tags
that can be included inside a section, the second line however tell us that
are excluded from the structure all those elements that appear inside -(),
that says, as an example, that sect2 (subsubsections) are excluded from
manpage linuxdoc documents.
As a curiosity, if you want to know, and since XML is a SGML subset, the
exclusion is not permited in XML declaration.
If you want to, I can look to the definition of the sect1 (subsection) to
see what is permited inside it.
Ok, this can be very boring but here lies the main reason why LyX was not
adopted to produce linuxdoc documents. An sgml editor if it really wants to
help the user must know the document structure, and tell the user what
elements are permited at that point of the document.
Have I been clear here? Please don't be afraid to ask :)
> I thought the whole idea of (linuxdoc) sgml was to be able to export to a
> variety of formats from a common document. Will this still be possible
> under your new plan?
Here you are underestimating the power of sgml instances ( linuxdoc,
docbook, tei, ...). In simple terms the idea of sgml is to give the document
a structure, you simple worry about the content, the presentation is another,
indepent, taks.
Another very vivid example ;), John (I hope he is not reading this :)
insists in the Tutorial that:
* emphasized style should be given to general arguments, book titles, ...
* typewriter is used for program and file names, ...
* Sans Serif is used for menu, button, ...
* NOUN style is used for people's names
If the documentation was written in XML we would insist on something
completly different, note this example:
<paragraph>
<name>Allan</name> is one of <application>LyX</application> developers,
his main contributions are the inclusion of <menu>Quit</menu> and
<button>Call the doctor</button>.
</paragraph>
<paragraph>
<name>John</name> is writing a book <book><title>Why it is impossible to
live without LyX</title><surtitle>How to write a Ph.D. thesis and
survive</surtitle>.
<paragraph>
So as you see SGML (XML) instances are more than a common format. You can
ask how many people appear, which aplications are cited, an so on.
Do you see the difference?
> Are these extra layouts simply offering
> specialisation for each output type and getting lyx to generate the
> different formats? Or is it simply to reflect on screen the formatting
> styles of each format?
The first option I think...
> Perhaps I'm just confused...
And now even more :)
> Allan. (ARRae)
Jos�
PS: This is something that can count in the discussion Asger-Alejandro...
--
Jos� Ab�lio de Oliveira Matos
Date: 22-Oct-98 : Time: 08:31:17 GMT
After a number of decimal places, nobody gives a damn.