LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Achim Blumensath <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Wed, 3 Nov 1999 20:33:15 CET
Content-Type:
text/plain
Parts/Attachments:
text/plain (75 lines)
Frank Mittelbach wrote:
> on the user syntax level this could still be provided a different
> function though in that particular case my feeling is that it should
> not be a different command if possible, eg if i have the following case
>
>  text text\footnote{foo} text text
>
> and i decide to add another footnote to this point i think it would be
> more logical to be able to say
>
>  text text\footnote{foo}\footnote{bar} text text
>
> and let the commands sort out that they come in a sequence (see my other
> post on xparse extension --- to be written :-) rather than forcing the
> user to replace the first thing by something like
>
>  text text\begin{footnotesequence} \item foo \item bar\end{footnotesequence}
>  text text
>
> handwaving on the actual syntax. my suggestion some days ago to have
>
>  text text\footnote*{foo}\footnote{bar} text text
>
> has effectively the same defect, only that it is far easier for the user
> to change from one form to the other, but logically speaking the right
> kind of abstract information is already present in the first example
> with the two \footnote commands and in my eyes this is all that should
> be needed (preferably).

I agree that this would be preferable but I don't think there is a clean
solution which does this automatically. E.g., if you just look at the next
token something like

  \footnote{aaa}\index{bbb}\footnote{ccc}

will fail even if semantically it is the same as

 \footnote{aaa}\footnote{ccc}\index{bbb}

Therefore, I suggest using one of the less ideal but working solutions
you mentioned above, e.g., an environment.

> A similar case is
>
>  \section{foo} text
>
> compared to
>
>  \section{foo} \subsection{bar} text
>
> where we don't have to tell the subsection command that a section
> command immediately follows. it figures this out by itself and adjusts
> the spacing automatically (no need for manual intervention)

IMHO the only clean solution for context-sensitive commands would be
to generate an abstract syntax tree of the document and provide
methods to check things like: Is my right neighbour a \footnote
command? Am I the first child of type \subsection? etc.
Unfortunately one can't implement such methods in TeX easily (if at all).
One example are caterpillars as described in

   A. B. Klein, D. Wood,  Caterpillars, Context, Tree Automata, and Tree
   Pattern Matching, Developments in Language Theory, 1999.

I don't know if a description is available online, but Wood's
homepage (which I haven't looked at) is at www.cs.ust.hk/~dwood.

Achim
________________________________________________________________________
                                _                             | \_____/ |
    //  Achim Blumensath       | \  _                        \O/ \___/\ |
   //   [log in to unmask]   |-< /_\                       =o=  \ /\ \|
 \X/    (p^2 - m^2)\psi = 0    |_/ \_                        /"\   o----|
____________________________________________________________________\___|

ATOM RSS1 RSS2