[comp.sys.mac.hypercard] Text Attributes in a HC 2.0 report?

emery@linus.mitre.org (David Emery) (11/08/90)

I have a bibliography stack.  I have bkgnd fields like Author, Title,
Publisher, etc.  I'd like print a report where everything is printed
in a single report field, but the Title field appears in bold-face.

For instance, given the 2 cards:
	Author:		Booch, Grady
	Title:  	Software Engineering with Ada
	Publisher:  	Benjamin-Cummings

	Author:		Nyberg, Karl (ed)
	Title:		The Annotated Ada Reference Manual
	Publisher:	Grebyn Corp.

I'd like the book title to appear in bold-face, and the entire entry
to be "packed" into one line:
	Booch, Grady, _Software_Engineering_with_Ada_, Benjamin-Cummings
	Nyberg, Karl (ed), _The_Annotated_Ada_Reference_Manual_, Grebyn Corp.
(_xxx_ represents xxx printed in bold-face).  

Right now I have a single report item whose contents is 
	field "Author" & "," && field "Title" & , && field "Publisher"
If I split this up into single reports, then I'd get "fixed-width"
fields, and the report would look something like:
	Booch, Grady        _Software_Engineering_With_Ada_  Benjamin-Cummings
	Nyberg, Karl (ed)   _The_Annotated_Ada_Reference Ma_ Greybn Corp.

One more question:  There seems to be a minimum size for the "box"
containing the items in the report writer.  I can't seem to get the
vertical size any smaller than .468 inches (32 points).  This produces
a lot of wasted white space in my report.  Is there any way to reduce
the size of the "box"?

On the other hand, the combination of find with marking with the
report writer makes Hypercard 2.0 a LOT more friendly for doing these
kinds of things!!

				dave emery
				emery@aries.mitre.org

gandalf@apple.com (Martin Gannholm) (11/08/90)

On the subject of printing reports in HyperCard 2.0:

In article <EMERY.90Nov7140942@aries.linus.mitre.org> 
emery@linus.mitre.org (David Emery) writes:
> I'd like the book title to appear in bold-face, and the entire entry
> to be "packed" into one line:
>         Booch, Grady, _Software_Engineering_with_Ada_, Benjamin-Cummings
>         Nyberg, Karl (ed), _The_Annotated_Ada_Reference_Manual_, Grebyn 
Corp.
> (_xxx_ represents xxx printed in bold-face).  

In short, you can't do this (with one entry bold) unless you have a single 
field containing this information, with the book title bold. You can, 
however, concatenate several fields to get the effect, but you won't get 
the font information from the field.

Each report item has a HyperTalk expression which can be a field 
expression (e.g. field "fred") or any other HyperTalk expression, 
including a function handler call (e.g. myGlobal & field 1 _or_ 
aFunctionHandler() ). You can also have a string constant, like "Title:".
  In the case of the individual field expression, you will get the fonts, 
sizes and styles from the field, exactly as on the page. With other report 
items that aren't exact field specifications, you'll get the default font, 
size and style for the whole item. These defaults are in the HyperCard 
properties printTextFont, printTextSize etc.

In addition, you can specify to override any or all text properties. e.g. 
just the font. In this case, you would retain all the size and style 
variations in the field with just the font changes. This can be good if 
you want one font in your field that looks good on the screen, and another 
for the printed output.


Martin Gannholm
HyperCard 2.0 Engineer
Apple Computer

Exclaimer!!!   I typed this myself = I speak for myself...
..or..I never said it...Nobody heard me say it...You can't prove anything!