[comp.sys.mac] TeachText's file types...

norman@a.cs.okstate.edu (Norman Graham) (01/14/90)

OK. I should have checked the Mac One Liners file for this. Anyways,
thanks to all who responded. (I hope I didn't miss anyone. There may
still be some messages in transit.)

Cheers,
Norm

----- Summary -----

TeachText files with type 'ttro' are read-only. (However, these
files will not appear in the open-file dialog of most programs that
operate only on TEXT type files.)

Multiple fonts and graphics can be embedded in TeachText files by
including PICT resources in the files. To understand how this works,
read the following quote from Larry Rosenstein:

   To add pictures to a TeachText file you need to put a
   non-breaking space (option-space) character into the text. 
   Each time TeachText sees this character it displays a PICT
   resource.  The IDs for the PICT resource begin at 1000 and
   go up from there.  You have to insert enough blank lines to
   leave space for the picture.

----- Contributers -----

Aron Roberts       <aron@garnet.berkeley.edu>
Larry Rosenstein   <lsr@apple.com>   (care of Aron Roberts)
Dave Platt         <dplatt@coherent.com>
Freek Weidijk      <freek@fwi.uva.nl>
Wayne Folta        <folta@mimsy.umd.edu>
-- 
Norman Graham                            Oklahoma State University
  Internet:  norman@a.cs.okstate.edu     Computing and Information Sciences
      UUCP:  {cbosgd, rutgers}           219 Mathematical Sciences Building
              !okstate!norman            Stillwater, OK  USA  74078-0599

bskendig@phoenix.Princeton.EDU (Brian Scott Kendig) (01/15/90)

>Multiple fonts and graphics can be embedded in TeachText files by
>including PICT resources in the files. To understand how this works,
>read the following quote from Larry Rosenstein:
>
>   To add pictures to a TeachText file you need to put a
>   non-breaking space (option-space) character into the text. 
>   Each time TeachText sees this character it displays a PICT
>   resource.  The IDs for the PICT resource begin at 1000 and
>   go up from there.  You have to insert enough blank lines to
>   leave space for the picture.

That explains the graphics, but what about the fonts?  I've seen Apple
`Read Me' files that contain italics amd boldface in them.  How do I
get the same effects in my TeachText documents?

And I seem to remember there being something about a special mode of
TeachText in which it actually gives you another menu for adding PICT
resources.  How do I get this menu?

     << Brian >>

-- 
| Brian S. Kendig      \ Macintosh |   Engineering,   | bskendig             |
| Computer Engineering |\ Thought  |  USS Enterprise  | @phoenix.Princeton.EDU
| Princeton University |_\ Police  | -= NCC-1701-D =- | @PUCC.BITNET         |
|   Systems Engineering, NASA Space Station Freedom / General Electric WP3   |

andyp@gvgpvd.GVG.TEK.COM (Andy Peterman) (01/16/90)

In article <12925@phoenix.Princeton.EDU> bskendig@phoenix.Princeton.EDU (Brian Kendig) writes:
>And I seem to remember there being something about a special mode of
>TeachText in which it actually gives you another menu for adding PICT
>resources.  How do I get this menu?

Find a version 1.1 of TeachText (created Oct. 8, 1987) and change its
creator from 'ttxt' to 'ttxx'.  When you run it next, a new menu called
Tools will appear that automatically pastes in pictures from the
clipboard.  Use an Option-Space for creating the special space character
that defines the top of the picture.  This menu also has some other
functions, like saving the document as a 'ttro'.  If you want to go in
to a document previously saved as read-only (ttro), you'll need to
change it to a 'TEXT' document first.  There are a few other minor bugs
when using this hidden mode of TeachText (like it crashes for no reason)
so save often.

	Andy Peterman

stearns@Apple.COM (Bryan Stearns) (01/19/90)

From article <1462@gvgpvd.GVG.TEK.COM>, by andyp@gvgpvd.GVG.TEK.COM (Andy Peterman):
> In article <12925@phoenix.Princeton.EDU> bskendig@phoenix.Princeton.EDU (Brian Kendig) writes:
>>And I seem to remember there being something about a special mode of
>>TeachText in which it actually gives you another menu for adding PICT
>>resources.
> [...]
> Find a version 1.1 of TeachText (created Oct. 8, 1987) and change its
> creator from 'ttxt' to 'ttxx'. [...] There are a few other minor bugs
> when using this hidden mode of TeachText (like it crashes for no reason)
> so save often.

Actually, there's one big bug, which is why I never told anyone about
this feature: it gets confused WHILE SAVING: something to do with "sometimes
we just have the data fork open, sometimes we have both forks open, and
sometimes we've just created the resource fork...", etc.

I never fixed this bug (or the other minor ones); I turned off a conditional-
compile flag to omit the code for this "feature" for version 1.2, to save
disk space. (Also, this feature became less necessary once I'd taught
the User Education folks, who write the ReadMe files, to use ResEdit!)

Happy landings.

 ..........................................................................
Bryan Stearns                                           Apple Computer, Inc.
Macintosh Finder Group                    10500 North DeAnza Blvd, M/S 27-AJ
stearns@apple.com                                        Cupertino, CA 95014
{nsc,sun,ucbvax!mtxinu}!apple!stearns     "Laugh while you can, monkey boy!"