texmacs-dev
[Top][All Lists]
Advanced

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

Re: [Texmacs-dev] Explanation for patch #2590


From: David Allouche
Subject: Re: [Texmacs-dev] Explanation for patch #2590
Date: Thu, 12 Feb 2004 14:38:37 +0100
User-agent: Mutt/1.5.5.1+cvs20040105i

On Wed, Feb 11, 2004 at 04:02:38PM -0700, Nix wrote:
> In the definition of (tmpre-document):
> 
> ((and (tmpre-non-isolated? (car l)) (tmpre-glueable? (cadr l)))
>  (tmpre-paragraph h r))
> ((and (tmpre-glueable? (car l)) (tmpre-non-isolated? (cadr l)))
>  (tmpre-paragraph h r))
> 
> The following list satisfies the second condition:
> 
> ((code (document The Truth)) The Truth is not so simple.)

That is not a proper texmacs document snippet in Scheme format... well
maybe that's something used internally in the tmtext converter, but I am
not familiar with its internals, so I cannot really tell what that
represents and whether that's a valid texmacs document snippet to start
with. In any case, the nested "document" looks weird to me.


> This is terrible, /especially/ since "paragraph" is sectioning markup. 
> The LaTeX converter should under no circumstances introduce sectioning
> markup.  It is up to the user to decide what is considered a
> "paragraph".  Thus, using the 1.0.3.2 converter, the above tree becomes
> 
> \paragraph{
> \begin{verbatim}
> The Truth
> \end{verbatim}}{The Truth is not so simple.}

Sure, that's wrong.

[...]
> A second reason why this is bad is that the arity of \paragraph becomes
> ambiguous.  When I type in a paragraph of plain text, highlight the
> first couple of words and set them as an explicit "paragraph", then I
> get
> 
> {\paragraph{The first few words}}that I chose to highlight.

That's correct.

[..]
> \paragraph{The thing that should have been a paragraph of its own.}{The
> second thing that got glued to the first thing that should also have
> been a paragraph of its own.}

> IOW, in the first (good) case, we have \paragraph{}, whereas in the
> second (bad) case, we have \paragraph{}{}.

You'r preaching the convinced. We agree the second one is buggy.

> IMHO we should remove the whole gluing apparatus from the top of
> tmpre.scm because it creates sectioning markup on the user's behalf. 
> Who are we to decide that when the user creates what she thinks are 2
> paragraphs, the first one sometimes becomes the title of the second one
> ?

I am not sure what the gluing stuff is intended to do (not that I have
checked recentely). I have even made a point previously that designing
multiple pass converters in that way lead to hard to read code because
one has to understand the whole conversion process in order to
understand any given pass.

Clearly, the intent is not to introduce sectioning markup. Maybe the
problem is it inserts "paragraph" tags instead of "para", and thing
breaks since "paragraph" are now properly handled as sectioning markup.

-- 
                                                            -- ddaa




reply via email to

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