PTC ALD in Arbortext Styler > Components of Documents and Templates > Driving Page Layout > Page And Document Sequence Control > Calling Page Sequences with Inline Commands
  
Calling Page Sequences with Inline Commands
If a document sequence control stream is associated with a template, it is used to provide a default page sequence for the document. New page sequences are called using inline commands. It is possible to call single level or nested page sequences.
* 
The pink page output when page sets are not correctly configured in Arbortext Styler is the default page layout for Arbortext Styler documents.
Page sequences are called using the fFormatting.pageSequenceStart() method and ended with the fFormatting.pageSequenceEnd() method. The fFormatting.pageSequenceStart() method requires an fDocumentSequenceItem as its first parameter, for example:
var myDSItem = new fDocumentSequenceItem;
var pSeq = template.content.getPageSequence("myChapterPageSequence");
myDSItem.id = "123";
mDSItem.sequence = pSeq;

formatting.pageSequenceStart(myDSItem);
The second parameter on the pageSequenceStart() method is a boolean operator that confirms whether PTC Arbortext Layout Developer should stack the page sequence or end the current sequence and start a new one at the same level.
Stacking page sequences allows them to be nested within each other — if a page sequence ends it naturally falls back to the previous one. You can stack page sequences up to 20 levels deep.
* 
If you start a new page sequence, PTC Arbortext Layout Developer automatically starts a new page (insert a page break). If you start a new page sequence immediately after starting another, with no output made between the two starts, PTC Arbortext Layout Developer will switch the applied page sequences without starting multiple new pages.