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 -------------------------------------------------------------------------
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/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 -------------------------------------------------------------------------
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
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 -------------------------------------------------------------------------
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
On Sun, 03 Nov 2002 22:05:44 +0000
Nigel King
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
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
On Mon, 04 Nov 2002 10:48:36 +0000
Nigel King
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
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
On Mon, 04 Nov 2002 15:34:45 +0000
Nigel King
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
participants (4)
-
Adam Lindsay
-
Hans Hagen
-
Jens-Uwe Morawski
-
Nigel King