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:
"J.Fine" <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Tue, 18 Aug 2009 10:02:35 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
Will Robertson wrote:
> (Sent from my phone. Apologies for brevity.)

Thank you for your brevity.  I'll try to be brief also.
https://ouca.open.ac.uk/owa/?ae=PreFormAction&t=IPM.Note&a=Reply&id=RgAAAAAONUOqS8DYTpP2Ig%2bgTMtnBwDaUTCEWZXVSbC8nKwVVJKWAAABoZo3AACpacn4ZfJ7QoqOYOOdPO0VACAQT8F3AAAJ#
[snip: allow period and digit in control sequence names]

> Period (I think) and digits (definitely) must all be catcode other to
> work inside numexpr and so on. I wish it were otherwise, but I don't
> think it's nice to have to use scantokens to sanitise input for all
> numeric work.

[snip: tilde always produces space]

>> So that
>>   \this ~ \that
>> has as space between \this and \that, for example.  Or to get several
>> spaces in a row.
>
> ~ is currently catcode space in expl3 since space itself is catcode
> ignore. So I don't think this suggestion is feasible either.

Thanks, Will.  I think you've almost got it.  The task is to translate input characters into tokens, in a way that well is adapted to writing macros.

You've said that what I suggest is not easily accomplished using TeX itself to do /all/ of the translation.  I agree (although if all characters are made active it's easier).

I'm suggesting that a little program, in some suitable language, transform the input file into an intermediate file that creates something that TeX can readily load to produce the required sequence of macros.

Here, again, is the URL for the proof-of-concept code:
        http://pytex.svn.sourceforge.net/viewvc/pytex/trunk/pytex/sandbox/jfine/macroload/

The more general point, which you implicitly acknowledge in your post, is that using TeX macros to do everything places restrictions on what can be done without there being an unwelcome programming (or runtime) burden.

The specific point is that named parameters is easy, provided one is willing to use another program to do some of the work.

--
Jonathan



The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302).

ATOM RSS1 RSS2