PXML variables

The PXML expression language uses variables to define the layout dynamically.

These variables can be used in any PXML expression:

  • max - the maximum extent of the current parent box
  • min - the minimum extent of the current parent box
  • rest - the remainder of the current parent box
    Note:

    If the parent object is a propagating container and the child object does not fit in the remaining space for the parent object, the rest variable for the Y-Size property yields the same value as max (the child expands to the maximum extent of the parent). This forces the parent object to propagate and avoids overfullness.

Example

To center an element in its parent container, use the max variable for these properties:

Table 1. Centering an element
Property Value
x max/2
y max/2
anchorX 0.5
anchorY 0.5
Note:

In previous versions of Genero Studio, to force a page break after the object, you would use the rest variable in the Y-Size or X-Size properties. This is no longer required; you can now force a page break using the Break element.