🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #102

Re: REAL HACKER'S QUIZZ: redefine \input

#102
From: Jean Orloff
Date: Thu, 29 Oct 1992 18:27
48 lines
2550 bytes
>>>>> On 27 Oct 92 12:25:10 GMT, schrod@iti.informatik.th-darmstadt.de
Joachim> In article <ORLOFF.92Oct26182957@surya4.cern.ch>, orloff@surya4.cern.ch (Jean Orloff) writes:
> 
> I want to define \newinput XXX having the following functionalities:
> - (normal)\input XXX
> - \def\lastinputname{XXX}

Joachim> This is impossible if you want the same behaviour for
Joachim> '\newinput XXX' and '\input XXX'.

Precisely, this is the problem!

Joachim> XXX is system dependent, ie, on different systems different
Joachim> characters might stop the scan of a file name. Therefore you

Are you sure? I know that the scanning stops on spaces even on systems
(eg Mac's) allowing white spaces in filenames and even on the ones
REQUIRING a white space before the extension (eg IBM VM/CMS which
remaps \input abc.tex into abc tex a0)... It surely stops on
unexpandable tokens everywhere.

Joachim> also easy. Look for the definition of \input in latex.tex (I
Joachim> assume that you know that LaTeX's \input isn't the primitive
Joachim> of TeX82.)

Of course I know it, this is the origin of my trouble!

Let me rephrase the heart of my problem: suppose I have a control
sequence \text containg a_11, b_11, {_1, c_11, }_2. How would I change
the catcodes of the inner braces???

Or even more simply: suppose I \let\nxtchar=X_y (char X with catcode
y). How can I change it's catcode to other (12)???

\begingroup
\catcode\expandafter'\nxtchar=12 \nxtchar
\endgroup

fails miserably... (as it should!)

TeXly your's
Jean
--
*************************************************************************
*	Jean Orloff		*	e-mail: ORLOFF@dxcern.cern.ch	*
*	TH-Division, CERN	*	phone:	(41-22) 767-3204	*
*	CH-1211 Geneva 23	*	fax:	(41-22) 782-3914	*
*************************************************************************
Technical Details
Message-ID: <ORLOFF.92Oct29192755@surya4.cern.ch>
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!pacbell.com!sgiblab!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!dxcern!dxcern!orloff
References: <ORLOFF.92Oct26182957@surya4.cern.ch> <1992Oct27.122510.13872@news.th-darmstadt.de>

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!kithrup!hoptoad!pacbell.com!sgiblab!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!dxcern!dxcern!orloff
From: orloff@surya4.cern.ch (Jean Orloff)
Subject: Re: REAL HACKER'S QUIZZ: redefine \input
In-Reply-To: schrod@iti.informatik.th-darmstadt.de's message of 27 Oct 92 12:25:10 GMT
Message-ID: <ORLOFF.92Oct29192755@surya4.cern.ch>
Sender: news@dxcern.cern.ch (USENET News System)
Organization: CERN, European Research Center for Particle Physics
References: <ORLOFF.92Oct26182957@surya4.cern.ch>
 <1992Oct27.122510.13872@news.th-darmstadt.de>
Distribution: comp.text.tex
Date: Thu, 29 Oct 1992 18:27:55 GMT
Lines: 48