Article View: comp.text.tex
Article #9Re: REAL HACKER'S QUIZZ: redefine \input
From: Joachim Schrod
Date: Tue, 27 Oct 1992 12:25
Date: Tue, 27 Oct 1992 12:25
35 lines
2053 bytes
2053 bytes
In article <ORLOFF.92Oct26182957@surya4.cern.ch>, orloff@surya4.cern.ch (Jean Orloff) writes:
> Dear TeXHackers,
> In writing PSBOX, I came up with the following problem which I can
> still not completely solve.
>
> I want to define \newinput XXX having the following functionalities:
> - (normal)\input XXX
> - \def\lastinputname{XXX}
This is impossible if you want the same behaviour for '\newinput XXX'
and '\input XXX'.
XXX is system dependent, ie, on different systems different characters
might stop the scan of a file name. Therefore you will never be able
to scan a file name portably. There is also no \afterinput,
respectively there is no implicite token which is inserted at the end
of each read file and which one might redefine.
What you can do, of course, is to write a macro \newinput{XXX} which
does what you want. Or you might want to assume that the arg is
delimited by spaces always, then it's also easy. Look for the
definition of \input in latex.tex (I assume that you know that LaTeX's
\input isn't the primitive of TeX82.)
--
Joachim
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Joachim Schrod Email: schrod@iti.informatik.th-darmstadt.de
Computer Science Department
Technical University of Darmstadt, Germany
``How do we persuade new users that spreading fonts across the page
like peanut butter across hot toast is not necessarily the route to
typographic excellence? -- Peter Flynn
Technical Details
Message-ID:
<1992Oct27.122510.13872@news.th-darmstadt.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!iti.informatik.th-darmstadt.de!schrodReferences:
<ORLOFF.92Oct26182957@surya4.cern.ch>Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex Path: arc1-ca.pugleaf.net!sparky!uunet!math.fu-berlin.de!news.th-darmstadt.de!iti.informatik.th-darmstadt.de!schrod From: schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) Subject: Re: REAL HACKER'S QUIZZ: redefine \input Sender: news@news.th-darmstadt.de (The News System) Message-ID: <1992Oct27.122510.13872@news.th-darmstadt.de> Date: Tue, 27 Oct 1992 12:25:10 GMT Distribution: comp.text.tex References: <ORLOFF.92Oct26182957@surya4.cern.ch> Nntp-Posting-Host: hp11.iti.informatik.th-darmstadt.de Organization: TU Darmstadt Lines: 35