[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] texmacs tree sanity checks needed
From: |
Joris van der Hoeven |
Subject: |
Re: [Texmacs-dev] texmacs tree sanity checks needed |
Date: |
Mon, 6 Jan 2003 19:35:28 +0100 (MET) |
> 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 agree with you that it should rather be up to TeXmacs to
handle these problems, but I also want to stress that many
of the problem you mention are due to incorrect usage of TeXmacs.
> 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|)> ;
This is a typical error which is due to *you*.
For interval notation, many people use left ], for instance.
> * <left|{> unmatched by a <right|.> ;
You can create a macro for this. But the problem with
this approach is that you also loose flexibility when typing.
Nevertheless, I plan to come with some other approaches
for this problem later. But that will not be soon.
> * double subscripts or superscripts (<rsub|><rsup|real><rsub|real> and
> all variants);
This *is* prefectly valid, but LaTeX is not able to handle it.
For instance, I sometimes whant to write f'^2.
So the user just has to be careful here.
> * a '(' matched by a <right|)> (or the contrary);
Similar to ^^^.
> * double itemization: <\expand|itemize-minus><\expand|itemize-dot>;
This is perfectly valid.
> * <tabular|...> in math mode: removing it solved the problem.
This is also valid; it is a plainly stupid property of
LaTeX to make tabular only available in text-mode.
> 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;
You can create a macro "matching-bracket"
in order to solve this problem.
> - redundancy isn't eliminated.
Redundancy is a feature. The only thing one *can* do
is make it harder to use redundancy when you do not
really want it. For instance if you select a red color
and just after that a blue color, we might eliminate
the tag for the red color. However, if the user enters
a space in the red color, then selects the blue color,
and then removes the space, then we should keep the tag.
> - 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?
That is also a good idea, which I indeed intend to implement
once when I have time. One may also see this as some kind
of "structure checking" (like "spell checking").