Re: input command
Toby Thurston <[email protected]> Sat, 8 Apr 2023 23:07:24 +0100
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <[email protected]> |
You are right that the Metapost manual (mpman.pdf) does explain the "input" operation properly.
It is inherited directly from Metafont, so the best documentation for it is pages 179-180 of the Metafont Book.
Fortunately it is pretty simple, so I can quote it directly here. The book says:
- input <filename>. When "input" is expanded, the expansion is null, but
METAFONT prepares to read from the specified file before looking at any more
tokens from its current source. A <filename> is subject to special restrictions
explained on the next page.
And then on the next page it says that the syntax for <filename> depends on the local
operating system and that MF does not even try to convert a file name to tokens; and hence
the operation must appear only in a text file, and not in a list of tokens like the replacement
text for a macro.
The index in the MFBook makes it clear that "input" is a built-in token, and that therefore "it might
be dangerous to redefine it". But re-definition is possible, as shown by the extended example on pp.287-288.
It might be helpful to have a summary of some of this in the MP documentation.
Toby
> On 8 Apr 2023, at 11:00, [email protected] wrote:
>
> Send metapost mailing list submissions to
> [email protected]
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://tug.org/mailman/listinfo/metapost
> or, via email, send a message with subject or body 'help' to
> [email protected]
>
> You can reach the person managing the list at
> [email protected]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of metapost digest..."
>
>
> Today's Topics:
>
> 1. input command (Ernst Reissner)
> 2. Re: input command (peter wilson)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 7 Apr 2023 15:43:11 +0200
> From: Ernst Reissner <[email protected]>
> To: [email protected]
> Subject: [metapost] input command
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Hello all,
>
> I read the metapost manual by J.D. Hobby.
>
> What I wonder: the 'command' input is used several times but it is
> introduced nowhere.
>
> What is it? a macro?, a command??
>
>
> Best Regards,
>
> Ernst
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 7 Apr 2023 19:44:47 +0100
> From: peter wilson <[email protected]>
> To: [email protected]
> Subject: Re: [metapost] input command
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset=UTF-8; format=flowed
>
> Have you checked both the Metapost amd Metafun manuals? Have you asked
> on the mailing list `https://lists.tug.org/metapost`? What do you think
> `command` might mean? --- GOM
>
> On 07/04/2023 14:43, Ernst Reissner wrote:
>> Hello all,
>>
>> I read the metapost manual by J.D. Hobby.
>>
>> What I wonder: the 'command' input is used several times but it is
>> introduced nowhere.
>>
>> What is it? a macro?, a command??
>>
>>
>> Best Regards,
>>
>> Ernst
>>
>> --
>> http://tug.org/metapost/
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> metapost mailing list
> [email protected]
> https://tug.org/mailman/listinfo/metapost
>
>
> ------------------------------
>
> End of metapost Digest, Vol 179, Issue 2
> ****************************************
--
http://tug.org/metapost/