[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tables, Character Styles, and Files



    Date: Tue, 24 Sep 1991 20:06 EDT
    From: jcs@sandia.intel.com (Jim Sanborn)


    I've written a nifty report generator using formatting-table, etc. and boy
    does the output look nice on screen - columns all lined up, nifty fonts (er,
    character styles), wow.  My top-level function takes a stream argument, so I
    figured, great, I'll just use with-open-file to save my nice report on disk.
    This done, and the file written, I quickly visited same, anticipating ... yes,
    columns all still lined up, but hey, what happened to the #$%@ styles?!  In
    short, the file was in cptfont (oops, '(:fix :roman :normal)).

    The calling sequence here is:

	    formatting-table ...		; to some passed-in stream
	      formatting-row ...		; to same stream
		with-character-style ...	; nifty, non-cptfont char style
		  formatting-cell ...	; to stream
		    format | write-string | princ ...	; to stream

    Does anyone know whether or not there a way to use these functions to produce 
    file output that preserves the styles?  Is there some specific type of stream I
    need to use, should I be using the file attribute list, ... ?

This should work.  Just for grins, try putting the call to
with-character-style *inside* the call to formatting-cell, or *outside*
the call to formatting-row.