ALD Objects > Blocks
  
Blocks
A block is a container for text, paragraphs, or tables. It can also contain other blocks that flow within their parent frame, block or table cell. Blocks allow users to control column settings as well as the formatting properties of the text they contain.
The image below shows the layers of the block that can be assigned properties:
Some characteristics of blocks are listed below:
Blocks can be created using traditional PIs or via the fBlock object with JavaScript.
When using processing instructions, three main instructions are required to create a block:
1. <?blockstart> - mark the start if the block
2. <?blockbody> - mark the start of the block content
3. <?blockend> - mark the end of the block.
Properties set at the start of the block, between the <?blockstart> and <?blockbody> commands, i.e. the area known as the block preamble section, will apply to the whole of the block, or to the text that the block contains.
A block can be assigned text formatting properties at one level that will be inherited by its descendants, in a process known as property inheritance. PTC ALD’s block supports property inheritance when properties are set in the block preamble using traditional processing instructions, or when they are set in the block’s default style and paragraph properties using the Formatting Object Model and Javascript.
Properties set for individual paragraphs in the block will override those set for the block.
Blocks can be divided into columns through which text flows as if in a frame. Columns can be assigned widths, gutters, balancing, etc. like the columns of a frame.
Margins are applied outside the block’s size within its container and can be assigned priorities which allows compression of adjacent margins.
Padding is applied between the rules area and the content area, to expand the distance between the two. Block columns can also carry a padding value.
Rules are applied directly inside the block’s dimensions. Up to 20 rules can be applied to a block. Block columns may also include rules. Block column rules will wrap each part of the column if it is split due to a page break, a nested block with column spans or another page object (frame) overlapping the column.
The content area is the area that remains after any rules or padding are applied on the inside of the block’s width and height. It can be configured to allow columns within the block. Columns can carry padding and rules, and have independent sizes and gutters.
Blocks can be rotated within their container in 90° increments. When a block is rotated, everything inside the margins is rotated, so properties set for those regions are also rotated. The margins remain on the sides upon which they were originally set.
Keeps can be set for blocks, allowing them to be kept with either the next item or the previous one.
Block indents can be used to apply an indent to the first line of text within a block and provide a useful mechanism for creating simple lists. You can set the indent of the first line of text, the distance from the edges of the block from which the indent should apply, the progression direction of the block (e.g. right to left), or elect to set tab stops at which to align list item labels and the text that follows.
A set of processing instructions enables working with blocks. See the Block PIs section of the Macro Language Reference in PTC ALD help.