ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: MP Graph
       [not found] <20021028210944.28543@news.comp.lancs.ac.uk>
@ 2002-10-30  8:55 ` Hans Hagen
  2002-10-30 10:12   ` Adam Lindsay
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2002-10-30  8:55 UTC (permalink / raw)
  Cc: ntg-context

At 09:09 PM 10/28/2002 +0000, you wrote:

>The attached file (which uses one of the standard mp-graph data files)
>fails (see pdf) in a directory without texnum.mpx, but succeeds when that
>file is present. I'm sorting (doing a diff) through the logs generated on
>each run to see which is the best to report on.

Maybe something has changed to graph.mp (esp the trigger for reloading it),

in mp-form add a line at the top:

   boolean mant_font ; mant_font := true ;

this will prevent loading form.mp (which is replaced by a sligthly extended 
version mp-form) and therefore loading of texnum

Also in your graphic: use the simpler \startMPcode ... \stopMPcode and not 
the low level macros; also saves keying.

if you have the *.d files and m-graph.tex on the same path, you can run

   texexec --mode=demo --pdf m-graph

to get a test file

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph
  2002-10-30  8:55 ` MP Graph Hans Hagen
@ 2002-10-30 10:12   ` Adam Lindsay
  2002-10-30 13:46     ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Adam Lindsay @ 2002-10-30 10:12 UTC (permalink / raw)
  Cc: ntg-context

Hi Hans.

I believe Hans Hagen said this around Wed, 30 Oct 2002:

>Maybe something has changed to graph.mp (esp the trigger for reloading it),
>
>in mp-form add a line at the top:
>
>   boolean mant_font ; mant_font := true ;
>
>this will prevent loading form.mp (which is replaced by a sligthly extended 
>version mp-form) and therefore loading of texnum

I did that as instructed, (and remade metafun (oops, didn't do that at
first) in the right place (oops again)), and it was successful.

Thanks! That solves the big issue.

It'll take me a bit longer to figure out how to use init_numbers so that
I can have the axis numbering be in the font I want (expecially because
it depends on the math font). My initial experiment with the following
ugly hack didn't work:

 init_numbers(btex$-$etex, btex{\ss 1}etex, btex${\times}${\ss 10}etex,
  btex${}^-$etex, btex${}^2$etex);

>Also in your graphic: use the simpler \startMPcode ... \stopMPcode and not 
>the low level macros; also saves keying.

Ah, right. I had only skimmed through the metafun docs, and didn't notice
that simpler approach while I was reading chapter 3: Embedded graphics.
Keying isn't a big concern as I'm planning on wrapping those calls into
macros of some sort, but it helps to use the "right" command.

>if you have the *.d files and m-graph.tex on the same path, you can run
>
>   texexec --mode=demo --pdf m-graph
>
>to get a test file

Yup. That's how I got started.
And if other people want to find those *.d files, take a look in:
 texmf/doc/metapost/base/


Many thanks,
adam

--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Adam Lindsay                  +44(0)1524 594 537
 atl@comp.lancs.ac.uk
 http://www.comp.lancs.ac.uk/computing/users/atl/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph
  2002-10-30 10:12   ` Adam Lindsay
@ 2002-10-30 13:46     ` Hans Hagen
  2002-10-31 16:05       ` Nigel King
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2002-10-30 13:46 UTC (permalink / raw)
  Cc: ntg-context

At 10:12 AM 10/30/2002 +0000, Adam Lindsay wrote:

>It'll take me a bit longer to figure out how to use init_numbers so that
>I can have the axis numbering be in the font I want (expecially because
>it depends on the math font). My initial experiment with the following
>ugly hack didn't work:
>
>  init_numbers(btex$-$etex, btex{\ss 1}etex, btex${\times}${\ss 10}etex,
>   btex${}^-$etex, btex${}^2$etex);

actually, this si not used at all, when enables, context/metafun will use 
"textext" which follows the document settings

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph
  2002-10-30 13:46     ` Hans Hagen
@ 2002-10-31 16:05       ` Nigel King
  2002-10-31 23:28         ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Nigel King @ 2002-10-31 16:05 UTC (permalink / raw)
  Cc: ntg-context

Following this thread and making the modifications suggested by Hans I had
expected the following metapost graph to work but there is a problem with
fonts. Even though in context cont-sys.tex is executed giving ec as the
default encoding in the metapost case it has defaulted to 8t in the encoding
extension. I tried 
\unprotect
\setupencoding [\s!default=ec]
\protect
Before \setupbodyfont with no effect

-----begin mp file
input metafun ;

verbatimtex
\setupbodyfont[pos,12pt]
\starttext
etex
input graph;

prologues:=2;


beginfig(1);
draw begingraph(2in,2in);
setrange(80,0, 90,180);
autogrid(otick.bot,otick.lft);
endgraph;
endfig;

verbatimtex
\stoptext
etex

end
-----end mp file
-- 
Nigel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph
  2002-10-31 16:05       ` Nigel King
@ 2002-10-31 23:28         ` Hans Hagen
  2002-11-03 22:05           ` Re: MP Graph - Berry problems 23/10/2002 Nigel King
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2002-10-31 23:28 UTC (permalink / raw)
  Cc: Adam Lindsay, ntg-context

At 04:05 PM 10/31/2002 +0000, Nigel King wrote:
>Following this thread and making the modifications suggested by Hans I had
>expected the following metapost graph to work but there is a problem with
>fonts. Even though in context cont-sys.tex is executed giving ec as the
>default encoding in the metapost case it has defaulted to 8t in the encoding
>extension. I tried
>\unprotect
>\setupencoding [\s!default=ec]
>\protect
>Before \setupbodyfont with no effect

\startMPenvironment
\setupencoding[default=ec]
etc etc
\stopMPenvironment

is the way to go

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
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph - Berry problems 23/10/2002
  2002-10-31 23:28         ` Hans Hagen
@ 2002-11-03 22:05           ` Nigel King
  2002-11-04  8:59             ` Jens-Uwe Morawski
  0 siblings, 1 reply; 11+ messages in thread
From: Nigel King @ 2002-11-03 22:05 UTC (permalink / raw)
  Cc: Adam Lindsay, ntg-context


>> Following this thread and making the modifications suggested by Hans I had
>> expected the following metapost graph to work but there is a problem with
>> fonts. Even though in context cont-sys.tex is executed giving ec as the
>> default encoding in the metapost case it has defaulted to 8t in the encoding
>> extension. I tried
>> \unprotect
>> \setupencoding [\s!default=ec]
>> \protect
>> Before \setupbodyfont with no effect
> 
> \startMPenvironment
> \setupencoding[default=ec]
> etc etc
> \stopMPenvironment
> 
> is the way to go
> 
> Hans

Thanks Hans I think that you may have missed the point. I was wanting to
arrange the fonts in the metapost output from a metapost file to be from the
pos set. The file below is a minimum one which works nicely showing times,
helvetica, and courier fonts.

New Berry problem.
One of the problems that made this more difficult to fault find was that the
berry (ec) encoding seems to have stopped working properly in the 23/10/2002
release. I have had to change to texnansi to get my previous files to
compile properly.
-- 
Nigel

input metafun ;
verbatimtex
\setupencoding
    [default=texnansi]
\setupbodyfont
    [pos,rm,11pt]
\def\f#1{\framed[frame=off,align=middle]{#1}}
\starttext
etex
prologues:=2;
beginfig(1);
label(btex \f{times\\\ss helvetica\\\tt courier} etex,origin);
endfig;
verbatimtex
\stoptext
etex
end
endinput

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph - Berry problems 23/10/2002
  2002-11-03 22:05           ` Re: MP Graph - Berry problems 23/10/2002 Nigel King
@ 2002-11-04  8:59             ` Jens-Uwe Morawski
  2002-11-04 10:48               ` Nigel King
  0 siblings, 1 reply; 11+ messages in thread
From: Jens-Uwe Morawski @ 2002-11-04  8:59 UTC (permalink / raw)


On Sun, 03 Nov 2002 22:05:44 +0000
Nigel King <king@dircon.co.uk> wrote:

> 
> >> Following this thread and making the modifications suggested by Hans I had
> >> expected the following metapost graph to work but there is a problem with
> >> fonts. Even though in context cont-sys.tex is executed giving ec as the
> >> default encoding in the metapost case it has defaulted to 8t in the encoding
> >> extension. I tried
> >> \unprotect
> >> \setupencoding [\s!default=ec]
> >> \protect
> >> Before \setupbodyfont with no effect

Hmm, maybe i miss here something, but 8t is ec-encoding, isn't it?


> New Berry problem.
> One of the problems that made this more difficult to fault find was that the
> berry (ec) encoding seems to have stopped working properly in the 23/10/2002
> release. I have had to change to texnansi to get my previous files to
> compile properly.

> input metafun ;
> verbatimtex
> \setupencoding
>     [default=texnansi]

default= means: use this encoding if no encoding is specified for the
font
Does \usetypescript[berry][ec] help?

> \setupbodyfont
>     [pos,rm,11pt]

Best,
  Jens

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph - Berry problems 23/10/2002
  2002-11-04  8:59             ` Jens-Uwe Morawski
@ 2002-11-04 10:48               ` Nigel King
  2002-11-04 14:00                 ` Jens-Uwe Morawski
  0 siblings, 1 reply; 11+ messages in thread
From: Nigel King @ 2002-11-04 10:48 UTC (permalink / raw)


replacing
 \setupencoding
     [default=texnansi]
With
 \usetypescript[berry][ec]
Causes the error again the start of which is shown below

kpathsea: Running mktextfm  utmr8t
mktextfm: Running mf \mode:=ljfour; mag:=1; nonstopmode; input utmr8t

-- 
Nigel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph - Berry problems 23/10/2002
  2002-11-04 10:48               ` Nigel King
@ 2002-11-04 14:00                 ` Jens-Uwe Morawski
  2002-11-04 15:34                   ` Nigel King
  0 siblings, 1 reply; 11+ messages in thread
From: Jens-Uwe Morawski @ 2002-11-04 14:00 UTC (permalink / raw)


On Mon, 04 Nov 2002 10:48:36 +0000
Nigel King <king@dircon.co.uk> wrote:

> replacing
>  \setupencoding
>      [default=texnansi]
> With
>  \usetypescript[berry][ec]
> Causes the error again the start of which is shown below
> 
> kpathsea: Running mktextfm  utmr8t
> mktextfm: Running mf \mode:=ljfour; mag:=1; nonstopmode; input utmr8t

this is since there is no utmr8t.tfm on your system. Older TeX systems
had (IMO) wrong tfm file names like ptmr8t.tfm for Times in T1
encoding. The problem is that the "p" means the font-vendor is Adobe,
but all font setups have used fonts from URW. Thus the "p" is wrong
and has been replaced with the appropriate "u" for URW in modern TeX
systems, for example in TeXLive. ConTeXt is correctly configured to
use these URW font names. The best solution is to install a TeX
system that provides these font names.

Jens

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph - Berry problems 23/10/2002
  2002-11-04 14:00                 ` Jens-Uwe Morawski
@ 2002-11-04 15:34                   ` Nigel King
  2002-11-04 20:32                     ` Jens-Uwe Morawski
  0 siblings, 1 reply; 11+ messages in thread
From: Nigel King @ 2002-11-04 15:34 UTC (permalink / raw)


Jens,
> this is since there is no utmr8t.tfm on your system. Older TeX systems
> had (IMO) wrong tfm file names like ptmr8t.tfm for Times in T1
> encoding. The problem is that the "p" means the font-vendor is Adobe,
> but all font setups have used fonts from URW. Thus the "p" is wrong
> and has been replaced with the appropriate "u" for URW in modern TeX
> systems, for example in TeXLive. ConTeXt is correctly configured to
> use these URW font names. The best solution is to install a TeX
> system that provides these font names.
> 
Thanks for this, utmr8t.tfm is indeed not on my system at work which is
older. I have just installed Gerben's i-installed TeX-fat.dmg on my home
machine. It will be interesting to see what is there. I mistakenly thought
that I was expecting 8a on the end for ec encoding. I do have ec-utmr8a.tfm
manufactured by texfont by type-tmf.dat dated 11/9/01 even thought the
overall context is 23/10/02. Appropriate lines duplicated below.

# urw times 

--en=? --ve=urw --co=times --so=auto
--en=? --ve=urw --co=times --so=auto --ca=* utmr8a
--en=? --ve=urw --co=times --so=auto --sl=* utmr8a
--en=? --ve=urw --co=times --so=auto --sl=* utmb8a
 
-- 
Nigel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Re: MP Graph - Berry problems 23/10/2002
  2002-11-04 15:34                   ` Nigel King
@ 2002-11-04 20:32                     ` Jens-Uwe Morawski
  0 siblings, 0 replies; 11+ messages in thread
From: Jens-Uwe Morawski @ 2002-11-04 20:32 UTC (permalink / raw)


On Mon, 04 Nov 2002 15:34:45 +0000
Nigel King <king@dircon.co.uk> wrote:

> I mistakenly thought
> that I was expecting 8a on the end for ec encoding. I do have ec-utmr8a.tfm
> manufactured by texfont by type-tmf.dat dated 11/9/01 even thought the
> overall context is 23/10/02.

8a means the original encoding of the AFMs. texfont takes this basename and
precedes this with a ec- for a T1 (ec) encoded font. This is the ConTeXt/texfont
naming scheme. If you stick to the Berry naming scheme then this font will
be 8t in T1 encoding, 7t in OT1 and there are some more, see fontinst.[dvi|ps|pdf]
on CTAN. Normally the T1 encoded fonts are already on your system due to
the LaTeX PSNFSS (PostScript New Font Selection Scheme) has already installed it.
Thus you don't need to install them again using texfont, the only thing to do is
to tell ConTeXt that the Berry fontnames have to be used. This is exactly what
\usetypescript[berry][ec] does.

Jens

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-11-04 20:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20021028210944.28543@news.comp.lancs.ac.uk>
2002-10-30  8:55 ` MP Graph Hans Hagen
2002-10-30 10:12   ` Adam Lindsay
2002-10-30 13:46     ` Hans Hagen
2002-10-31 16:05       ` Nigel King
2002-10-31 23:28         ` Hans Hagen
2002-11-03 22:05           ` Re: MP Graph - Berry problems 23/10/2002 Nigel King
2002-11-04  8:59             ` Jens-Uwe Morawski
2002-11-04 10:48               ` Nigel King
2002-11-04 14:00                 ` Jens-Uwe Morawski
2002-11-04 15:34                   ` Nigel King
2002-11-04 20:32                     ` Jens-Uwe Morawski

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).