[Tugindia] \typein with default value
Kapil Hari Paranjape
kapil at imsc.res.in
Tue Sep 9 16:03:54 CEST 2003
Hello,
On Tue, Sep 09, 2003 at 06:57:29AM -0000, S Ragu wrote:
> for example
>
> \typein[\OasesNum]{Input the OASES VERSION "e.g. 1, 2, 3
> etc."}
>
> I am using the above-mentioned command to get the input from the
> user. Also I need to have a provision for the default value, while
> the customer hits the enter key without any value to the
> variable.
>
How about?
\typein[\OasesNum]{Input the OASES blah blah}
\makeatletter
\ifx\OasesNum\@empty\def\OasesNum{3}\fi
\makeatother
This uses LaTeX's internal \@empty for the empty object.
Kapil.
--
Just go with the flow control, roll with the crunches, and, when you get
a prompt, type like hell.
--
More information about the tugindia
mailing list