* Just testing
@ 2001-01-17 16:38 Pierre Goossens
2001-01-26 20:42 ` Labeling of axes walter kehowski
0 siblings, 1 reply; 9+ messages in thread
From: Pierre Goossens @ 2001-01-17 16:38 UTC (permalink / raw)
Hello everyone,
On January 15th at 23:31 I posted a message to ntg-context@ntg.nl
Since that time I received messages from the mailinglist but I haven't seen
the one I submitted. I didn't get a reply from my postmaster so I looks
like it is on its way. But because of the long wait I decided to try it
with this one (January 17th, 17:35). Let's see....
With regards,
Pierre Goossens
^ permalink raw reply [flat|nested] 9+ messages in thread
* Labeling of axes
2001-01-17 16:38 Just testing Pierre Goossens
@ 2001-01-26 20:42 ` walter kehowski
2001-01-28 19:03 ` Hans Hagen
0 siblings, 1 reply; 9+ messages in thread
From: walter kehowski @ 2001-01-26 20:42 UTC (permalink / raw)
Cc: ntg-context
ConTeXtnicians,
This is a MetaPost question, not a ConTeXt question, per se. Does anybody know
how to use a for loop to label axes and, secondly, how to pass paramters to a
metapost file?
For example,
numeric u; u=1.0cm;
for i=-10 upto 10:
if not(i=0) lablel.lft(btex $i$ etex, (i,0)*u); fi;
endfor;
does not work. Any suggestions?
Thanks,
Walter Kehowski
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Labeling of axes
2001-01-26 20:42 ` Labeling of axes walter kehowski
@ 2001-01-28 19:03 ` Hans Hagen
2001-01-29 15:46 ` Ed L Cashin
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Hans Hagen @ 2001-01-28 19:03 UTC (permalink / raw)
Cc: ntg-context
At 01:42 PM 1/26/01 -0700, walter kehowski wrote:
>ConTeXtnicians,
>
>This is a MetaPost question, not a ConTeXt question, per se. Does anybody
know
>how to use a for loop to label axes and, secondly, how to pass paramters to a
>metapost file?
>
>For example,
>
>numeric u; u=1.0cm;
>for i=-10 upto 10:
>if not(i=0) lablel.lft(btex $i$ etex, (i,0)*u); fi;
>endfor;
>
>does not work. Any suggestions?
This is indeed a problem, since metapost only sees one btex/etex here and
not obe for every loop.
This is why in context you can use the textext macro:
beginfig(1) ;
numeric u ; u = 1.0cm ;
for i=-10 upto 10 :
if not (i=0) :
draw textext.lft("$" & decimal i & "$") shifted (i*u,0) ;
fi ;
endfor;
endfig ;
end
given that you have configured texexec well:
texexec --mptex thisfile.mp
mptopdf thisfile.1
will give you a nice axis (beware if you look into gs: mptopdf does not
overwrite an open file).
[there are a few more text related tricks; also, i'm working on a module
for drawing axis etc]
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Labeling of axes
2001-01-28 19:03 ` Hans Hagen
@ 2001-01-29 15:46 ` Ed L Cashin
2001-01-29 17:32 ` Hans Hagen
2001-01-29 16:13 ` Marc van Dongen
2003-08-24 19:29 ` Labeling of axes Christopher Creutzig
2 siblings, 1 reply; 9+ messages in thread
From: Ed L Cashin @ 2001-01-29 15:46 UTC (permalink / raw)
Cc: walter kehowski, ntg-context
Hans Hagen <pragma@wxs.nl> writes:
...
> This is indeed a problem, since metapost only sees one btex/etex here and
> not obe for every loop.
>
> This is why in context you can use the textext macro:
>
> beginfig(1) ;
>
> numeric u ; u = 1.0cm ;
>
> for i=-10 upto 10 :
> if not (i=0) :
> draw textext.lft("$" & decimal i & "$") shifted (i*u,0) ;
That is a really great feature! I've been missing an easy way to
interpolate data into tex-typeset labels.
--
--Ed Cashin integrit file verification system
ecashin@coe.uga.edu http://integrit.sourceforge.net/
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Labeling of axes
2001-01-29 15:46 ` Ed L Cashin
@ 2001-01-29 17:32 ` Hans Hagen
0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2001-01-29 17:32 UTC (permalink / raw)
Cc: walter kehowski, ntg-context
At 10:46 AM 1/29/01 -0500, Ed L Cashin wrote:
>Hans Hagen <pragma@wxs.nl> writes:
>
>...
>> This is indeed a problem, since metapost only sees one btex/etex here and
>> not obe for every loop.
>>
>> This is why in context you can use the textext macro:
>>
>> beginfig(1) ;
>>
>> numeric u ; u = 1.0cm ;
>>
>> for i=-10 upto 10 :
>> if not (i=0) :
>> draw textext.lft("$" & decimal i & "$") shifted (i*u,0) ;
>
>That is a really great feature! I've been missing an easy way to
>interpolate data into tex-typeset labels.
An additional thing i've done [already long ago but time flies by] is to
patch some of hobbies modules so that when needed this method is used
instead of the kind of pseudo typesetting that takes place in the diagram
modules. Interesting code in itself, this code of hobby, since it assembles
numbers from snippets of btex/etex pictues, but unfortunately it invokes
too many additional runs.
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Labeling of axes
2001-01-28 19:03 ` Hans Hagen
2001-01-29 15:46 ` Ed L Cashin
@ 2001-01-29 16:13 ` Marc van Dongen
2001-01-29 17:29 ` Hans Hagen
2003-08-24 19:29 ` Labeling of axes Christopher Creutzig
2 siblings, 1 reply; 9+ messages in thread
From: Marc van Dongen @ 2001-01-29 16:13 UTC (permalink / raw)
Cc: walter kehowski, ntg-context
Hans Hagen (pragma@wxs.nl) wrote:
[textext]
: given that you have configured texexec well:
:
: texexec --mptex thisfile.mp
: mptopdf thisfile.1
Hi Hans,
When I try this, I get an error (see end of mail).
When I run this with plain mpost the labels
are all of the form ``unknown''. Am I doing
something wrong?
Thanks in advance.
Regards,
Marc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ConTeXt ver: 2000.1.31 fmt: 2000.10.1 int: english mes: english
language : language en is active
system : cont-new loaded
(/newdisk/dongen/software/usr/local/teTeX/share/texmf/tex/context/base/cont-new
.tex
systems : beware: some patches loaded from cont-new.tex!
! Undefined control sequence.
<argument> \??ks
\doifnot #1#2#3->\edef \!!stringa {#1
}\edef \!!stringb {#2}\unless \ifx \!!s...
\copylocalframed ...c!boven ,\c!strut ,\c!plaats ]
\copyparameters [#1\c!acht...
l.283 [\??ks]
?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Labeling of axes
2001-01-29 16:13 ` Marc van Dongen
@ 2001-01-29 17:29 ` Hans Hagen
[not found] ` <3A769CBD.F164433E@econ.muni.cz>
0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2001-01-29 17:29 UTC (permalink / raw)
Cc: walter kehowski, ntg-context
At 04:13 PM 1/29/01 +0000, Marc van Dongen wrote:
>When I try this, I get an error (see end of mail).
>When I run this with plain mpost the labels
>are all of the form ``unknown''. Am I doing
>something wrong?
This means that no tex is run.
>! Undefined control sequence.
><argument> \??ks
Looks like your cont-new file is out of sync with the rest of context
[actuall you seem to use a new cont-new.tex and an older context]. When i
patch context with new features, keywords may be added, in this case \??ks
is a namespace thing. Therefore all files should be in sync [at least with
new features].
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Labeling of axes
2001-01-28 19:03 ` Hans Hagen
2001-01-29 15:46 ` Ed L Cashin
2001-01-29 16:13 ` Marc van Dongen
@ 2003-08-24 19:29 ` Christopher Creutzig
2 siblings, 0 replies; 9+ messages in thread
From: Christopher Creutzig @ 2003-08-24 19:29 UTC (permalink / raw)
Hans Hagen wrote:
> beginfig(1) ;
>
> numeric u ; u = 1.0cm ;
>
> for i=-10 upto 10 :
> if not (i=0) :
> draw textext.lft("$" & decimal i & "$") shifted (i*u,0) ;
> fi ;
> endfor;
>
> endfig ;
>
> end
>
> given that you have configured texexec well:
>
> texexec --mptex thisfile.mp
> mptopdf thisfile.1
With ConTeXt 2003.8.15, I get (\000) in thisfile.1, which mptopdf does
not handle:
! Undefined control sequence.
l.14 (\0
00) cmsy10 11.95514 fshow
These seem to be the minus signs.
Regards,
Christopher Creutzig
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-08-24 19:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-17 16:38 Just testing Pierre Goossens
2001-01-26 20:42 ` Labeling of axes walter kehowski
2001-01-28 19:03 ` Hans Hagen
2001-01-29 15:46 ` Ed L Cashin
2001-01-29 17:32 ` Hans Hagen
2001-01-29 16:13 ` Marc van Dongen
2001-01-29 17:29 ` Hans Hagen
[not found] ` <3A769CBD.F164433E@econ.muni.cz>
2001-01-30 12:33 ` Bug in XML + Fields? Hans Hagen
2003-08-24 19:29 ` Labeling of axes Christopher Creutzig
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).