Custom Layout Templates

Manifold allows definition of custom layout templates. Layout templates are defined using XML files that contain one or more template definitions.

 

A layout template is defined using a <layout> tag. A layout template might also have an <elements> tag with one or more definitions for layout elements.

 

Layout templates are defined by .xml files in the following pattern:

 

<xml>

<layout>

<name>My Template</name>

<pagesByX>1</pagesByX>

<pagesByY>1</pagesByY>

<elements>

(layout elements go here)

</elements>

</layout>

</xml>

 

Rules

 

There can be any number of <layout>...</layout> entries within a single XML file between the <xml> tag at the beginning of the file and the </xml> tag at the end of the file. Within <layout> entries the following tags are used:

 

·      <name> is mandatory and must be unique.

·      <pagesByX> is optional and specifies the horizontal extent of the layout in pages. If the tag is omitted, applying the template preserves the horizontal extent of the target layout.

·      <pagesByY> is optional and specifies the vertical extent of the layout in pages. If the tag is omitted, applying the template preserves the vertical extent of the target layout.

·      <elements> is optional and contains zero or more definitions for the layout elements.

 

Layout Elements

 

Layout elements that may be defined inside the <elements> tag are:

 

·      <body ref=... back=... background=... backgroundFore=... border=... borderDegMinSec=... borderEachPage=... borderFont=... borderFore=... borderMargin=... borderNoOverlaps=... borderRounding=... borderStep=... borderUnit=... columnHeaders=... controlPoints=... font=... fore=... graticule=... grid=... gridLines=... height=... legend=... northArrow=... pageFilter=... paging=... rotation=... scaleBar=... scope=... scopeDetail=... shadeAlternate=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <body> tag defines a layout element for the parent component of the layout. If the layout does not have a parent component, the element defined by the <body> tag is ignored. The ref attribute of the <body> tag defines the reference name for the layout element and can be used to bind other layout elements to this element.

·      <component ref=... back=... background=... backgroundFore=... border=... borderDegMinSec=... borderEachPage=... borderFont=... borderFore=... borderMargin=... borderNoOverlaps=... borderRounding=... borderStep=... borderUnit=... columnHeaders=... controlPoints=... font=... fore=... graticule=... grid=... gridLines=... height=... legend=... name=... northArrow=... pageFilter=... paging=... rotation=... scaleBar=... scope=... scopeDetail=... shadeAlternate=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <component> tag defines a layout element for the component the name of which is given by the name attribute. If the project does not contain a component with such a name, or if the name refers to a component that can not participate in a layout, the element defined by the <component> tag is ignored. The ref attribute of the <component> tag defines the reference name for the layout element and can be used to bind other layout elements to this element.

·      <legend refParent=... height=... rotation=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <legend> tag defines a layout element for a legend. The legend is taken from the component used by the layout element with the value of the ref attribute equal to the value of the refParent attribute in the <legend> tag.

·      <lineHorz back=... fore=... height=... rotation=... size=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <lineHorz> tag defines a layout element for a horizontal line.

·      <lineVert back=... fore=... height=... rotation=... size=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <lineVert> tag defines a layout element for a vertical line.

·      <northArrow refParent=... height=... rotation=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <northArrow> tag defines a layout element for a north arrow. The north arrow is taken from the component used by the layout element with the value of the ref attribute equal to the value of the refParent attribute in the <northArrow> tag.

·      <rect back=... fore=... height=... rotation=... size=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <rect> tag defines a layout element for a rectangle.

·      <scaleBar refParent=... height=... rotation=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <scaleBar> tag defines a layout element for a scale bar. The scale bar is taken from the component used by the layout element with the value of the ref attribute equal to the value of the refParent attribute in the <scaleBar> tag.

·      <text refParent=... back=... font=... fore=... height=... rotation=... text=... textAlignX=... textAlignY=... textDecimals=... visible=... width=... xmax=... xmin=... ymax=... ymin=... /> - The <text> tag defines a layout element for text. The layout element defined by the <text> tag can be bound to a layout element with the value of the ref attribute equal to the value of the refParent attribute in the <text> tag.

 

Layout Element Attributes

 

Attributes used within the layout elements listed above include the following attributes:

 

·      back=... - Specifies the background color of a layout element. See the Custom Palettes and Themes topic for the format of a color value.

·      background=... - Controls the background of a layout element for a mappable component. Can be set to one of the following values: "auto" (turned on or off according to a component), "hide" (turned off) and "custom" (turned on, uses a custom color).

·      backgroundFore=... - Specifies the custom background color of a layout element for a mappable component. If the value of the background attribute is not "custom", the value of the backgroundFore attribute is ignored.

·      border=... - Specifies the border style of a layout element for a mappable component. Can be set to one of the following values: "none" (turned off), "coordinates" (turned on, uses custom coordinates), "coordinates (graticule)" (turned on, uses graticule coordinates), "coordinates (grid)" (turned on, uses grid coordinates), "thick" (turned on, thick) or "thin" (turned on).

·      borderDegMinSec=... - Controls the format of lat/lon border coordinates of a layout element for a mappable component. Can be set to one of the following values: "true" (lat/lon coordinates use the degree-minute-second format) or "false" (lat/lon coordinates use the decimal degrees format).

·      borderEachPage=... - Controls the appearance of the border of a layout element for a mappable component in a multipage layout. Can be set to one of the following values: "true" (the border is replicated on each page) or "false" (the border is shared between pages).

·      borderFont=... - Specifies the font used to format the border coordinates of a layout element for a mappable component. See the notes at the end of this list for the format of the font value.

·      borderFore=... - Specifies the color of the border of a layout element for a mappable component. See the Custom Palettes and Themes topic for the format of a color value.

·      borderMargin=... - Specifies the width in printer's points of the border margin of a layout element for a mappable component.

·      borderNoOverlaps=... - Turns clipping of overlapping labels in the border of a layout element for a mappable component on and off. Can be set to one of the following values: "true" (overlapping labels are clipped) or "false" (overlapping labels are displayed on top of each other).

·      borderRounding=... - Specifies the number of digits to use when rounding the coordinate values in the border of a layout element for a mappable component. A value of 1 rounds to 1/10ths, a value of 0 rounds to whole numbers, a value of -1 rounds to tens and so on.

·      borderStep=... - Specifies the interval between the coordinate values in the border of a layout element for a mappable component. The units of the interval are given by the value of the borderUnit tag. If the value of the border attribute is not "coordinates", the value of the borderStep attribute is ignored.

·      borderUnit=... - Specifies the unit to use for the coordinate values in the border of a layout element for a mappable component. The number of units in the interval is given by the value of the borderStep tag. If the value of the border attribute is not "coordinates", the value of the borderUnit attribute is ignored.

·      columnHeaders=... - Turns column headers in a layout element for a table component on and off. Can be set to one of the following values: "true" (turned on) or "false" (turned off).

·      controlPoints=... - Controls the output of the control points in a layout element for a mappable component. Can be set to one of the following values: "auto" (turned on or off according to a component), "hide" (turned off) and "show" (turned on).

·      font=... - Specifies the font to use for a layout element for a comment, query, script or table component. See the notes at the end of this list for the format of the font value.

·      fore=... - Specifies the foreground color of a layout element. See the Custom Palettes and Themes topic for the format of a color value.

·      graticule=... - Controls the output of the graticule in a layout element for a mappable component. Can be set to one of the following values: "auto" (turned on or off according to a component), "hide" (turned off) and "show" (turned on).

·      grid=... - Controls the output of the grid in a layout element for a mappable component. Can be set to one of the following values: "auto" (turned on or off according to a component), "hide" (turned off) and "show" (turned on).

·      gridLines=... - Turns grid lines in a layout element for a table component on and off. Can be set to one of the following values: "true" (turned on) or "false" (turned off).

·      height=... - Specifies the height of a layout element. See the notes at the end of this list for the format of the height value. If the layout element specifies both the ymin and ymax attributes, the value of the height attribute is ignored.

·      legend=... - Controls the output of the legend in a layout element for a mappable component. Can be set to one of the following values: "auto" (turned on or off according to a component), "hide" (turned off) and "show" (turned on).

·      name=... - Specifies the name of a component for a layout element defined by the <component> tag.

·      northArrow=... - Controls the output of the north arrow in a layout element for a mappable component. Can be set to one of the following values: "auto" (turned on or off according to a component), "hide" (turned off) and "show" (turned on).

·      pageFilter=... - Specifies the page filter for a layout element in a multipage layout.

·      paging=... - Specifies the paging mode for a layout element in a multipage layout. Can be set to one of the following values: "continuous" (the component is stretched across all pages) or "individual" (the component is reproduced similarly on every page).

·      ref=... - Specifies the reference name for a layout element defined by a <body> or <component> tag.

·      refParent=... - Specifies the reference name of a parent layout element for a layout element defined by a <legend>, <northArrow>, <scaleBar> or <text> tag.

·      rotation=... - Specifies the rotation angle of a layout element, in degrees.

·      scaleBar=... - Controls the output of the scale bar in a layout element for a mappable component. Can be set to one of the following values: "auto" (turned on or off according to a component), "hide" (turned off) and "show" (turned on).

·      scope=... - Specifies the scope of a layout element for a mappable component. Can be set to one of the following values: "entire component" (entire component), "locked rectangle" (a rectangle specified by the value of the scopeDetails attribute), "locked center / scale" (a view specified by the value of the scopeDetails attribute), "layer" (a layer specified by the value of the scopeDetails attribute), "selection" (the selection), "saved selection" (a saved selection specified by the value of the scopeDetails attribute), "view" (a view specified by the value of the scopeDetails attribute).

·      scopeDetail=... - Specifies additional data for the scope of a layout element for a mappable component. If the value of the scope attribute is "locked rectangle", the value of the scopeDetails attribute is in the form "xmin,ymin,xmax,ymax", where xmin, ymin, xmax and ymax are the coordinates of a rectangle in the coordinate system of the component. If the value of the scope attribute is "locked center / scale", the value of the scopeDetails attribute is in the form "xcenter,ycenter,scale", where xcenter and ycenter are the center coordinates of a view in the coordinate system of the component and scale is the number of the coordinate units in the coordinate system of the component per pixel. If the value of the scope attribute is "layer", "saved selection" or "view", the value of the scopeDetails attribute is the name of the respective layer, saved selection or view.

·      shadeAlternate=... - Turns shading of alternate rows in a layout element for a table component on and off. Can be set to one of the following values: "true" (turned on) or "false" (turned off).

·      size=... - Specifies the width of the line for a layout element for a line or the width of the border line for a layout element for a rectangle. Can be an integer or one of the following values: "1/2", "1/3", "1/4", "1/5", "1/6", "1/8", "1/10", "1/12", "1/16", "1/20".

·      text=... - Specifies the text of a text layout element. The text can include one or more escape sequences.

·      textAlignX=... - Specifies the horizontal alignment of a layout element for text. Can be set to one of the following values: "center", "left", "right", "justify".

·      textAlignY=... - Specifies the vertical alignment of a layout element for text. Can be set to one of the following values: "center", "top", "bottom".

·      textDecimals=... - Specifies the number of decimal digits to use for escape sequences in a layout element for text.

·      visible=... - Turns a layout element on and off. Can be set to one of the following values: "true" (visible) or "false" (hidden).

·      width=... - Specifies the width of a layout element. See the notesat the end of this list for the format of the width value. If the layout element specifies both the xmin and xmax attributes, the value of the width attribute is ignored.

·      xmax=... - Specifies the right bound of a layout element. See the notes at the end of this list for the format of the bound value.

·      xmin=... - Specifies the left bound of a layout element. See the notes at the end of this list for the format of the bound value.

·      ymax=... - Specifies the top bound of a layout element. See the notes at the end of this list for the format of the bound value.

·      ymin=... - Specifies the bottom bound of a layout element. See the notes at the end of this list for the format of the bound value.

 

Specifying Fonts, Bounds and Dimensions

 

Fonts are specified using the following format:

 

facename, size[, bold][, italic][, strikeout][, underline]

 

...for example,

 

Verdana, 8

 

Arial, 10, bold

 

Lucida Sans Unicode, 9, bold, italic

 

Bounds and dimensions of layout elements are specified as:

 

·      A fraction of the page, for example, "0.5" for half of the page, "1.0" for the entire page.

·      A percentage of the page, for example, "50%" for half of the page.

·      A value in physical units, for example, "1in" or "1 in" or "1 inch" for 1 inch.

 

See Also

 

Layouts

Layout Templates

Custom Palettes and Themes