SAS 9.1 Output Delivery System Users Guide

PROC TEMPLATE ;

PROC TEMPLATE Statement

PROC TEMPLATE ;

DEFINE STYLE style- path </ STORE= libref . template-store >;

DEFINE STYLE Statement

Creates a style definition for any destination that supports the STYLE= option

Requirement: An END statement must be the last statement in the definition.

Featured in: Example 1 on page 342

DEFINE STYLE style-path </ STORE= libref . template-store >;

Task

Statement

Provide information about the style definition.

NOTES

Add a style element to the child style definition from the parent style definition.

REPLACE

Create a new style element.

STYLE

End the style definition.

END

Required Arguments

style-path

Options

STORE= libref . template-store

Style Definition Attributes

PARENT= style-path

NOTES Statement

Provides information about the style definition

Tip: The NOTES statement becomes part of the compiled style definition, which you can view with the SOURCE statement, whereas SAS comments do not.

NOTES ' text ';

Required Arguments

text

REPLACE Statement

Adds a style element to the child style definition from the parent style definition

Restriction: To use the REPLACE statement, you must specify a parent style definition with the PARENT= attribute in the DEFINE STYLE statement.

See also: 'About Style Definition Inheritance and Style Element Inheritance' on page 322

Featured in: Example 3 on page 355

Tip: You can think of the REPLACE statement as replacing the statement that defines the like-named style element in the parent style definition. The REPLACE statement does not actually change the parent style definition, but PROC TEMPLATE builds the child style definition as if it had changed the parent. All style elements that inherit attributes from this style element inherit the attributes that are specified in the REPLACE statement, not those used in the parent style definition.

REPLACE style-element-name-1 <FROM style-element-name-2 ><' text '>

Required Arguments

style-element-name-1

Options

style-element-name-2

style-attribute-specification(s)

' text '

STYLE Statement

Creates a new style element

Featured in: Example 1 on page 342

STYLE new-style-element-name <FROM existing-style-element-name ><' text '>

Required Arguments

new-style-element-name

Options

existing-style-element-name

style-attribute-specification(s)

' text '

Style Attributes and Their Values

The default value that is used for an attribute depends on the style definition that is in use. For information about viewing the attributes in a style definition, see 'Viewing the Contents of a Style Definition' on page 319. The implementation of an attribute depends on the ODS destination that formats the output. In addition, if you are creating HTML output, then the implementation of an attribute depends on the browser that you use.

Data Values

Style Attributes

Table 9.1: Table of Style Attributes

Task

Attribute

Valid destinations

Influence the characteristics of

individual cells

   

Specify how to handle leading spaces and line breaks.

ASIS=

HTML, RTF, PDF, PCL, and PS

Specify the heightof the cell.

CELLHEIGHT=

HTML, RTF, PDF, PCL, and PS

Specify the width of the cell.

CELLWIDTH=

HTML, PCL, PDF, PS, and RTF

Specify the text to show in a tool tip for the cell.

FLYOVER=

HTML, PDF

Specify the window or frame in which to open the target of the link.

HREFTARGET=

HTML

Specify how to handle space characters .

NOBREAKSPACE=

HTML, PCL, PDF, PS, and RTF

Specify text to insert in the HTML

TAGATTR=

HTML

Specify a URL to link to.

URL=

HTML, RTF, and PDF

Specify vertical justification.

VJUST=

HTML, PCL, PDF, PS, and RTF

Influence the characteristics of

individual tables or cells

   

Specify the color of the background.

BACKGROUND=

HTML, PCL, PDF, PS, and RTF

Specify an image to use as the background.

BACKGROUNDIMAGE=

HTML, PCL and PS

Specify the color of the border if the border is just one color.

BORDERCOLOR

HTML, PCL, PDF, PS, and RTF

Specify the darker color to use in a border that uses two colors to create a three-dimensional effect.

BORDERCOLORDARK

HTML, PCL, PDF, PS, and RTF

Specify the lighter color to use in a border that uses two colors to create a three-dimensional effect.

BORDERCOLORLIGHT

HTML, PCL, PDF, PS, and RTF

Specify the width of the border of the table.

BORDERWIDTH

HTML, PCL, PDF, PS, and RTF

Specify a font definition.

FONT=

HTML, PCL, PDF, PS, and RTF

Specify the font to use. FONT_

FACE=

HTML, PCL, PDF, PS, and RTF

Specify the size of the font.

FONT_SIZE=

HTML, PCL, PDF, PS, and RTF

Specify the style of the font.

FONT_STYLE=

HTML, PCL, PDF, PS, and RTF

Specify the font weight.

FONT_WEIGHT=

HTML, PCL, PDF, PS, and RTF

Specify the font width compared to the width of the usual design.

FONT_WIDTH=

HTML, PCL, PDF, PS, and RTF

Specify the color of the foreground, which is primarily the color of the text.

FOREGROUND=

HTML, PCL, PDF, PS, and RTF

Specify the name of the stylesheet class to use for the table or cell.

HTMLCLASS=

HTML

Specify an ID for the table or cell.

HTMLID=

HTML

Specify individual attributes and values for the table or cell.

HTMLSTYLE=

HTML

Specify justification.

JUST=

HTML, PCL, PDF, PS, and RTF

Specify the HTML code to place after the HTML table or cell.

POSTHTML=

HTML

Specify an image to place after the table or cell.

POSTIMAGE=

HTML, PCL, PDF, PS, and RTF

Specify text to place after the cell or table.

POSTTEXT=

HTML, PCL, PDF, PS, and RTF

Specify the HTML code to place before the HTML table or cell.

PREHTML=

HTML

Specify an image to place before the table or cell.

PREIMAGE=

HTML, PCL, PDF, PS, and RTF

Specify text to place before the cell or table.

PRETEXT=

HTML, PCL, PDF, PS, and RTF

Determine how less-than signs (<), greater-than signs (>), and ampersands (&) are interpreted.

PROTECTSPECIALCHARACTERS=

HTML, MARKUP family, Printer family, and RTF

Influence the characteristics of

tables

   

Specify the amount of white space on each of the four sides of the text in a cell.

CELLPADDING =

HTML, PCL, PDF, PS, and RTF

Specify the thickness of the spacing between cells.

CELLSPACING=

HTML, PCL, PDF, PS, and RTF

Specify the type of frame to use on an HTML table.

FRAME=

HTML, PRINTER family, and RTF

Specify the width of the table.

OUTPUTWIDTH=

HTML, PCL, PDF, PS, and RTF

Specify the types of rules to use in a table.

RULES=

HTML, PCL, PDF, PS, and RTF

Influence the characteristics of

individual frames in HTML

output

   

Specify whether or not to put a scrollbar in the frame that references the body file.

BODYSCROLLBAR=

HTML

Specify the width of the frame that displays the body file in the HTML frame file.

BODYSIZE=

HTML

Specify the string to use for bullets in the contents file.

BULLETS=

HTML

Specify the position of the frames in the frame file that displays the contents and the page files.

CONTENTPOSITION=

HTML

Specify whether or not to put a scrollbar in the frames in the frame file that displays the contents and the page files.

CONTENTSCROLLBAR=

HTML

Specify the width of the frames in the frame file that display the contents and the page files.

CONTENTSIZE=

HTML

Specify whether ornot toput a border around the HTML frame for an HTML file.

FRAMEBORDER=

HTML

Specify the width of the border around the HTML frames for an HTML file.

FRAMEBORDERWIDTH=

HTML

Specify the width of the space between HTML frames for HTML files.

FRAMESPACING=

HTML

Influence the characteristics of

the document

   

Specify whether or not graph styles are used in CSS or LaTex style files.

ABSTRACT=

HTML and MARKUP

Specify the color for links that are active.

ACTIVELINKCOLOR=

HTML and RTF

Specify the bottom margin for the document.

BOTTOMMARGIN=

HTML, PCL, PDF, PS, and RTF

Cause a rule of the specified width to be placed into the space around the text (or entire cell if there is no text) where white space would otherwise appear.

FILLRULEWIDTH=

PS, PDF, PCL

Provide the value of the content type for pages that you send directly to a web server rather than to a file.

HTMLCONTENTTYPE=

HTML

Specify the entire doctype declaration for the HTML document, including the opening "<!DOCTYPE" and the closing ">".

HTMLDOCTYPE=

HTML

Set a numeric value to use as the indention depth.

INDENT=

MARKUP, RTF and PRINTER Family

Specify the left margin for the document.

LEFTMARGIN=

HTML, PCL, PDF, PS, and RTF

Specify the color for links that have not yet been visited.

LINKCOLOR=

HTML, RTF, and PDF

Specify whether or not to make this entry in the table ofcontents a link tothe body file.

LISTENTRYANCHOR=

HTML

Specify whether or not to doublespace betweenentries in the table of contents.

LISTENTRYDBLSPACE=

HTML

Specify the height for graphics in the document.

OUTPUTHEIGHT=

HTML, PCL, PDF, PS, and RTF

Specify an upper limit for extending the width of the column.

OVERHANGFACTOR=

HTML, PCL, PDF, PS, and RTF

Specify HTML to place at page breaks.

PAGEBREAKHTML=

HTML

Specify the right margin for the document.

RIGHTMARGIN=

HTML, PCL, PDF, PS, and RTF

Specify the top margin for the document.

TOPMARGIN=

HTML, PCL, PDF, PS, and RTF

Specify the color for links the visited links.

VISITEDLINKCOLOR=

HTML and RTF

Specify whether or not to make the image that is specified by BACKGROUNDIMAGE= into a 'watermark.' A watermark appears in a fixed position as the window is scrolled.

WATERMARK=

HTML

Influence the characteristics of

graphs

   

Specify the background color of the graph. [1]

BACKGROUND=

HTML, RTF, PRINTER family

Specify the image to appear in the background. This image will be stretched . [1]

BACKGROUNDIMAGE=

HTML, PCL, and PS

Specify the alternate colors for maps. The alternate colors are applied to the blocks on region areas in block maps.

CONTRASTCOLOR=

HTML, RTF, PRINTER family

Specify whether to use a drop shadow effect for text in a graph.

DROPSHADOW=

HTML, RTF, PRINTER family

Specify the end color for a gradient effect in a graph.

ENDCOLOR=

HTML, RTF, PRINTER family

Specify a font definition. [1]

FONT=

HTML, RTF, PRINTER family

Specify the font to use. [1]

FONT_FACE=

HTML, RTF, PRINTER family

Specify the size of the font to use. [1]

FONT_SIZE=

HTML, RTF, PRINTER family

Specify the style of the font. [1]

FONT_STYLE=

HTML, RTF, PRINTER family

Specify the font weight. [1]

FONT_WEIGHT=

HTML, RTF, PRINTER family

Specify the font width compared to the width of the usual design. [1]

FONT_WIDTH=

HTML, RTF, PRINTER family

Specify the color of text or data items [1]

FOREGROUND=

HTML, RTF, PRINTER family

Specify the direction of the gradient effect in either the X or Y axis direction to influence the graph background, legend background, charts , walls, floors, etc.

GRADIENT_DIRECTION=

HTML, RTF, PRINTER family

Specify the image to appear in the background. This image can be positioned or tiled.

IMAGE=

HTML, RTF, PRINTER family

Specify the image's horizontal positioning. [1]

JUST=

HTML, PCL, PDF, PS, and RTF

Specify the line type to use inagraph. You canuseSAS/ GRAPH line types 1-46.

LINESTYLE=

HTML, RTF, PRINTER family

Specify the thickness (width) of a line that is part of a graph.

LINETHICKNESS=

HTML, RTF, PRINTER family

Specify the size of the symbol used to represent data values.

MARKERSIZE=

HTML, RTF, PRINTER family

Specify the symbol used to represent data values.

MARKERSYMBOL=

HTML, RTF, PRINTER family

Specify the height of the graph. [1]

OUTPUTHEIGHT=

HTML, RTF, PRINTER family

Specify the width of the graph or line thickness. [1]

OUTPUTWIDTH=

HTML, RTF, PRINTER family

Specify the start color for a gradient effect in a graph.

STARTCOLOR=

HTML, RTF, PRINTER family

Specify the level of transparency for a graph.

TRANSPARENCY=

HTML, RTF, PRINTER family

Specify the image's vertical positioning. [1]

VJUST

HTML, RTF, PRINTER family

[1] This attribute can also be used to influence other characteristics as described in another section of the table.

Note: You can use the value _UNDEF_ for any style attribute. ODS treats an attribute that is set to _UNDEF_ as if its value had never been set, even in the parent or beyond.

ABSTRACT= ON OFF

ACTIVELINKCOLOR= color

ASIS=ONOFF

BACKGROUND= color

BACKGROUNDIMAGE=' string '

BODYSCROLLBAR=YES NO AUTO

BODYSIZE= dimension number %*

BORDERCOLOR= color

BORDERCOLORDARK= color

BORDERCOLORLIGHT= color

BORDERWIDTH= dimension

BOTTOMMARGIN= dimension

BULLETS=' string '

CELLHEIGHT= dimension integer %

CELLPADDING= dimension integer %

CELLSPACING= dimension

CELLWIDTH= dimension integer %

CONTENTPOSITION= LEFT RIGHT TOP BOTTOM

CONTENTSCROLLBAR=YES NO AUTO

CONTENTSIZE= dimension number %*

CONTRASTCOLOR= color

DROPSHADOW= ON OFF

ENDCOLOR= color

FILLRULEWIDTH= dimension

FLYOVER=' string '

FONT= font-definition

FONT_FACE=' string-1 < , string-n >'

FONT_SIZE= dimension size

FONT_STYLE=ITALIC ROMAN SLANT

FONT_WEIGHT= weight

FONT_WIDTH= relative-width

FOREGROUND= color

FRAME= frame-type

FRAMEBORDER=ON OFF

FRAMEBORDERWIDTH= dimension

FRAMESPACING= integer

GRADIENT_DIRECTION= XAXIS YAXIS

HREFTARGET= target

HTMLCLASS=' string '

HTMLCONTENTTYPE=' string '

HTMLDOCTYPE=' string '

HTMLID=' string '

HTMLSTYLE=' string '

IMAGE= string

INDENT= n

JUST=CENTER DEC LEFT RIGHT

LEFTMARGIN= dimension

LINESTYLE= 1 ... 46

LINETHICKNESS= dimension number%

LINKCOLOR= color

LISTENTRYANCHOR=ON OFF

LISTENTRYDBLSPACE=ON OFF

NOBREAKSPACE=ON OFF

OUTPUTHEIGHT= dimension

OUTPUTWIDTH= dimension number %

OVERHANGFACTOR= nonnegative-number

PAGEBREAKHTML=' string '

POSTHTML=' string '

POSTIMAGE= ' string ' fileref

POSTTEXT=' string '

PREHTML=' string '

PREIMAGE= ' string ' fileref

PRETEXT=' string '

PROTECTSPECIALCHARACTERS=ON OFF AUTO

RIGHTMARGIN= dimension

RULES= rule-type

STARTCOLOR= color

TAGATTR=' string '

TOPMARGIN= dimension

TRANSPARENCY= dimension

URL=' uniform-resource-locator '

VISITEDLINKCOLOR= color

VJUST=BOTTOM MIDDLE TOP

WATERMARK=ON OFF

END Statement

Ends the style definition

END ;

Категории