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: Nix
Subject: Re: [Texmacs-dev] Explanation for patch #2590
Date: Wed, 11 Feb 2004 16:02:38 -0700

OK - I understand:  paragraph is just like section, subsection,
subsubsection, etc.

As a consequence of that, I have isolated the "real" bug:

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.)

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.}

What ?! I didn't want a paragraph entitled \begin{verbatim}The
Truth\end{verbatim} ! I wanted 2 unnamed paragraphs: One consisting of

\begin{verbatim}
  The Truth
\end{verbatim}

and the other one consisting of a single sentence, namely

The Truth is not so simple.

Not only did I not want that, that's not what I have in my TeXmacs
document !

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.

However, when this implicit gluing happens, I end up with

\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{}{}.

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
?

> "paragraph" tags are (at least, should be) handled by the
> same mechanism as "section", "subsection", etc. There is
> not point in adding special logic for paragraph tags.

The top of tmpre.scm is such special logic. It is not special logic for
handling instances of "paragraph" passed to the converter.  Instead, it
is special logic for inserting instances of "paragraph" into the tree to
be converted.  IMHO /neither/ form of special logic should exist for
"paragraph".

To this end, I have updated patch #2590.  To reproduce the above
(flawed) LaTeX, convert the attached TeXmacs file to LaTeX under version
1.0.3.2 of TeXmacs.

Incidentally, this latest update to patch #2590 exactly addresses bug
#4105.

Attachment: paragraph.tm
Description: Text document


reply via email to

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