From - Tue Jan  8 16:13:29 2002
Return-Path: <ingvast@md.kth.se>
Received: from mailc.telia.com (mailc.telia.com [194.22.190.4]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g08FDJX73893 for
    <metafont@ens.fr>; Tue, 8 Jan 2002 16:13:19 +0100 (CET)
Received: from d1o812.telia.com (d1o812.telia.com [213.66.247.241]) by
    mailc.telia.com (8.11.6/8.11.6) with ESMTP id g08FDIe12159 for
    <metafont@ens.fr>; Tue, 8 Jan 2002 16:13:18 +0100 (CET)
Received: from md.kth.se (h162n2fls34o812.telia.com [213.64.170.162]) by
    d1o812.telia.com (8.10.2/8.10.1) with ESMTP id g08FDIu18067 for
    <metafont@ens.fr>; Tue, 8 Jan 2002 16:13:18 +0100 (CET)
Sender: ingvast@d1o812.telia.com
Message-Id: <3C3B0C3B.BEA45BB4@md.kth.se>
Date: Tue, 08 Jan 2002 16:11:56 +0100
From: Johan Ingvast <ingvast@md.kth.se>
Organization: KTH
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686)
X-Accept-Language: en
Mime-Version: 1.0
To: metafont@ens.fr
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 520
Precedence: list
Subject: [metafont] mpost-graph clipping of lines

Hi
I like the graph package because it outputs nice diagrams. (I know I
don't have to say that)
However I have a problem I've tried to solve all day without success --
the graph code is
too complicated for me.
I try to get the lines that I plot to be clipped at the edges of the
graph.
The edges are set with setrange.
I would prefer not to process every line to cut it up to pices, but
rather do a clip on the area.
One of the problems I run into is Arithmetic overflow in mpost.

Has anybody done this? I think it is a reasonable function to have.

/johan

--
Johan Ingvast, PhD student http://www.md.kth.se/~ingvast/mypage.shtml
Department of Machine Design, Royal Institute of Technology, Sweden
http://www.md.kth.se, http://www.md.kth.se/~cas <--- Walking robot proj
tel +46 (0)8 790 95 36  mob. +46 (0)70 34 34 498




From - Mon Jan 14 03:39:39 2002
Return-Path: <vxs@MailAndNews.com>
Received: from MailAndNews.com ([199.29.68.123]) by nef.ens.fr
    (8.10.1/1.01.28121999) with ESMTP id g0E2dTX10378 for <metafont@ens.fr>;
    Mon, 14 Jan 2002 03:39:29 +0100 (CET)
X-WM-Posted-At: MailAndNews.com; Sun, 13 Jan 02 21:39:26 -0500
X-Webmail-Userid: vxs
Date: Sun, 13 Jan 2002 21:39:25 -0500
Sender: vxs <vxs@MailAndNews.com>
From: vxs <vxs@MailAndNews.com>
To: metafont@ens.fr
X-Exp32-Serialno: 50000000
Message-Id: <3C589E15@MailAndNews.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: InterChange (Hydra) SMTP v3.62
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 521
Precedence: list
Subject: [metafont] Missing Characters in MF Font Generation

I am looking for a solution to a rather simple question about the use of
METAFONT.  Please forgive me as it concerns a difficulty with the most
elementary of tasks.  My environment is standard Red Hat 7.1.

I have created code (per _The METAFONTbook_) which defines a (currently still
small) set of characters.  Upon running MF, selecting "localfont" mode, and
identifying the proper parameter file as input, .600gf and .tfm files are
created.

The .gf can be converted to a .dvi file which displays the characters
correctly.  The contents of these files, however, are apparently not
available to TeX: the characters cannot be used in any TeX document,
including testfont.  All of the characters simply seem to be missing.  (TeX,
however, does appear to know how many characters have been produced as
testfont's \table command does display the appropriate number of (empty)
columns/rows.)  I have tried generating and testing a modified version of a
CM font as well as placing the relevant files in other directories; these
experiments have not been successful.

I suspect that the solution is quite simple even though I have followed
Knuth's instructions and consulted MF's info page and done nothing
extraordinary.  Is there something in particular that I should be doing?


From - Mon Jan 14 08:44:45 2002
Return-Path: <robin.fairbairns@cl.cam.ac.uk>
Received: from wisbech.cl.cam.ac.uk (mta1.cl.cam.ac.uk [128.232.0.15]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g0E7iYX46717 for
    <metafont@ens.fr>; Mon, 14 Jan 2002 08:44:34 +0100 (CET)
Received: from pallas.cl.cam.ac.uk ([128.232.8.88] helo=cl.cam.ac.uk
    ident=rf) by wisbech.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id
    16Q1nG-00012J-00; Mon, 14 Jan 2002 07:44:34 +0000
To: vxs <vxs@MailAndNews.com>
Cc: metafont@ens.fr
Subject: Re: [metafont] Missing Characters in MF Font Generation
In-Reply-To: Your message of
    "Sun, 13 Jan 2002 21:39:25 EST." <3C589E15@MailAndNews.com>
Date: Mon, 14 Jan 2002 07:44:34 +0000
From: Robin Fairbairns <Robin.Fairbairns@cl.cam.ac.uk>
Message-Id: <E16Q1nG-00012J-00@wisbech.cl.cam.ac.uk>
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 522
Precedence: list

> I have created code (per _The METAFONTbook_) which defines a (currently still
> small) set of characters.  Upon running MF, selecting "localfont" mode, and
> identifying the proper parameter file as input, .600gf and .tfm files are
> created.

gftopk is your friend...


From - Mon Jan 14 15:37:44 2002
Return-Path: <vxs@MailAndNews.com>
Received: from MailAndNews.com ([199.29.68.123]) by nef.ens.fr
    (8.10.1/1.01.28121999) with ESMTP id g0EEbZX25873 for <metafont@ens.fr>;
    Mon, 14 Jan 2002 15:37:35 +0100 (CET)
X-WM-Posted-At: MailAndNews.com; Mon, 14 Jan 02 09:37:29 -0500
X-Webmail-Userid: vxs
Date: Mon, 14 Jan 2002 09:37:29 -0500
Sender: vxs <vxs@MailAndNews.com>
From: vxs <vxs@MailAndNews.com>
To: metafont@ens.fr
X-Exp32-Serialno: 50000000
Subject: Re: [metafont] Missing Characters in MF Font Generation
Message-Id: <3C5E228D@MailAndNews.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: InterChange (Hydra) SMTP v3.62
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 523
Precedence: list

The following text by Peter Vanroose, sent on Mon, 14 Jan 2002 06:36:41
+0100, bounced from the list.  He asked me to post it.


---------------------------------------------------------------------------

> ... .600gf and .tfm files are created.

TeX itself only looks at the .tfm file, which contains only information on the
bounding boxes of the characters, not the actual shapes.

To really display the dvi document produced by TeX, the full font information
(available in the "generic" .gf font file) is needed.  However, this
information must be converted to a .pk file to be usable by programs like
dvips or xdvi.  Use gftopk for that.

And finally, depending on your TeX installation, this .pk file has to be made
visible to those programs, either by placing it in the right directory, or
possibly by also running the "texhash" command which places a list of
available (font) files in a repository file (called ls-R on Linux).


--                  Peter Vanroose
                    Electrotechnical Department (ESAT/PSI)
                    K.U.Leuven, Belgium.
                    Peter.Vanroose@esat.kuleuven.ac.be


From - Thu Jan 17 15:28:06 2002
Return-Path: <vxs@MailAndNews.com>
Received: from MailAndNews.com ([199.29.68.123]) by nef.ens.fr
    (8.10.1/1.01.28121999) with ESMTP id g0HERve33609 for <metafont@ens.fr>;
    Thu, 17 Jan 2002 15:27:57 +0100 (CET)
X-WM-Posted-At: MailAndNews.com; Thu, 17 Jan 02 09:27:55 -0500
X-Webmail-Userid: vxs
Date: Thu, 17 Jan 2002 09:27:55 -0500
Sender: vxs <vxs@MailAndNews.com>
From: vxs <vxs@MailAndNews.com>
To: metafont@ens.fr
X-Exp32-Serialno: 50000000
Subject: Re: [metafont] Missing Characters in MF Font Generation
Message-Id: <3C47BD0A@MailAndNews.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: InterChange (Hydra) SMTP v3.62
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 524
Precedence: list

I don't have the message right now, unfortunately, but one poster said that I
did not name my environment.  My first paragraph indicated that I'm using Red
Hat 7.1.  It has, I imagine, a very recent version of standard teTeX and
related software.

Thanks to everyone for their advice.  The presence of a .600pk file did not
solve the problem.  Per Peter Vanroose's suggestion I ran texhash, which
updated ls-R in both /usr/share/texmf/ and /var/lib/texmf/.  And upon running
texconfig I discovered that the latter directory is in fact intended for font
generation.  But after calling texhash and copying the .pk, .mf, and .tfm
files into every possibly-related directory TeX still does not find the
actual glyphs---the same blank font is displayed (or not displayed, if you
prefer).

When running `tex testfont' and selecting font10 as test font in the same
directory as the .mf, .tfm, .DPIgf, and .DPIpk files, nothing much happens.
TeX just produces the mostly empty .dvi.  But when I move to another
directory, though, and issue the same commands, Kpathsea (the path-searching
library) complains that it, I think, cannot find or create the necessary .tfm
file.  But ls-R has been updated.

So I still have had no success; I find it rather strange.

By the way, I do not see CM .pk files in my system.  In /texmf/fonts/ the
source and tfm directories are full of .mf and .tfm files for CM; pk/
contains nothing related to CM.  I don't think that any .gf files are
present, either.  Perhaps it's a stupid question, but how, then, does TeX
find the glyphs for CM?


From - Thu Jan 17 16:25:54 2002
Return-Path: <tim@maths.tcd.ie>
Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11])
    by nef.ens.fr (8.10.1/1.01.28121999) with SMTP id g0HFPke41545 for
    <metafont@ens.fr>; Thu, 17 Jan 2002 16:25:46 +0100 (CET)
Received: from boole.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id
    <aa11623@salmon>; 17 Jan 2002 15:25:45 +0000 (GMT)
Date: Thu, 17 Jan 2002 15:25:45 +0000
From: Timothy Murphy <tim@maths.tcd.ie>
To: metafont@ens.fr
Subject: Re: [metafont] Missing Characters in MF Font Generation
Message-Id: <20020117152545.GA87647@boole.maths.tcd.ie>
References: <3C47BD0A@MailAndNews.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3C47BD0A@MailAndNews.com>
User-Agent: Mutt/1.3.25i
Sender: tim@maths.tcd.ie
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 525
Precedence: list

On Thu, Jan 17, 2002 at 09:27:55AM -0500, vxs wrote:

> By the way, I do not see CM .pk files in my system.  In /texmf/fonts/ the
> source and tfm directories are full of .mf and .tfm files for CM; pk/
> contains nothing related to CM.  I don't think that any .gf files are
> present, either.  Perhaps it's a stupid question, but how, then, does TeX
> find the glyphs for CM?

I didn't see your earlier posting, so am not sure exactly what you are trying to do.
But the file .../texmf/web2c/texmf.cnf will tell you
where TeX is looking for various kinds of file.

PK fonts are normally constructed "on the fly" from the corresponding MF files,
if they (the PK fonts) do not already exist.
They will usually be placed somewhere in the directory .../texmf/fonts/...
if this is world-writeable.
Otherwise they are placed in some /var/... directory.

The command kpsewhich may help to tell you where TeX is looking for things,
eg "kpsewhich -debug=-1 font10.600pk" will tell you (at length)
where TeX looks for font10.600pk .

tex/latex themselves only need TFM files.
dvips requires actual glyphs.
Note though that dvips may be set up to use Type 1 (PostScript) versions of CM fonts.
This is specified in .../texmf/dvips/config/psfonts.map .

-- 
Timothy Murphy  
e-mail: tim@maths.tcd.ie
tel: 086-233 6090
s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland


From - Thu Jan 17 16:32:16 2002
Return-Path: <beebe@sunshine.math.utah.edu>
Received: from sunshine.math.utah.edu (sunshine.math.utah.edu
    [128.110.198.2]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id
    g0HFW5e42721 for <metafont@ens.fr>; Thu, 17 Jan 2002 16:32:05 +0100 (CET)
Received: from suncore.math.utah.edu
    (IDENT:6rBA6PEkDdjbOaUp956nLJRenxH0I2nx@suncore0.math.utah.edu
    [128.110.198.5]) by sunshine.math.utah.edu (8.9.3/8.9.3) with ESMTP id
    IAA09288; Thu, 17 Jan 2002 08:32:03 -0700 (MST)
Received: (from beebe@localhost) by suncore.math.utah.edu (8.9.3/8.9.3) id
    IAA29305; Thu, 17 Jan 2002 08:32:03 -0700 (MST)
Date: Thu, 17 Jan 2002 08:32:03 -0700 (MST)
From: "Nelson H. F. Beebe" <beebe@math.utah.edu>
To: metafont@ens.fr
Cc: beebe@math.utah.edu, vxs <vxs@MailAndNews.com>
X-Us-Mail: "Center for Scientific Computing, Department of Mathematics, 322 INSCC, University of Utah, 155 S 1400 E RM 233, Salt Lake City, UT 84112-0090, USA"
X-Telephone: +1 801 581 5254
X-Fax: +1 801 585 1640, +1 801 581 4148
X-Url: http://www.math.utah.edu/~beebe
Subject: Re: [metafont] Missing Characters in MF Font Generation
In-Reply-To: Your message of Thu, 17 Jan 2002 09:27:55 -0500
Message-Id: <CMM.0.92.0.1011281523.beebe@suncore.math.utah.edu>
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 526
Precedence: list

vxs <vxs@MailAndNews.com> reports on Thu, 17 Jan 2002 09:27:55 -0500
of problems with TeX not finding font files.

The best solution to this problem is to use a system call tracer,
available on some (but, alas, not all) UNIX platforms:

	GNU/Linux (all architectures):	strace
	SGI IRIX 6.x:			par
	Sun Solaris:			truss
	Sun SunOS:			trace (if I remember correctly)

Compaq/DEC Alpha OSF/1 does not come with such a utility, but there
are third-party ones at

	ftp://ftp.mrc-lmb.cam.ac.uk/pub/jkb/strace-3.1.0.1-du.tar.gz
	http://prdownloads.sourceforge.net/strace/strace_4.4-1.tar.gz
	ftp://ftp.iastate.edu/pub/unix/osf1/trace/

I have yet to find one for IBM AIX, and I badly need one there.

So, to track the missing font problem on a Red Hat GNU/Linux system,
do this:

	% cat foo.tex
	\font \x = NewCenturySchlbk-Bold at 14.4pt
	\x
	Hello, world
	\bye

	% strace -f -o foo.strace tex foo.tex
	This is TeX, Version 3.1415 (C version 6.1)
	(foo.tex [1] )
	Output written on foo.dvi (1 page, 224 bytes).
	Transcript written on foo.log.

	% fgrep .tfm foo.strace
	3317  access("/usr/local/lib/tex/fonts/cm/600dpi/NewCenturySchlbk-Bold.tfm", R_OK) = -1 ENOENT (No such file or directory)
	3317  stat("/usr/local/lib/tex/fonts/cm/tfms", {st_mode=S_IFDIR|S_ISGID|0775, st_size=3072, ...}) = 0
	...

The pattern of access() and/or open() calls will give you a clue about
the directories that are being searched, and that might lead to a
solution.

The TeXlive 6 documents

	texmf/doc/tldoc/{deutsch,english,french,polish,slovak}/live.pdf

contain in Table 1 on pp. 36--37 (of the English edition) a summary of
the correspondence between environment variables and file extensions.

It is too bad that kpathsea does not appear to have a way to show you
what environment variable(s) are used in searching for particular
files; I will be pleased to be corrected if I'm wrong about this.

-------------------------------------------------------------------------------
- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 585 1640, +1 801 581 4148 -
- University of Utah                    Internet e-mail: beebe@math.utah.edu  -
- Department of Mathematics, 322 INSCC      beebe@acm.org  beebe@computer.org -
- 155 S 1400 E RM 233                       beebe@ieee.org                    -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -
-------------------------------------------------------------------------------


From - Thu Jan 17 17:27:17 2002
Return-Path: <robin.fairbairns@cl.cam.ac.uk>
Received: from wisbech.cl.cam.ac.uk (mta1.cl.cam.ac.uk [128.232.0.15]) by
    nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g0HGR9e50921 for
    <metafont@ens.fr>; Thu, 17 Jan 2002 17:27:09 +0100 (CET)
Received: from pallas.cl.cam.ac.uk ([128.232.8.88] helo=cl.cam.ac.uk
    ident=rf) by wisbech.cl.cam.ac.uk with esmtp (Exim 3.092 #1) id
    16RFNc-000061-00; Thu, 17 Jan 2002 16:27:08 +0000
To: Timothy Murphy <tim@maths.tcd.ie>
Cc: metafont@ens.fr
Subject: Re: [metafont] Missing Characters in MF Font Generation
In-Reply-To: Your message of
    "Thu, 17 Jan 2002 15:25:45 GMT." <20020117152545.GA87647@boole.maths.tcd.ie>
Date: Thu, 17 Jan 2002 16:27:08 +0000
From: Robin Fairbairns <Robin.Fairbairns@cl.cam.ac.uk>
Message-Id: <E16RFNc-000061-00@wisbech.cl.cam.ac.uk>
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 527
Precedence: list

> Note though that dvips may be set up to use Type 1 (PostScript) versions of CM fonts.
> This is specified in .../texmf/dvips/config/psfonts.map .

the latest/greatest xdvi also uses type1 fonts.

(i've just built it for the first time: it's rather impressive.)


From - Mon Jan 28 22:04:37 2002
Return-Path: <vxs@MailAndNews.com>
Received: from MailAndNews.com ([209.125.93.5]) by nef.ens.fr
    (8.10.1/1.01.28121999) with ESMTP id g0SL4Qu20929 for <metafont@ens.fr>;
    Mon, 28 Jan 2002 22:04:27 +0100 (CET)
X-WM-Posted-At: MailAndNews.com; Mon, 28 Jan 02 16:04:25 -0500
X-Webmail-Userid: vxs
Date: Mon, 28 Jan 2002 16:04:25 -0500
Sender: vxs <vxs@MailAndNews.com>
From: vxs <vxs@MailAndNews.com>
To: metafont@ens.fr
X-Exp32-Serialno: 50000000
Subject: Re: [metafont] Missing Characters in MF Font Generation
Message-Id: <3C80B8E4@MailAndNews.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-Mailer: InterChange (Hydra) SMTP v3.62
X-Virus-Scanner: AMaVis 0.2.0-pre6 / Virus Scan
X-Loop: metafont@nef.ens.fr
X-Sequence: 528
Precedence: list

Just a brief note: I discovered (by using dvips, which also calls gftopk)
that while the new glyphs are not visible in the TeX-generated .dvi file,
they are in fact rendered in the .ps version.  So I seem to be able to use
the new font in .ps documents.  (Perhaps I assumed that one would see the
font in TeX-generated .dvi files since one sees it in gftodvi-generated .dvi
files.)  Anyway, many thanks to everyone for their help. . . .


