From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: Calculator Programs for Texas Instruments TI-83
Date: Fri, 02 Feb 2001 11:15:31 +0100 [thread overview]
Message-ID: <3.0.6.32.20010202111531.01b38ea0@server-1> (raw)
In-Reply-To: <4.3.2.7.0.20010201163349.00baef08@mail.northcoast.com>
At 05:19 PM 2/1/01 -0800, David Arnold wrote:
>Hans,
>
>I'd like to typeset some calculator programs I've written for my Integral
>Calculus class. I have five of them (one below), that I'd like to typeset
>on a single page. Any good ideas? I'd like some sort of computer font look,
>but the symbols I have to use worry me.
>
>ClrHome
>Prompt A
>Prompt B
>Prompt N
>If int(N/2) <> N/2 %I don't have a not equals (\ne) symbol on my keyboard
>Then
>Disp "N MUST BE EVEN"
>Stop
>End
>(B-A)/N->H
>A->X
>0->S
>For(K,1,N/2,1)
>S+Y1(X)+4*Y1(X+H)+Y1(X+2*H)->S %These ones are supposed to be subscripts
>X+2*H->X
>End
>S*H/3->S
>Disp "METHOD: SIMPSON"
>Disp "SUM:"
>Disp S
Well, i'm not saying that the next solution is the best or most beautiful,
but it works:
\definetyping[XXX]
\setuptyping[option=commands,escape=@]
\def\XXXne {\hsmash{/}=\gobbleoneargument}
\def\XXXsup#1endsup{\high{\ttx\gobbleoneargument#1}}
\def\XXXsub#1endsub{\low{\ttx\gobbleoneargument#1}}
\startXXX
If int(N/2)@XXXne N/2 %I don't have a not equals (\ne) symbol on my keyboard
S+Y1(X)+4*Y1@XXXsub (X+H)endsub+Y1@XXXsup (X+2*H)endsup->S %These ones are
\stopXXX
Watch the space after the @command and also watch the \gobble to get rid of
that space.
Now, is this ugly or not?
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
parent reply other threads:[~2001-02-02 10:15 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <4.3.2.7.0.20010201163349.00baef08@mail.northcoast.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3.0.6.32.20010202111531.01b38ea0@server-1 \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).