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
Condense Mail Headers

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

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Subject:
From:
Hans Aberg <[log in to unmask]>
Date:
Mon, 3 Mar 1997 20:04:41 +0100
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments:
text/plain (36 lines)
>> I just made a definition command that can produce commands
>> having optional arguments
>
>You can not do this for commands that are to appear `mid word' without
>breaking TeX's ligatures. You can not have *any* non expandable
>command there. Even \relax which does `nothing' is too much. Compare
>
>ff with f\relax f
>
>So as Frank mentioned, `shortref' definitions are very constrained in
>what they can have in their definition. They can not use \def or \let
>or \futurelet or pretty much anything else that you normally would use
>for parsing. they are more or less restricted to using
>\if\noexpand#1?
>...
>
>or
>\expandafter\ifx\csname #1-xxx\endcsname\?
>...
>
>
>Well you can have optional arguments, perhaps by looking for [ with
>these methods, but you could not use the normal \@ifnextchar mechanisms.

  But, continuing this theme of non-deterministic parsing, have you tried
picking up say a whole word in advance, then doing some parsing of it
(expanding all macros in it, and replacing it with a word where TeX might
regonize it.
  More explicitly, one would type say
    <foo\a bar>
Then the "<" would pick up the whole "foo\a bar>", expanding the \a,
finally returning "foobar". Would it be possible to recognize a ligature
"ob" by this method? (The example is otherwise entirely hypothetical.)

  Hans Aberg

ATOM RSS1 RSS2