From: Hans Hagen <pragma@wxs.nl>
Subject: Re: passing arguments to commands while typing
Date: Wed, 14 Jul 2004 16:04:21 +0200 [thread overview]
Message-ID: <40F53D65.6060409@wxs.nl> (raw)
In-Reply-To: <382a63c76b.3c76b382a6@ki.se>
Johan Sandblom wrote:
>While documenting some Matlab code for barely computer literates I wish to use the positional graphics described in the MetaFun manual. Not sure if this is possible of course. I am not at all successful so far since I cannot get the escaping mechanism to accept my code. It appears that the /hpos works just fine but the {} generate problems. I have tried using <<>> in all ways I could think of but haven't been lucky yet. Is this possible?
>
>Minimal example:
>
>\setuppapersize[S6][S6]
>\setuptyping[option=commands]
>\starttext
>\starttyping
>test /hpos{word}{test} test
>\stoptyping
>\stoptext
>
>
>
\setuppapersize[S6][S6]
\setuptyping[option=commands]
\starttext
\def\naturaltextext#1\relax
{\bgroup
\prettynaturalfont
\def\ascii{#1}%
\setnormalcatcodes
\restorecatcodes
\scantokens\expandafter{\ascii}\ifhmode\unskip\fi
\egroup}
\let\texy\naturaltextext
\starttyping
test /naturaltextext\hpos{word}{test}/relax test
test /texy \rm is the word/relax test
\stoptyping
\MPxy{word}
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
prev parent reply other threads:[~2004-07-14 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-08 17:18 Johan Sandblom
2004-07-14 14:04 ` Hans Hagen [this message]
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=40F53D65.6060409@wxs.nl \
--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).