Arbortext Command Language > Functions by Alphabetical Listing > apply
  
apply
layout::apply (application[, flags[, doc]])
 
This function uses the current print FOSI to add page layout structure to the document and then calls an application specific function. The markup consists of singletons with the atipl namespace prefix, for example atipl:startpage.
The application parameter is the name of a callable function that implements some application specific behavior. Most commonly it will specify a set of generic attributes of the atipl markup to achieve a set of formatting effects. The application function must accept a single parameter: the document to modify, and return a status of 0 for failure or 1 for success. A sample line numbering application is located in the samples\linenumbering folder of your installation directory.
The optional flags parameter is a bit mask used to control the markup inserted. If not specified, then all possible markup is inserted. The bits control the type of structured markup to add to the document. These bits are:
0x1line
0x2entry
0x4row
0x8float
0x10column
0x20span
0x40page
The following bits are used to control the behavior of the function:
0x1000generate diagnostics
0x2000no atipl markup for lines that contain only generated text
The optional doc parameter specifies the document to modify. The current document is assumed if this parameter is not specified.
If the operation fails the function returns 0. If the operation succeeds then the function returns 1.
For more detailed information on the page layout elements and their attributes, see PTC Arbortext Help Center. Refer to the Programmer's Reference for more detailed information about line numbering applications.
Related Topics
set pagelayoutmarkers
set protectpagelayout
layout::add function
layout::clear function
linenum function