[comp.text.tex] Amateur MF user needs help, please

fac2@dayton.saic.com (Earle Ake) (06/08/90)

	I am trying to build up our logo using MetaFONT with little
success.  The logo has areas bounded by curved and straight lines.  I
am trying to use the draw and flex commands of MetaFONT with no success.
What am I doing wrong?  Could someone steer me in the right direction?
I keep getting the error:

! A tertiary expression can't begin with `..'.
<inserted text> 
                0
<to be read again> 
                   ..

If I leave out the `..', it gives me an error and tells me it inserted it for
me.  HELP!!!!!

Thanks alot in advance.

-Earle

_____________________________________________________________________________
             ____ ____    ___
Earle Ake   /___ /___/ / /     Science Applications International Corporation
           ____//   / / /__                 Dayton, Ohio
-----------------------------------------------------------------------------
Internet: fac2%dayton.saic.com@uunet.uu.net    uucp: dayvb!fac2


File: saiclogo1.mf

mode_setup;
 em#:=0.5in#; cap#:=1.25in#;
 thin#:=1/3pt#; thick#:=5/6pt#;
 o#:=1/5pt#;
define_pixels(em,cap);
define_blacker_pixels(thin,thick);
define_corrected_pixels(o);
%
beginchar("d",em#,cap#,0); "SAIC Logo";
path piece[];
%
	x1=7.5;x2=198.5;x3=197.5;x4=160;
	y1=y2=14.5;y3=y4=13;
	x5=163;x6=196.5;x7=191;
	y5=y6=11;y7=0;
	x8=45;y8=0;
%
piece0 =
	draw z1---z2---z3---z4
	& flex(z4,(161,11.5),z5)
	& draw z5---z6---z7---z8---z1
	& .. cycle;
%
% This will be in a loop from 0 to n
%
for n=0 upto 0:
  fill piece[n] shifted (150,50) scaled (w/300);
endfor endchar;
end.




$ @build_saic-logo1
(TEX_ROOT:[MF]PLAIN.MF;1
Preloading the plain base, version 1.0: preliminaries,
 basic constants and mathematical macros,
 macros for converting from device-independent units to pixels,
 macros and tables for various modes of operation,
 macros for drawing and filling,
 macros for proof labels and rules,
 macros for character and font administration,
and a few last-minute items.)
*(TEX_ROOT:[CM]SAUTER1.MF;1)
*(FACILITY$DIR:[FAC2.DECUS-LOGO]SAICLOGO1.MF;3
! A tertiary expression can't begin with `..'.
<inserted text> 
                0
<to be read again> 
                   ..
l.21 ^^I& ..
             cycle;
? 

dhosek@sif.claremont.edu (Hosek, Donald A.) (06/08/90)

In article <1100.266e70b4@dayton.saic.com>, fac2@dayton.saic.com (Earle Ake) writes...

>	I am trying to build up our logo using MetaFONT with little
>success.  The logo has areas bounded by curved and straight lines.  I
>am trying to use the draw and flex commands of MetaFONT with no success.
>What am I doing wrong?  Could someone steer me in the right direction?
>I keep getting the error:

>! A tertiary expression can't begin with `..'.
><inserted text> 
>                0
><to be read again> 
>                   ..

>path piece[];
  [omitted code]
>piece0 =
>	draw z1---z2---z3---z4
>	& flex(z4,(161,11.5),z5)
>	& draw z5---z6---z7---z8---z1
>	& .. cycle;

Let's see... first, you don't want those draws in there. draw is
a command that operates on a path, not something that can be part
of a path (take a really close look at the code on page 124 of
the MFbook. That plus dumping the .. on the last line (each
segment joined with "&" should be a complete path in itself)
should take care of most of the problem.

The end result should look like

piece0 = z1--z2--z3--z4
       & flex(z4,(161,11.5),z5)
       & z5--z6--z7--z8--z1 
       & cycle;

-dh

---
Don Hosek                         "Other people get into occupations by 
dhosek@ymir.claremont.edu          accident or design; but writers are born. 
dhosek@ymir.bitnet                 We have to write. I have to write. I 
uunet!jarthur!ymir                 could work at selling motels, or slopping 
                                   hogs, for fifty years, but if someone asked 
This space for rent. Call          me my occupation, I'd say writer, even if 
now for the best rates.            I'd never sold a word. Writers _write_. 
                                   Other people _talk_."      -W.P. Kinsella

wilcox@chameleon.cis.ohio-state.edu (Patricia P Wilcox) (06/12/90)

In article <7440@jarthur.Claremont.EDU> dhosek@sif.claremont.edu writes:

>The end result should look like
>
>piece0 = z1--z2--z3--z4
>       & flex(z4,(161,11.5),z5)
>       & z5--z6--z7--z8--z1 
>       & cycle;

This way would be a little cleaner, since "cycle" implicitly
duplicates the initial point of the path:

 piece0 = z1--z2--z3--z4
        & flex(z4,(161,11.5),z5)
        & z5--z6--z7--z8--cycle; 

--Pat Wilcox    (wilcox@cis.ohio-state.edu)