texmacs-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Texmacs-dev] texmacs tree sanity checks needed


From: PUYDT Julien
Subject: [Texmacs-dev] texmacs tree sanity checks needed
Date: 05 Jan 2003 15:26:09 +0100

Hi,

I've written a texmacs document, and wanted to export it to latex: the
resulting latex file couldn't be compiled.

I looked at the texmacs' sources conversion functions (in totex.cc and
tmtex.scm), but couldn't find the problem; I then compared the .tm and
.tex where the first error was: the error didn't appear in the
conversion, it was there in the texmacs file! Hence I consider the
texmacs file was corrupt, even if texmacs has no problem to handle those
problems.

I did clean (de-corrupt) the texmacs file by hand (ie: I made it a valid
texmacs file that gave a valid latex file), and here is a list of all
errors I found in my texmacs document:
* <left|)> instead of <right|)> ;
* <left|{> unmatched by a <right|.> ;
* double subscripts or superscripts (<rsub|><rsup|real><rsub|real> and
all variants);
* a '(' matched by a <right|)> (or the contrary);
* double itemization: <\expand|itemize-minus><\expand|itemize-dot>;
* <tabular|...> in math mode: removing it solved the problem.

A I see it, these problems can be classified in two types:
- <left|*> and <right|*> are by their very nature (look at the names!)
supposed to come in pairs;
- redundancy isn't eliminated.

On irc, DdaA thought maybe it was up to the converters to take care of
that, but I disagree:
- as I said, if things are supposed to come in pairs, they must come in
pairs;
- redundancy (double subscript, itemization, table, ...) certainly isn't
a feature: one of the two (is more than two possible? I didn't meet the
case) doesn't count...

I don't know enough of texmacs to help correct these problems, but I
have ideas of ways to solve them:
- perhaps having <left|> and <right|> directives makes it difficult to
follow how things work, how about a <paren||> directive, which would be
used like this: <paren|()|text> would display (text) and <paren|{.|> as
{text ?
- perhaps having a clean-tree function, that would be called when the
user has edited a part of the document, and would spot and remove:
  * empty statements like <subp|> and the like;
  * double statement without meaning like a table whose _only_ member
would be another table?

I hope this problem report will be useful,

Snark on #texmacs


NB: This is with the debian unstable version of texmacs, 1.0.1.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]