How to Width Align Your Data

The JGOFS data management system
 now supports two ways to
insure that the list of your data aligns with the field names when
displayed by your browser. Prior to the 1.5 release of the software,
data field widths were determined by the length of the field name. While
the Web listing program will still follow this convention, there are two
ways to force data to line up with the corresponding field name.


        Method 1 - add width attribute to the field name

You can add field width information to the field name by including the
attribute *width=nn* when specifying the field names (usually at level
0), where nn is the maximum width of the data. For example,

	#Test sample to specify field lengths
	lat[width=8] lon[width=9] sal[width=8] day month year time
	42.7756 -65.7777 33.570 4 12 1995 0930
	42.8765 -65.6767 33.450 4 12 1995 1000

Note that attribute information is enclosed in square brackets and
follows the field name immediately, without any intervening spaces or tabs.


        Method 2 - add trailing underscores to the field name

You can increase the field width by adding trailing underscore
characters to the field name. For example,

	#Test sample to specify field lengths
	lat_____ lon______ sal_____ day month year time
	42.7756 -65.7777 33.570 4 12 1995 0930
	42.8765 -65.6767 33.450 4 12 1995 1000

The data management software converts the field name and these trailing
underscore characters to the equivalent width=nn attribute. The trailing
underscores are removed from the field name.

Both methods can be used within the same data file.

------------------------------------------------------------------------
/Last modified: July 28, 1997/