2022.2

Table Of Contents
paginate()
Thismethodofthesectionobject(see"section"onpage1305)triggerspaginationofthecurrentsec-
tion.Thepaginationprocessre-establishespageboundaries,updatespagenumbersandpagecounts,
andreappliesMasterPages.
Dependingonwhetherpagenumberingrestartsineachsectionthismayaffectthepagenumbersin
othersectionsaswell(see"Configuringpagenumbers"onpage458).
Whenthepaginationprocesshasended,thescriptresumes.
The'currentsection'isalwaysaPrintsection,sincethismethodcanonlybeusedinPostPagination
Scripts,andPostPaginationScriptsonlyrunonthePrintcontext(see"PostPaginationScripts"on
page850).
Youonlyneedtocallmerge.section.paginate()inaPostPaginationScriptifthescripthas
addedorremovedcontenttosuchanextentthatthepageboundariesneedtoberenewed.
Foranexamplesee:"CreatingaTableOfContents"onpage852.
template
Thetemplateobjectrepresentsthetemplatewithallitscontextsandsections.Itisusedfrequentlyin
ControlScripts(see"ControlScripts"onpage838and"ControlScriptAPI"onpage1271)butitcan
alsobeusedinStandardScripts.
Itisretrievedviathemergeobject:merge.template(see"merge"onpage1313).
Whichcontextsareavailableinthetemplatecanbequeriedusingmerge.template.contexts.To
getaccesstoaspecificcontext,youhavetospecifytheContextType(see"ContextType"on
page1295).
Field Type Description
contexts Array Arrayofcontexts(see"context"onpage1299)availableinthetemplate.Thecontexts
containthesections(see"section"onpage1305).
images Array Thelistofimageresources(see"ImageResource"onpage1296)includedinthe
template.
masterpages Array ArrayofMasterPages(see"masterpage"onpage1274)availableinthetemplate.
"media"on
page1276
Array Mediaavailabletothistemplate(see"Media"onpage465).Foreachofthemyoucan
specify,enableandpositionthestationery'sfrontandback.
"properties"onthe
nextpage
Properties Thisobjectcontainsalldefaultpropertiesofthetemplateaswellasanycustom
properties.(Onthemenu,selectFile > Propertiestoviewandcomplementthe
fileproperties.See"FilePropertiesdialog"onpage883).
Page 1292