texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Please help for newby debugging problems!


From: David Allouche
Subject: Re: [Texmacs-dev] Please help for newby debugging problems!
Date: Sun, 21 Sep 2003 15:17:32 +0200
User-agent: Mutt/1.5.4i

On Sat, Sep 20, 2003 at 01:19:55PM +0200, Norbert Nemec wrote:
> Hi there,
> 
> I just started to do dig into the TeXmacs internals trying to debug a 
> extremely strange problem with references. (It definitely is a bug, but I 
> have not yet managed to isolate it from my 100k diploma thesis. So I guess I 
> have to hunt the bug myself...)
> 
> Currently I get stuck in packages/section/section-book.ts:
> The chapter and appendix macro both use <surround|||>  while section does not 
> use it. What exactly does <surround|||> do in that context? The entry in the 
> WiKi is not very conclusive.

SURROUND
   1: prefix (line data)
   2: suffix (line data)
   3: body   (block data), generally a macro argument

Line data: data which can be part of a line, its expansion must
not contain any DOCUMENT node.

Block data: multi-paragraph data. A DOCUMENT tree, or a SURROUND tree
whose body is a DOCUMENT, or a tree expanding to block data.

Add the PREFIX at the start of first line of BODY, and SUFFIX at the
end of the last line of BODY.

NOTE: when BODY is line data, an equivalent result can be produced by
(CONCAT PREFIX BODY SUFFIX). But block data is forbidden in subtrees
of CONCAT.


> Generally: is there a way to display nested tags like the "chapter" macro 
> definition in some human-readable form? Preamble mode does not help at all. 

Useful trick: use the structural behaviour of the selection to easily
see the span of a structure in preamble mode.

Fallback method: use "Copy to Scheme" and paste in a syntax-aware text
editor (emacs in scheme mode).

> The only way I managed to understand what is happening was to use a text 
> editor and rearrange the huge line by hand. Is there any description of the 
> detailed syntax of texmacs files? Especially the exact handling of white 
> space and line breaks would help. (Including the question how far TeXmacs 
> preserves whitespace, line-breaks and indentation when reading/saving files.)

You can find some explanation on this issue in this message:
http://lists.texmacs.org/wws/arc/texmacs-users/2002-12/msg00049.html


> Currently the readability and editabilty (funny word! but edibility just 
> wouldn't do... :-)   ) of style files really is a huge barrier for starting 
> extending and debugging the set of styles.

Yes it is. But editing texmacs documents in the native format is _not_
the recommanded solution.

It is planned to do something better for preamble mode. I do not know when.

-- 
                                                            -- ddaa




reply via email to

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