Configuring Thot & Doc transformation

Stephane Bonhomme (Stephane.Bonhomme@imag.fr)
Tue, 04 Nov 1997 11:27:38 +0100

> Hi!

Hi Michal,

> A couple of weaks I searched for some system that edits document with
> just a logical stucture (let's say in SGML) that I can write by
> myself, and that presents it and edits it in a graphical way. (While
> I'm an PGS student, it should be for free. :-))

> I found a Thot editor. It looks to satisfy all my needs, but there is
> a lot of questions I have to have answered before using it.

We are pleased you consider using Thot editor for your experiments. I think
it is a nice tool to experiment structure oriented editing. The editor is
configurable, and extending it is easy if you're not affraid by a bit
c-programming. Thot editor is built on the top of the Thot library which
offers a generic api to handle document structure, it also provides user
interface building functions (see http://opera.inrialpes.fr/thot/doc/APIman.toc
.html).

The editor itself comes with a lot of configuration files allowing its
customisation in a comfortable way (different language versions,etc.), these
config files are described in the Thot user manual:
http://opera.inrialpes.fr/thot/doc/Thotman-E.toc.html or
Thot/doc/thoteditor/Thotman-E.PIV in the distribution
and in
http://opera.inrialpes.fr/thot/doc/thoteditor/Developers.html

> 1) First of all, I'm Czech, so I'm writing documents in the Czech
> language, using ISO Latin 2 encoding. Is it possible customize Thot
> editor both to present IL2 fonts on the screen/printer/postscript
> file? Is it possible to customize Thot to have a Czech keybord or
> just to receive Czech letters from X-Window (I have customized it)?
> As I tried it, Thot was not willing to received letter that are not
> in the US-keyboard.

* The character encoding of Thot is ISO-Latin-1 and we have never tested it
using a different character set. But I'm not a specialist so I let someone
else answer your question.

> 2) I have not found how the translation tool works (I even have not
> found it). Is it possible to write my own translation scheme (to my
> format based on plainTeX) and translate it?

A export feature is included in Thot, it is based on the T language (described
in the Languages manual - http://opera.inrialpes.fr/thot/doc/languages.html -
Thot/doc/languages.html in the distribution). This language lets you define
export schemes of Thot documents in another format. You can write translation
schemas for your own structure schemas or for standard structure (see section
24.3 of the User MAnual), the translations are proposed in the save as form of
the editor (see section 7.8 of the user manual). Tou can look at
Thot/schemas*.T files as examples of translation schemes.

> 3) Can Thot have footnotes and margin notes presented visualy? (And
> stuff like that?)

Some structures include such things (see Report and Chapter)

> 4) Is it possible to change the structure scheme of a living
> document? (Let's say I have a document using Chapters and Section,
> and I want to add Subsections and Subsubsections in time when I have
> written already 50 pages of the document.)

This topic is a particular interest for me: the transformation of document is
the subject of my PhD. I think several approches have to be considered
depending on the aim of the transformation:

* A first need is to change the structure of existing (living) document when
the structure schema is changed.

In Thot, a extension feature for S scheme is provided, a S schema can be an
extension for another schema (That's the way indexes are defined in Thot). A
document not using the extension can still be edited after the extension is
defined. The extensions are a powerful way to extend standard structure
schemes with application specific structures (annotations, indexes, notes,
StyleSheets attributes, etc...)

If you want to change the structure scheme itself, several situations have to
be considered :

- The structure scheme is only improved with new elements (Subsections and
Subsubsections in your example), in that case, the structure of the document
remains valid. unfortunately, Thot schemes are compiled and the IDs affected
to element types may change if you change the scheme, as a consequence, the
backward compatibility is not assured in Thot. Note that is the documents
would have been stocked in a formalism using GIs (Generic Identifiers) such as
SGML or XML syntax, the documents are still parsable even if the DTD is
improved, that a reason (not the only one !) why we considere "XMLise" Thot.

- Some elements are renamed in the structure scheme: one can suppose this is
not a very realistic situation since authors of structure schemes choose
pertinent names at once, but it might occur that a document have to be
translted between isomorphic structures, like between the two next :
Chapter = Chapter =
BEGIN BEGIN
Introduction = Paragraph; Preamble = Paragraph;
Body = LIST OF (Section_chapter); Sequence_of_sections =
END; LIST OF (section)
END;
Section_chapter = ...
section=...

In that case the transformation is conceptually very simple (we call it a
identity relation). Nevertheless, it can't be based on the GI of the elements
but on a logical organisation of elements types and relations between their
constructors (lists, aggregates, choices, etc.)

- More complicated situations : deletion of elements in the schemes (what to
do with the instance in the live document???) re-ordering elements,
combinations of boths cases. These situations show that we need a generic and
quite automatic method to keep the backwrd compatibility of docs with the
schemes. We think a comparison of element constructors, envolving algorithmes
that searches tree inclusion is a good way to prospect... We are working on it.

* A second need is the transformation of a document without changing the
structre scheme: may be it is not in your scope of interest, and more user
interface oriented (Cut-and-Paste problem, Change Type editing command) but
some similarities can be found between the two points of view, and in my
opinion, the techniques we are developping are appliable to both problems. I
could develop this idea, but I do not want to bother tou with it if I'm not
really in your scope of problems.

I hope I lighten your mind in that reply mail. I am very interessed to stay in
relation with people that have the same preocupations regarding edition of
structured documents and I would be pleased if we continue this discussion
further. I'm waiting for your reactions and comments.

Regards,


Stéphane.
-----------------------------------------
Stéphane BONHOMME - PhD Student
Projet Opéra

Unité de Recherche INRIA Rhône-Alpes
655 avenue de l'Europe
38330 Montbonnot Saint-Martin

email: Stephane.Bonhomme@inrialpes.fr
Phone: (33)76.61.53.81 Fax: (33) 76.61.52.52

-----------------------------------------