FOM Reference > Formatting > fFormatting interface
  
fFormatting interface
This object provides access to the current formatting state, such as the stream heirarchy, current styles and block / table properties and format-safe variables. This object is only available when PTC ALD is formatting, and can be accessed using the global property "formatting".
ContextLimits enumeration
Values to specify what limits should be applied when a new context group is added using fFormatting.contextAdd().
The ContextLimits enumeration has the following constants of type int.
LIMIT_NONE = 0
Add the new context group with no limits.
LIMIT_ALL = 1
Prevent searching through all previous context groups.
LIMIT_GROUP = 2
Only prevent searching through previous contexts in the same group as this.
MapReturnFlags enumeration
Flag values to specify how returns should be mapped while formatting. These should be added and assigned to mapReturns.
The MapReturnFlags enumeration has the following constants of type int.
MAP_RETURNS = 1
Specifies that all the carriage returns in a given text stream should be mapped to either a space or a 'yellow bar return' depending on the useage of the MAP_TO_YBR flag.
MAP_TO_YBR = 2
If return are being mapped, map them to a 'yellow bar return' rather than a space.
A yellow bar return (or spacer) is an PTC ALD-specific character that is used to space out code in the yellow edit bar. It is represented by PTC ALD-ISO character &147;.
IgnoreSpaceFlags enumeration
Flag values to specify which spaces should be ignored while formatting.
The IgnoreSpaceFlags enumeration has the following constants of type int.
IGNORE_START = 1
Specifies that the text stream should ignore spaces at the start of a paragraph.
IGNORE_MULTIPLE = 2
Specifies that any multiple spaces in the text stream should be ignored.
IGNORE_END = 4
Specifies that the text stream should ignore spaces that appear at the end of a paragraph.
IGNORE_SPACES = 8
Specifies that all spaces in the text stream should be ignored.
BreakType enumeration
The possible values for breakTop and breakBottom.
The BreakType enumeration has the following constants of type int.
BREAK_COLUMN = 1
Starts a new column.
BREAK_PAGE = 2
Starts a new page.
BREAK_FIRST_LINE = 16
Repositions to the first line.
BREAK_LAST_LINE = 32
Repositions to the last line.
BREAK_COLUMN_CENTER = 64
Starts column centering.
BREAK_COLUMN_BOTTOM = 128
Flushes to column bottom.
BREAK_TABLE_CELL = 512
Starts a new table cell.
BREAK_TABLE_ROW = 1024
Starts a new table row.
BREAK_TABLE_END = 2048
Ends the current table.
BREAK_SOFT_COLUMN = 32768
Soft column break.
BREAK_SOFT_PAGE = 65536
Soft page break.
RecordEndType enumeration
These values specify the possible ways to end the current line.
The RecordEndType enumeration has the following constants of type int.
END_PARAGRAPH = 1
Ends the paragraph.
END_PAGE = 2
Ends the page.
END_LINE = 3
Ends the line.
END_COLUMN = 5
Ends the column.
RecordEndAlign enumeration
These values specify how the line containing the break should be aligned.
The RecordEndAlign enumeration has the following constants of type int.
ALIGN_DEFAULT = 0
Use the current paragraph alignment.
ALIGN_CENTER = 1
Center the line.
ALIGN_JUSTIFY = 2
Justify the line.
ALIGN_LEFT = 3
Left align the line.
ALIGN_RIGHT = 4
Right align the line.
RecordEndCondition enumeration
These values specify when to issue the record end.
The RecordEndCondition enumeration has the following constants of type int.
CONDITION_NONE = 0
Always do the record end.
CONDITION_NOTSTART = 1
Only issue the record end if formatting is not at the start of the line.
CONDITION_BEFORE = 2
Issue the record end and reposition to just before the tag containing the command.
CONDITION_HERE = 3
Issue the record end and start the next line from this command.
CounterNames enumeration
These constants provide the array indexes to access PTC ALD's named counters. They reside in the counters array at negative indices before the X-Counters. Remember that not all of PTC ALD's named counters may be changed by the user.
The CounterNames enumeration has the following constants of type int.
COUNTER_A = -15
The array index of PTC ALD's a counter.
COUNTER_B = -14
The array index of PTC ALD's b counter.
COUNTER_C = -13
The array index of PTC ALD's c counter.
COUNTER_D = -12
The array index of PTC ALD's d counter.
COUNTER_E = -11
The array index of PTC ALD's e counter.
COUNTER_F = -10
The array index of PTC ALD's f counter.
COUNTER_G = -9
The array index of PTC ALD's g counter.
COUNTER_H = -8
The array index of PTC ALD's h counter.
COUNTER_I = -7
The array index of PTC ALD's i counter.
COUNTER_J = -6
The array index of PTC ALD's j counter.
COUNTER_K = -5
The array index of PTC ALD's k counter.
COUNTER_L = -4
The array index of PTC ALD's l counter.
COUNTER_M = -3
The array index of PTC ALD's m counter.
COUNTER_N = -2
The array index of PTC ALD's n counter.
COUNTER_O = -1
The array index of PTC ALD's o counter.
ErrorSeverity enumeration
These values specify the severity of an error raised by fFormatting.raiseError.
The ErrorSeverity enumeration has the following constants of type int.
SEVERITY_INFORMATION = 2
An information message.
SEVERITY_WARNING = 1
A warning message.
SEVERITY_ERROR = 0
An error message.
LineNumberType enumeration
Flag values to specify which type of line number should be modified by the changeLineNumber method.
The LineNumberType enumeration has the following constants of type int.
PAGE_LINE = 1
This option specifies that the page's line number should me changed.
COLUMN_LINE = 2
This option specifies that the column's line number should me changed.
CELL_LINE = 4
This option specifies that the cell's line number should me changed.
* 
This only occurs when formatting a table cell.
PARAGRAPH_LINE = 8
This option specifies that the paragraph's line number should me changed.
ALL_LINES = 15
This will modify all line numbers as detailed above.
ROW_NUMBER = 16
This option allows the secondary row number to be changed within a table. See fTable.RowZeroMode.
* 
This only occurs when formatting a table cell.
ImageScale enumeration
How to scale the image to fit inside the defined area.
The ImageScale enumeration has the following constants of type int.
SCALE_NONE = 0
Don't scale the image.
SCALE_PRESERVE = 1
Scale the image preserving the aspect ratio.
SCALE_FIT = 2
Scale the image to fit the available space.
SCALE_DOT = 3
Scale the image using the specified dot size.
SCALE_ABSOLUTE = 4
Scale the image using the specified absolute size.
SCALE_PERCENT = 5
Scale the image using the specified percentage.
SCALE_SHRINK = 6
Shrink the image if greater than the maximum size.
SCALE_ENLARGE = 7
Enlarge the image if smaller than the minimum size.
ImageBestFit enumeration
Which Best Fit mode to use when outputting the image.
The ImageBestFit enumeration has the following constants of type int.
BESTFIT_NONE = 0
Don't use Best Fit mode.
BESTFIT_START = 1
Use left horizontally, or top vertically.
BESTFIT_CENTER = 2
Use the center of the image.
BESTFIT_END = 3
Use right horizontally, or bottom vertically.
BESTFIT_SQUASH = 4
Use squash horizontally, or flatten vertically.
ImagePlaces enumeration
Where to place the image relative to the current formatting position.
The ImagePlaces enumeration has the following constants of type int.
PLACE_BLOCK = 0
Place the image as a block, centered on the line.
PLACE_INLINE = 1
Place the image inline with the surrounding text.
PLACE_BLOCKLEFT = 2
Place the image as a block, to the left of the line.
PLACE_BLOCKRIGHT = 3
Place the image as a block, to the right of the line.
InheritModes enumeration
Which inherit mode to use in getAttribute().
The InheritModes enumeration has the following constants of type int.
INHERIT_ALL = 0
Find the attribute from all tags in the stream hierarchy.
INHERIT_CURRENT = 1
Find the attribute on the current tag only.
INHERIT_ANCESTOR = 2
Find the attribute on the ancestors only.
PDFActivationFlags enumeration
The playback style to use, if the object supports animation.
The PDFActivationFlags enumeration has the following constants of type int.
ACTIVATE_CLICKED = 0
The object should be activated when clicked.
ACTIVATE_OPENED = 1
The object should be activated when the page containing it is opened.
ACTIVATE_VISIBLE = 2
The object should be activated as soon as it becomes visible.
PDFAnimationStyles enumeration
The playback style to use, if the object supports animation.
The PDFAnimationStyles enumeration has the following constants of type int.
ANIMATION_NONE = 0
The animation should not play.
ANIMATION_LINEAR = 1
The animation should play linearly, from beginning to end.
ANIMATION_OSCILLATING = 2
The animation should oscillate, playing from beginning to end, then in reverse from end to beginning, and so on.
blockHierarchy attribute
Nested blocks can be accessed using this property. The block at the bottom of the hierarchy, i.e. the root block can be accessed at index 0. Block hierarchy excludes nested tables, for nested tables, see tableHierarchy.
blockHierarchy
Access
read-only
Returns
fBlockPos[]
counters attribute
This array of integers gives access to PTC ALD's X-Counters. The values of these counters are guaranteed to be the same each time a particular part of the document is being processed during formatting, no matter how many passes are needed to format that part of the document.
counters
Access
read-only
Returns
fIntArray
currentBlock attribute
Access properties of the current block, if any.
currentBlock
Access
read-only
Returns
fBlockResolved
currentBlockRegion attribute
Access properties of the current block region, if any.
currentBlockRegion
Access
read-only
Returns
fBlockResolvedRegion
currentBlockRow attribute
Access row properties of the current block, if any.
currentBlockRow
Access
read-only
Returns
fBlockResolvedRow
currentFormat attribute
This is the current set of parameters that were used to start this format, or null if the document is not currently being formatted. The properties on this object are read only and cannot be changed.
currentFormat
Access
read-only
Returns
fFormat
currentPage attribute
This is the current active page.
currentPage
Access
read-only
Returns
fPage
currentParagraph attribute
A paragraph object that reflects the values of paragraph properties that are currently in effect.
currentParagraph
Access
read-only
Returns
fParagraph
currentState attribute
Current state of the area being formatted.
currentState
Access
read-only
Returns
fFormatState
currentStream attribute
This object describes the invocation of the stream that is currently being formatted.
currentStream
Access
read-only
Returns
fFormatPos
currentStyle attribute
A style object that reflects the values of style properties that are currently in effect.
currentStyle
Access
read-only
Returns
fStyle
currentTable attribute
A table object that reflects the values of table properties that are currently in effect. If no table is currently being formatted, this property is null.
currentTable
Access
read-only
Returns
fTableResolved
currentTableCell attribute
An fTableCell object that reflects the values of table cell properties that are currently in effect. If no table is currently being formatted, this property is null.
currentTableCell
Access
read-only
Returns
fTableResolvedCell
currentTableRow attribute
An fTableRow object that reflects the values of table row properties that are currently in effect. If no table is currently being formatted, this property is null.
currentTableRow
Access
read-only
Returns
fTableResolvedRow
currentTeX attribute
An fTeX object that reflects the values of the TeX properties that are currently in effect.
currentTeX
Access
read-only
Returns
fTeX
currentTypeface attribute
Return the font object corresponding to the currently selected font family when taking any styling information such as fStyle.italic, fStyle.weight etc. into account.
currentTypeface
Access
read-only
Returns
fTypeface
currentXMLNode attribute
If the primary stream being formatted contains XML, this is is fxNode object for the current node within the XML tree.
The primary stream is either level 0 in the streamHierarchy or a level where an XML stream has been promoted to the primary position for XPath. e.g. formatting.formatStream( streamName, '+' );
currentXMLNode
Access
read-only
Returns
fxNode
defaultParagraph attribute
A paragraph object that reflects this paragraph's default values for all paragraph properties, as set up by the paragraph object passed to paragraphStart.
defaultParagraph
Access
read-only
Returns
fParagraph
defaultStyle attribute
A style object that reflects this paragraph's default values for all style properties, as set up by the style object passed to paragraphStart.
defaultStyle
Access
read-only
Returns
fStyle
defaultTeX attribute
An fTeX object that reflects this paragraph's default values for all TeX properties, as set up by the fTeX object passed to paragraphStart.
defaultTeX
Access
read-only
Returns
fTeX
errorLogCountsFatal attribute
The current total of fatal error messages raised so far.
errorLogCountsFatal
Access
read-only
Returns
int
errorLogCountsInformation attribute
The current total of information error messages raised so far.
errorLogCountsInformation
Access
read-only
Returns
int
errorLogCountsNonFatal attribute
The current total of non fatal error messages raised so far.
errorLogCountsNonFatal
Access
read-only
Returns
int
errorLogCountsWarning attribute
The current total of warning error messages raised so far.
errorLogCountsWarning
Access
read-only
Returns
int
fish attribute
Access and modify the Format Inheritable String Hashes. This property is an "array of hashes," representing the indiviual FISH buckets. That is, there is an element for each FISH bucket. These elements in turn are hashes that provide access to the values stored in the FISH variables.
fish
Access
read-only
Returns
fStringArray[]
formatTextMode attribute
The mode value that was set when formatting.formatText() was called.
formatTextMode
Access
read-only
Returns
int
streamHierarchy attribute
This array provides access to the hierarchy of streams that are currently being formatted. There is one fFormatPos derived object for each level of nesting. The currently formatted stream itself is available as currentStream.
streamHierarchy
Access
read-only
Returns
fArray
stringCounters attribute
This array of strings gives access to PTC ALD's so-called String-Counters. The strings stored in this array are guaranteed to be the same each time a particular part of the document is being processed during formatting, no matter how many passes are needed to format that part of the document.
stringCounters
Access
read-only
Returns
fStringArray
tableHierarchy attribute
Nested tables can be accessed using this property. The table at the bottom of the hierarchy, i.e. the root table can be accessed at index 0. Table hierarchy excludes nested blocks, for nested blocks, see blockHierarchy.
tableHierarchy
Access
read-only
Returns
fTablePos[]
accoladeEnd method
PI: accolade
Ends the accolade at the specified level.
accoladeEndlevel
Parameters
intlevel
The level containing the accolade to end.
Returns
void. None.
accoladeStart method
PI: accolade
Marks the start of the link for the specified bookmark.
accoladeStartaccoladelevelpercentoffsetdrawModedrawLevelpreventRepeatonlyTop
Parameters
fAccoladeaccolade
The object containing the accolade settings to use. This can either be an fAccolade or fAccoladeInline object, as required.
intlevel
The level on which to start the accolade.
intpercent
The percentage of the accolade to display.
intoffset
The field percentage to use, overriding the value in the accolade top location.
intdrawMode
When to draw the accolade. Value is one of fAccolade-AccoladeDrawMode.
intdrawLevel
Where to draw the accolade relative to other text and rules. Value is one of fAccolade-AccoladeDrawLevel.
booleanpreventRepeat
If true, the accolade will not repeat when flowing into a new column.
booleanonlyTop
If true, the accolade will only start if it is at the top of the frame.
Returns
void. None.
addHorizontalKern method
PI: hkern
Add the given amount of horizontal kerning at the current formatting position.
addHorizontalKernamount
Parameters
fLengthamount
The amount of horizontal kerning to be added.
Returns
void. This method does not return a value.
addImage method
Insert an image at the current formatting position. Instead of providing a single list of parameters, it is possible to call this method with an anonymous object containing properties using the names listed in the parameters.
addImageimageplacescaleXscaleXSizescaleYscaleYSizebestFitXbestFitYuseBaselineforceMinDPIopacitypdfLayer
Parameters
fTagimage
The image to use. This can either be an fRaster or an fGraphic object.
intplace
Where to place the image. Value is one of fFormatting.ImagePlaces.
intscaleX
The method to use when scaling the image horizontally. Value is one of fFormatting.ImageScale
fLengthscaleXSize
The size to use when scaleX is set to SCALE_ABSOLUTE, SCALE_DOT, SCALE_SHRINK or SCALE_ENLARGE, or the percentage to use when set to SCALE_PERCENT.
intscaleY
The method to use when scaling the image vertically. Value is one of fFormatting.ImageScale
fLengthscaleYSize
The size to use when scaleY is set to SCALE_ABSOLUTE, SCALE_DOT, SCALE_SHRINK or SCALE_ENLARGE, or the percentage to use when set to SCALE_PERCENT.
intbestFitX
The method to use when scaling the image horizontally. If either this property or bestFitY is set to BESTFIT_NONE, best fit mode is not used. Value is one of fFormatting.ImageBestFit
intbestFitY
The method to use when scaling the image vertically. If either this property or bestFitX is set to BESTFIT_NONE, best fit mode is not used. Value is one of fFormatting.ImageBestFit
booleanuseBaseline
If true, the image will sit on the baseline, otherwise it will be centred on the baseline. This property is ignored if inline is false.
booleanforceMinDPI
If true, any image with lower than 10 DPI will be adjusted to 96 DPI.
floatopacity
The percentage opacity to draw this image on supported output drivers.
fPDFLayerpdfLayer
The PDF layer to place the U3D object on.
Returns
void. None.
addMedia method
Insert a media file at the current formatting position, using a specified flash player. This is only supported when outputting to PDF, and will result in an empty box when using any other output driver. Instead of providing a single list of parameters, it is possible to call this method with an anonymous object containing properties using the names listed in the parameters.
addMediaimageplacescaleXscaleXSizescaleYscaleYSizebestFitXbestFitYuseBaselinepdfNameflashVarsflashPlayerposteractivationanimationCountanimationSpeedanimationStyle
Parameters
fTagimage
The media file to use. This must be an fRaster object.
intplace
Where to place the player. Value is one of fFormatting.ImagePlaces.
intscaleX
The method to use when scaling the player horizontally. Value is one of fFormatting.ImageScale
fLengthscaleXSize
The size to use when scaleX is set to SCALE_ABSOLUTE, SCALE_DOT, SCALE_SHRINK or SCALE_ENLARGE, or the percentage to use when set to SCALE_PERCENT.
intscaleY
The method to use when scaling the player vertically. Value is one of fFormatting.ImageScale
fLengthscaleYSize
The size to use when scaleY is set to SCALE_ABSOLUTE, SCALE_DOT, SCALE_SHRINK or SCALE_ENLARGE, or the percentage to use when set to SCALE_PERCENT.
intbestFitX
The method to use when scaling the player horizontally. If either this property or bestFitY is set to BESTFIT_NONE, best fit mode is not used. Value is one of fFormatting.ImageBestFit
intbestFitY
The method to use when scaling the player vertically. If either this property or bestFitX is set to BESTFIT_NONE, best fit mode is not used. Value is one of fFormatting.ImageBestFit
booleanuseBaseline
If true, the player will sit on the baseline, otherwise it will be centred on the baseline. This property is ignored if inline is false.
StringpdfName
The name for this object when outputting it to PDF.
StringflashVars
The configuration string to use with the flash player when adding it to the PDF.
StringflashPlayer
The name of the flash player to use to play the media in the PDF. This parameter will be ignored if the fRaster object is a Flash media type.
fRasterposter
The image to display when the media object is not active in the PDF.
intactivation
When to activate or deactivate the media object in the PDF. Possible values are in fFormatting-PDFActivationFlags.
intanimationCount
The number of times to play the animation if supported by the media, or a negative value to play the animation indefinitely.
floatanimationSpeed
The speed multiplier for the animation if supported by the media. A value greater than 1 will speed the animation up, a value less than 1 will slow it down.
intanimationStyle
The animation playback style to use if supported by the media. Possible values are in fFormatting-PDFAnimationStyles.
Returns
void. None.
addPDFFormItem method
This method will place a PDF Form item at the current formatting position. This is only supported when outputting to PDF, and will result in an empty box when using any other output driver. Instead of providing a single list of parameters, it is possible to call this method with an anonymous object containing properties using the names listed in the parameters.
addPDFFormItempdfFormItemplacewidthheightuseBaselinepdfNamepdfLayer
Parameters
fPDFFormItempdfFormItem
The PDF Form item to place.
intplace
Where to place the PDF Form item. Value is one of fFormatting.ImagePlaces.
fLengthwidth
The width of the PDF Form item.
fLengthheight
The height of the PDF Form item.
booleanuseBaseline
If true, the PDF Form item will sit on the baseline, otherwise it will be centred on the baseline. This property is ignored if inline is false.
StringpdfName
The name for this object when outputting it to PDF. This parameter will override the fPDFFormItem-pdfName property, if specified.
fPDFLayerpdfLayer
The PDF layer to place the PDF Form item on. This parameter will override the fPDFFormItem-pdfLayer property, if specified.
Returns
void. None.
addReference method
This method supports the reference objects used to replace the respective quote PIs, e.g. fBookmarkReference, fFootnoteReference, fIndexReference, fRunningHeaderReference.
addReferencereference
Parameters
Objectreference
The reference object to process.
Returns
void. None.
addU3D method
Insert a U3D image at the current formatting position. Instead of providing a single list of parameters, it is possible to call this method with an anonymous object containing properties using the names listed in the parameters.
addU3DimageplacescaleXscaleXSizescaleYscaleYSizebestFitXbestFitYuseBaselineviewNamepdfNameanimationCountanimationSpeedanimationStylescript
Parameters
fTagimage
The U3D image to use. This must be an fRaster object.
intplace
Where to place the image. Value is one of fFormatting.ImagePlaces.
intscaleX
The method to use when scaling the image horizontally. Value is one of fFormatting.ImageScale
fLengthscaleXSize
The size to use when scaleX is set to SCALE_ABSOLUTE, SCALE_DOT, SCALE_SHRINK or SCALE_ENLARGE, or the percentage to use when set to SCALE_PERCENT.
intscaleY
The method to use when scaling the image vertically. Value is one of fFormatting.ImageScale
fLengthscaleYSize
The size to use when scaleY is set to SCALE_ABSOLUTE, SCALE_DOT, SCALE_SHRINK or SCALE_ENLARGE, or the percentage to use when set to SCALE_PERCENT.
intbestFitX
The method to use when scaling the image horizontally. If either this property or bestFitY is set to BESTFIT_NONE, best fit mode is not used. Value is one of fFormatting.ImageBestFit
intbestFitY
The method to use when scaling the image vertically. If either this property or bestFitX is set to BESTFIT_NONE, best fit mode is not used. Value is one of fFormatting.ImageBestFit
booleanuseBaseline
If true, the image will sit on the baseline, otherwise it will be centred on the baseline. This property is ignored if inline is false.
StringviewName
The name of the view to display for the U3D image.
StringpdfName
The name for this object when outputting it to PDF.
intanimationCount
The number of times to play the animation if defined in the U3D, or a negative value to play the animation indefinitely.
intanimationSpeed
The speed multiplier for the animation if defined in the U3D. A value greater than 1 will speed the animation up, a value less than 1 will slow it down.
intanimationStyle
The animation playback style to use if if defined in the U3D. Possible values are in fFormatting-PDFAnimationStyles.
fPDFActionscript
A PDF action containing JavaScript to run when the 3D object is instantiated in the PDF.
Returns
void. None.
blockColumnFooter method
PI: blockfootc
Used to indicate the beginning and end of the block column footers, which cause text to be repeated at the bottom of each individual column/cell when they overflow.
The footer line(s) will potentially be reinserted whenever the block overflows a region, but N.B. this will NOT cause the commands at the very start of the footer to be re-processed; just the text. When the column overflows after inserting a footer, it does so after having processed the pre-amble for the next paragraph, and remembers the properties for the paragraph. This means that any showstrings and getvars will have been processed at the end of the previous column and the results will be remembered instead of being reprocessed at the top of the new column.
You can change footers mid-way through the block. When used in conjunction with levels, you will override the specified level and all subsequent levels will be cleared.
blockColumnFooternumlevelflags
Parameters
intnum
If num is non-zero then this marks the start of the footer, and when zero it indicates that the footer will stop at the end of the current paragraph. (Footers must be a complete number of paragraphs). If num is 2, then it marks the start of the footer in the normal way, but the footer para(s) will be skipped when first encountered in the text.
intlevel
You can have multiple levels of column footers, by using several calls to blockColumnFooter and specifying a level for each, from 1 to 5. This lets you have up to 5 footers running concurrently. When the block overflows a region, all of the relevant column footers will be inserted in order, from 1 to 5.
Stringflags
The flags consist of a series of letters that let you control when the column footer is included. They come in two halves as follows:
f,l,m
You can specify which columns include the footer by using flags and distinguishing between first column, last column and middle columns by including a combination of the letters f, l and m. If you don't specify f, l or m, 3B2 will default to including the footer on all columns.
o,h,c,r,t
You can also specify whether to include the footer by using flags to distinguish between the different reasons for the cell ending. Again, if you don't specify any of o, h, c, r or t, 3B2 will default to including the footer whatever the reason for the cell ending. The individual flags work as follows:
o
Footer will appear if the cell overflowed.
h
Footer will appear if a hard column or page break is used.
c
Footer will appear if cell break used.
r
Footer will appear if row break used.
t
Footer will appear at end of block.
Returns
void. This method has no return value.
blockColumnHeader method
PI: blockheadc
Used to indicate the beginning and end of the block column headers, which cause text to be repeated at the top of each individual column/cell.
The header line(s) will potentially be re-inserted whenever the block starts a region, but N.B. this will NOT cause the commands at the very start of the header to be re-processed; just the text.
You can change headers mid-way through the block. When used in conjunction with levels, you will override the specified level and all subsequent levels will be cleared. Thus you could have a main header on level 1, and sub-headers on level 2 that change for each section of the block. If a change of header occurs, whilst inserting existing headers, then the new header(s) will be used and the old ones ignored.
blockColumnHeadernumlevelflags
Parameters
intnum
If num is non-zero then this marks the start of the header, and when zero it indicates that the header will stop at the end of the current paragraph. (Headers must be a complete number of paragraphs). If num is 2, then it marks the start of the header in the normal way, but the header para(s) will be skipped when first encountered in the text.
intlevel
You can have multiple levels of column headers, by using several calls to blockColumnHeader and specifying a level for each, from 1 to 5. This lets you have up to 5 headers running concurrently. When the block starts a new region, all of the relevant column headers will be inserted in order, from 1 to 5.
Stringflags
You can specify which columns include the header by using flags and distinguishing between first column, last column and middle columns by including a combination of the letters f, l and m.
Returns
void. This method has no return value.
blockEnd method
PI: blockend
End a block previously started with blockStart.
blockEndtopbreakname
Parameters
inttopbreak
If topbreak is set to 1 and the blockEnd call occurs at the start of a line, then it no longer behaves like a carriage return and doesn't create a newline, whilst still ending the block.
Specifying topbreak = 2 goes one stage further, and if the whole block is empty means that it will be ignored, it will take up no space, and margin merging will take place between the blocks on either side.
Specifying topbreak = 3 will preserve a block if it only contains ignorable whitespace, otherwise it is treated the same as topbreak = 2.
Stringname
If a name is provided here, it will be checked against the 'name' property of the block. If the names mismatch the block will still be ended but a warning message will be generated. These messages can be viewed by using the tformat? command and turning on the relevant messages.
Returns
void. This method does not return a value.
blockStart method
PI: blockstart and blockbody
This method marks the beginning of a new block. If the optional block parameter is specified, the new block's properties are set up from the attributes that are defined on that object. If no block object is specified or certain attributes are undefined, the new block uses default values for these attributes.
blockStartblockpreamblename
Parameters
fBlockblock
An optional parameter that specifies the new block's properties.
Stringpreamble
This optional parameter allows inserting a string of processing instructions literally into the preamble of the new block.
Stringname
This optional parameter allows giving a name to a block. See block 'name' property for more details. This method of giving a name to a block will override the 'name' property, if given previously.
Returns
void. This method does not return a value.
bookmarkLinkEnd method
PI: tbklnk
Marks the end of the current bookmark link.
bookmarkLinkEnd
Parameters
None
Returns
void. None.
bookmarkLinkStart method
PI: tbklnk
PI: tbklnkcol (since APP 11.0 F000)
Marks the start of the link for the specified bookmark.
bookmarkLinkStartlinkNamelinkColor
Parameters
StringlinkName
The name of the bookmark to use in the link. If a fBookmark object with that name doesn't already exist, one will be created.
fColorlinkColor
Sets the colour of highlight for the hot area of a link in PDFs. If not specified, the link colour specified in the current fStyle will be used. IF "none", the link colour specified in the PDF Printer options will be used.
Returns
void. None.
breakBottom method
PI: breakb
Breaks the current paragraph at the bottom.
breakBottomtypeimmediate
Parameters
inttype
The type of break to issue. Value is one of fFormatting.breakType. Multiple breaks can be issued at the same time by adding these values together.
intimmediate
Indicates if the break should occur immediately without waiting for the line or paragraph to end.
Returns
void. None.
breakTop method
PI: breakt
Breaks the current paragraph at the top. For this instruction to be effective, it must be specified before the first printable character.
breakToptypeimmediate
Parameters
inttype
The type of break to issue. Value is one of fFormatting.breakType. Multiple breaks can be issued at the same time by adding these values together.
intimmediate
Indicates if the break should occur immediately without waiting for the line or paragraph to end. If this value is set to 2, the break will be deferred until the next printable character.
Returns
void. None.
buildIndex method
PI: buildindex
If formatting with an index control stream, build the specified index now.
buildIndexnamedelay
Parameters
Stringname
The name of the desired attribute
booleandelay
If true and the specified index is of type fIndexItem.ON_COMMAND, delay building the index until the end of the format.
Returns
void. None.
calculateExpression method
PI: calcf
Evaluate the specified expression, including lengths and custom PTC ALD functions.
calculateExpressionexpressionpercent
Parameters
Stringexpression
The expression to be evaluated.
floatpercent
If the expression contains any percentages, this value will determine what 100% equates to.
Returns
String. The results of the expression. If the expression evaluated to a number, it will need to be converted manually.
changeLineNumber method
PI: lineno
When placed on a line, the fFormatting.changeLineNumber method will artificially alter PTC ALDs internal line count for that line. If no parameters are specified, the method will assume the type of ALL_LINES and the value -1 (not absolute).
changeLineNumbertypevalueabsolute
Parameters
inttype
The line reference to modify. See fFormatting.LineReference.
intvalue
the amount to alter the line number by.
booleanabsolute
if true, the value will be used as is, otherwise it will be addedd to the current line number.
Returns
void. None.
contextAdd method
PI: contextup
Adds the specified fContext control object to the current list of contexts used during formatting.
contextAddcontextsgrouplimit
Parameters
fContextscontexts
The set of contexts to add to the current list.
intgroup
The number of the group to add the contexts to. This value should be between 0 and 4. The default value is 0.
intlimit
If set, any other contexts added prior to this instruction will not be searched. This value defaults to 0. This value should be one of fFormatting-ContextLimits.
Returns
void. None.
contextRemove method
PI: contextdown
Removes the most recently added set of contexts from the specified group.
contextRemovegroupremoveAll
Parameters
intgroup
The number of the group to remove the contexts from. This value should be between 0 and 4. The default value is 0.
booleanremoveAll
If true, all contexts added using contextAdd() will be removed. This value defaults to false.
Returns
void. None.
evaluateRunningHeader method
PI: show
Obtain the value of the specified running header reference at the current formatting position and return the result.
evaluateRunningHeadernamegroupstreamNamewhichReferenceblankReferencewhichFirstnumCharacters
Parameters
Stringname
The name of the running header reference, or blank for no name.
intgroup
The running header group from which to obtain the reference. This is the group value from fRunningHeaderReference.RunningHeaderReferenceGroups. If more than one group is specified, the reference determined by whichReference is returned.
StringstreamName
The name of the stream containing the running header, or blank for the first stream on the page.
intwhichReference
Which reference to obtain the header text from. Value is one of fRunningHeaderReference.RunningHeaderText.
intblankReference
How to handle blank running header references. Value is one of fRunningHeaderReference.RunningHeaderBlank.
intwhichFirst
Which line should contain the first reference on the page. Value is one of fRunningHeaderReference.RunningHeaderFirstOnPageRef.
intnumCharacters
The maximum number of characters to output.
Returns
String. The result of the specified running header.
evaluateShowString method
PI: show
Evaluate the given show string at the current formatting position and return the result.
evaluateShowStringexpression
Parameters
Stringexpression
The show string to evaluate.
Returns
String. The result of evaluating the given show string.
evaluateUnstableXPath method
Evaluate the provided XPath expression at the current formatting position and return the result.
evaluateUnstableXPathexpression
Parameters
Stringexpression
The expression to evaluate.
Returns
String. The results of the expression.
evaluateXPath method
Evaluate the provided XPath expression at the current formatting position and return the result.
evaluateXPathexpression
Parameters
Stringexpression
The expression to evaluate.
Returns
String. The results of the expression.
fishGet method
ShowString: fish
Gets the current value of the named property from the specified fish[] bucket with the given number.
fishGetbucketnamelevel
Parameters
intbucket
The number of fish bucket to look in.
Stringname
The name of the property to get.
intlevel
The number of levels to look back through, i.e. 0 will only return a value if the property was set on this level, 1 will return a value if it was set either on this level or it's parent, etc. -1 will check all levels.
Returns
String. The value of the named fish property, if set.
fishRestore method
Restore the values of a fish[] bucket previously stored by fishUp.
fishRestorebucket
Parameters
intbucket
The number of fish bucket to restore, or 0 if omitted.
Returns
void. This method does not return a value.
fishSave method
PI: fishup
Save the current state of the values stored in the fish[] bucket with the given number. This state can be restored by a subsequent call to fishDown with the same argument.
fishSavebucket
Parameters
intbucket
The number of fish bucket to save, or 0 if omitted.
Returns
void. This method does not return a value.
formatSequence method
PI: format_seq
Formats a number according to the specified sequence.
formatSequencenumberpatterngroupSeparatorgroupSize
Parameters
intnumber
The number to format.
Stringpattern
The pattern to use, for example "1" for digits, "a" for letters, or "i" for Roman Numerals. The possible patterns are identical to those provided with the XSLT element xsl:number. This value can also be a complex number format, such as those included in fNumberFormat-NumberFormats.
StringgroupSeparator
A single character to be used to separate groups of digits.
intgroupSize
The number of digits in each group, indicating where the separator should be inserted.
Returns
String. The formatted number.
formatStream method
Format the given stream at the current formatting location.
formatStreamstreampositionattributes
Parameters
fStreamstream
The stream to be formatted.
Stringposition
Optionally specify the positions to format in the given stream.
Objectattributes
Optionally pass named attributes to the called stream. The properties on the given object are treated equivalently to XML attributes specified when calling a stream. They can be accessed using attribute loops from traditional streams or via arguments[0].attributes from .Jf streams.
Returns
void. This method does not return a value.
formatText method
Funcvar ^[format_text]
This method will format the text in the specified stream and return the text that was generated during the format.
formatTextstreammodewidth
Parameters
fStreamstream
The stream containing the text to format.
intmode
The mode value to use while formatting the content. This value will be available using the fFormatting.formatTextMode property.
fLengthwidth
The width to use when measuring the text. If not provided, it will use 100mm.
Returns
String. The text generated by formatting the input stream.
formatUnstableStream method
Format the given stream at the current formatting location.
formatUnstableStreamstreampositionattributes
Parameters
fStreamstream
The stream to be formatted.
Stringposition
Optionally specify the positions to format in the given stream.
Objectattributes
Optionally pass named attributes to the called stream. The properties on the given object are treated equivalently to XML attributes specified when calling a stream. They can be accessed using attribute loops from traditional streams or via arguments[0].attributes from .Jf streams.
Returns
void. This method does not return a value.
getAttribute method
PI: showifdef
Get the value of the attribute based on the current stream (or ancestor, when formatting).
getAttributenameinherited
Parameters
Stringname
The name of the desired attribute
intinherited
[optional] If true, check ancestors in the formatting hierarchy for the attribute. Value is one of fFormatting.InheritModes.
Returns
String. The value of the attribute if found, or empty string if not.
getCurrentIndent method
Returns an fIndent object that represents the current position on the line. When this object is used with indentLeft and indentRight of fParagraph, the indentation will be set to the horizontal position at the point of its creation. Consequently, to set a left indent to the current horizontal position, use formatting.currentParagraph.indentLeft[0] = formatting.getCurrentIndent();
getCurrentIndent
Parameters
None
Returns
fIndent. An fIndent object that represents the current horizontal position on the line.
ignoreSpaces method
PI: signssp
PI: signmsp
PI: signsp
Determines whether spaces are ignored, overriding the default setting on the stream currently being formatted.
ignoreSpacesignoreSpaces
Parameters
intignoreSpaces
The flag indicating which spaces should be ignored. Value is one of fFormatting.IgnoreSpaceFlags.
Returns
void. None.
insertLeader method
Inserts leaders between the current formatting position and the right text margin.
insertLeaderleader
Parameters
fLeaderleader
The object containing the leader parameters to insert.
Returns
void. None.
keepEnd method
PI: ek
PI: ekw
This method can be used to bracket a section of text that must stay together in one segment. The keepStart method must be called at the start of the text to be kept and the keepEnd method must be called at the end.
keepEndshowStringwordKeep
Parameters
StringshowString
This method can each take an optional show string. If the text cannot be kept together in a segment then the given show string is processed, otherwise it is ignored. There is no default keepEnd show string.
booleanwordKeep
If true, the keep will end at the end of the word, otherwise it will apply from when this command is issued.
Returns
void. This method does not return a value.
keepStart method
PI: bk
PI: bkw
This method can be used to bracket a section of text that must stay together in one segment. The keepStart method must be called at the start of the text to be kept and the keepEnd method must be called at the end.
keepStartshowStringwordKeep
Parameters
StringshowString
This method can each take an optional show string. If the text cannot be kept together in a segment then the given show string is processed, otherwise it is ignored. The keepStart show string defaults to $262# (soft return ISOnumber) which generates a soft return.
booleanwordKeep
If true, the keep will start from the beginning of the word, otherwise it will apply from when this command is issued.
Returns
void. This method does not return a value.
lineKeepEnd method
PI: elk
This method will keep a block of text together over pages. When the lineKeepStart method is invoked, all following lines will remain together as a block, until the line keep is revoked. The key difference between a line keep and other keep facilities is that it works indiscriminately across paragraph boundaries. It can be invoked and revoked anywhere on any line of any paragraph. The lines from (and including) the start to the end line will remain together as an unbroken block.
Using the lineKeepEnd method is a good way to keep the paragraph that precedes a table with the actual table.
lineKeepEndlevel
Parameters
intlevel
Line keeps can also be nested. When no line keep is active, the current level is 0. When line keep is first invoked with lineKeepStart, the level for the current line increases to 1. Each subsequent lineKeepStart without any intervening lineKeepEnd will increase the nest level by 1 more. Each lineKeepEnd will decrease the level by 1. When it reaches 0, Line Keep becomes inactive for the current line. lineKeepEnd does not allow the Line Keep level to go below 0.
Sometimes, it may be necessary to start a new nesting structure, ending any previous Line Keeps, or to completely end all active line keeps, without regard to the current level. Both of these are achieved by passing a level number to the methods: lineKeepStart(1); lineKeepEnd(0)
Any level number can be used, but the lineKeepStart number must be at least 1 or the method call is ignored.
If all line keeps are started and ended with level values of 1 and 0 as shown above then this effectively gives inner keep blocks priority over any outer block. However, do note that lines at the beginning of the outer block, before the first inner block starts, will still be kept with the first inner keep as the level number for these lines was greater than 0.
Returns
void. This method does not return a value.
lineKeepStart method
PI: blk
This method will keep a block of text together over pages. When the lineKeepStart method is invoked, all following lines will remain together as a block, until the line keep is revoked. The key difference between a line keep and other keep facilities is that it works indiscriminately across paragraph boundaries. It can be invoked and revoked anywhere on any line of any paragraph. The lines from (and including) the start to the end line will remain together as an unbroken block.
lineKeepStartlevel
Parameters
intlevel
Line keeps can also be nested. When no line keep is active, the current level is 0. When line keep is first invoked with lineKeepStart, the level for the current line increases to 1. Each subsequent lineKeepStart without any intervening lineKeepEnd will increase the nest level by 1 more. Each lineKeepEnd will decrease the level by 1. When it reaches 0, Line Keep becomes inactive for the current line. lineKeepEnd does not allow the Line Keep level to go below 0.
Sometimes, it may be necessary to start a new nesting structure, ending any previous Line Keeps, or to completely end all active line keeps, without regard to the current level. Both of these are achieved by passing a level number to the methods: lineKeepStart(1); lineKeepEnd(0)
Any level number can be used, but the lineKeepStart number must be at least 1 or the method call is ignored.
If all line keeps are started and ended with level values of 1 and 0 as shown above then this effectively gives inner keep blocks priority over any outer block. However, do note that lines at the beginning of the outer block, before the first inner block starts, will still be kept with the first inner keep as the level number for these lines was greater than 0.
Returns
void. This method does not return a value.
lineNumberReset method
This method will reset the current line number count to the specified value, if line numbering is enabled for this current frame.
lineNumberResetlineNumberparaNumber
Parameters
intlineNumber
The value to set the line number count to, or 0 to not change.
intparaNumber
The value to set the paragraph number count to, or 0 to not change.
Returns
void. None.
mapReturns method
PI: smapret
PI: smaprety
Maps all return characters to spaces, overriding the default setting on the stream currently being formatted.
mapReturnsmapReturns
Parameters
intmapReturns
The flag indicating which character to map returns to. Value is one of fFormatting.MapReturnFlags.
Returns
void. None.
mapTabs method
PI: smaptab
Maps all tab characters to spaces, overriding the default setting on the stream currently being formatted.
mapTabsmapTabs
Parameters
booleanmapTabs
If true, any tab characters will be mapped to spaces. Otherwise, they will be left as tabs.
Returns
void. None.
measureContent method
Funcvar ^[copyheight]
This method will format the text in the specified stream and return the height of the content.
measureContentstreamwidth
Parameters
fStreamstream
The stream containing the text to format.
fLengthwidth
The width to use when measuring the text. If not provided, it will use 100mm.
Returns
fLength. The height of the content.
output method
Process text at the current formatting position. The text is parsed normally by PTC ALD, that is, showstrings, PIs, etc. are resolved and their results are inserted at the current formatting position.
Processing instructions issued using this call are running in a child stream as if issued from a <?show> instruction. This means that if PIs such as yanks are referencing their ancestor streams using negative numbers, the direct ancestor (at -1) will be the JavaScript stream that called output and further ancestors will be at indices -2 and lower.
outputstring
Parameters
Stringstring
The string to be processed at the current formatting position.
Returns
String. The string that was inserted at the formatting position.
pageLabelStore method
This method will store a page label at the current formatting position.
pageLabelStorelabel
Parameters
Stringlabel
The text to store in the page label.
Returns
void. None.
pageSequenceBreak method
PI: pseqbreak
Breaks the page, possibly inserting a blank page to ensure the page sequence continues on the correct odd or even page. If no content has been output on the current page, a break will only be inserted if required to meet the condition.
pageSequenceBreakoddevenid
Parameters
intoddeven
The side the next page should be on. Possible values are in fDocumentSequenceItem-StartForce.
intid
The new document sequence id number to use for the current page sequence. If this value is not provided or set to -1, the current id number will be used.
Returns
void. None.
pageSequenceEnd method
PI: pseqend, pseqdown
Ends the current active page sequence.
pageSequenceEnddownLevel
Parameters
booleandownLevel
If true, move back to the previous level in the stack of active page sequences. Otherwise, switch to the next available sequence.
Returns
void. None.
pageSequenceStart method
PI: pseqstart, psequp
Starts the specified page sequence.
pageSequenceStartsequenceupLevel
Parameters
fDocumentSequenceItemsequence
The page sequence to start with all associated parameters.
booleanupLevel
If true, start this page sequence as a child of the current active page sequences, creating a new level in the stack of sequences. Otherwise, end the current sequence and start this one in its place.
Returns
void. None.
paragraphStart method
This method causes the current paragraph to break. It is possible to specify default values for the paragraph and style properties for the new paragraph, which will subsequently be available through the property defaultParagraph.
paragraphStartparagraphstyle
Parameters
fParagraphparagraph
If specified, specifies the default values for the paragraph properties of the new paragraph.
fStylestyle
If specified, specifies the default values for the style of the new paragraph.
Returns
void. This method does not return a value.
pdfNote method
This method will output a PDF Sticky Note at the current formatting position.
pdfNotecommentopenauthorsubjectcoloriconpdfNamepdfLayer
Parameters
Stringcomment
The text to put in the sticky note.
booleanopen
If true, the comment will initially be open when the PDF is opened.
Stringauthor
The author of the comment.
Stringsubject
The subject of the comment.
fColorcolor
The color to use for the sticky note. If this parameter is null, the sticky note will default to yellow.
inticon
The icon to use when displaying the note in the PDF. The value is one of fPDFNote.Icons, and defaults to fPDFNote.ICON_NOTE.
StringpdfName
The name to use for the note in the PDF.
fPDFLayerpdfLayer
The PDF layer to place the PDF note on.
Returns
void. None.
pdfTagActivate method
This method will store the current PDF Tag element and activate a labeled PDF Tag element. Subsequent PDF Tags will be inserted as children of the labeled PDF Tag element. If no parameters are specified, the previously stored PDF Tag element is activated.
pdfTagActivatelabel
Parameters
Stringlabel
An optional parameter for the label of the PDF Tag that should be activated.
Returns
void. None.
pdfTagEnd method
PI: pdftagend
This method will end the current PDF Tag element.
pdfTagEndname
Parameters
Stringname
An optional parameter for the name of the PDF Tag that should be closed. If a name is provided and the name doesn't match the current open PDF Tag, then an error is raised.
Returns
void. None.
pdfTagStart method
PI: pdftagstart
This method instantiates a PDF Tag element which will be used to generate the PDF Tag Structure when printed to PDF. Calls to pdfTagStart must be paired with calls to pdfTagEnd within the same stream to generate the desired structure.
pdfTagStarttag
Parameters
fPDFTagItemtag
The PDF Tag to start, use fPDFTagArtifact objects for tags with the Artifact Role, and fPDFTagElement for all other roles.
Returns
void. None.
printPassthrough method
Sends extra data during printing, if the current printer supports it.
printPassthroughprintermodestream
Parameters
Stringprinter
The name of the printer to send data to.
intmode
The passthrough mode. These values are different depending on the type of printer. For the JS driver, mode 0 will copy the contents of the stream to the output, and mode 1 will run the stream if it is a JavaScript function. For the RAW drivers, mode 0 will copy the contents of the stream to the output.
fStreamstream
The stream containing the data to send to the printer.
Returns
void. None.
raiseError method
The method will raise an error in the format log (if enabled) at the specified level.
raiseErrorseveritymessage
Parameters
intseverity
The level of the error to raise. See fFormatting.ErrorSeverity.
Stringmessage
The message text to be written to the log.
Returns
void. None.
recordEnd method
PI: re
Ends the current line.
recordEndtypealignconditional
Parameters
inttype
The type of break to issue when ending the line. Value is one of fFormatting.RecordEndType.
intalign
Specifies how to align the line containing the break. Value is one of fFormatting.RecordEndAlign.
intconditional
Specifies when to issue the break. Value is one of fFormatting.RecordEndCondition.
Returns
void. None.
styleChange method
Activate the style properties that are defined on the given style object. The modified style comes into effect immediately.
styleChangestyle
Parameters
fStylestyle
The style object to process.
Returns
void. This method does not return a value.
styleRestore method
Used mainly but not exclusively within references and paragraph styles as a way to delimit the point at which attributes preceded by a call to styleSave are to be turned off.
Pairing calls to styleSave and styleRestore is particularly useful when setting up font references. All of these attributes would be turned off with a simple styleRestore method call, avoiding the need to reset each attribute.
styleRestore
Parameters
None
Returns
void. This method does not return a value.
styleSave method
PI: up
Used mainly but not exclusively within references and paragraph styles as a way of delimiting a set of text attribute changes which are being turned on; a subsequent call to styleRestore will delimit the point at which these attributes are to be turned off.
Pairing calls to styleSave and styleRestore is particularly useful when setting up font references. All of these attributes would be turned off with a simple styleRestore method call, avoiding the need to reset each attribute.
styleSave
Parameters
None
Returns
void. This method does not return a value.
subscriptEnd method
PI: sb, sx
End one or all levels of superscripts or subscripts.
subscriptEndkeepHorizontalendAll
Parameters
booleankeepHorizontal
If false or omitted, end the current subscript level and return to the horizontal position where the subscript started. If true, remain at the horizontal position where the subscript ended.
booleanendAll
If false or omitted, one subscript level is ended. If true, all subscript and superscript levels are ended. If true, the parameter keepHorizontal is ignored.
Returns
void. This method does not return a value.
subscriptStart method
PI: sub
Increase the subscript level by one.
subscriptStart
Parameters
None
Returns
void. This method does not return a value.
superscriptEnd method
PI: sb, sx
End one or all levels of superscripts or subscripts.
superscriptEndkeepHorizontalendAll
Parameters
booleankeepHorizontal
If false or omitted, end the current subscript level and return to the horizontal position where the subscript started. If true, remain at the horizontal position where the superscript ended.
booleanendAll
If false or omitted, one superscript level is ended. If true, all subscript and superscript levels are ended. If true, the parameter keepHorizontal is ignored.
Returns
void. This method does not return a value.
superscriptStart method
PI: sub
Increase the superscript level by one.
superscriptStart
Parameters
None
Returns
void. This method does not return a value.
tableCellStart method
PI: tbcstrt
Will start a new cell within the table, breaking the current line if necessary. This command is ignored if you are following either
The start of the table.
A tableRowStart
A paragraph break to start of a row or cell.
A column break or page break.
It is designed to be used at the start of every cell, and if consecutive tableCellStart's occur then will break multiple cells.
When using boxheads, you can now specify optional column numbers for the start and end column for the cell. This enables columns to be specified in a non-sequential order and also contain more than one cell which gives rise to the stacking.
tableCellStartcellstartColumnendColumnfillCells
Parameters
fTableCellcell
Specifies properties of the new cell.
StringstartColumn
The first column used by the cell. The parameters startColumn and endColumn can either both be integers specifying the desired columns by index or strings giving the column's names (see fTableColumn::name .
StringendColumn
The last column used by the cell. The parameters startColumn and endColumn can either both be integers specifying the desired columns by index or strings giving the column's names (see fTableColumn::name .
intfillCells
If the start column is not the next column, should the intervening cells be filled with an empty cell.
Returns
void. This method does not return a value.
tableColumnFooter method
PI: tbfootc
Only works when currentTable.overflow = 3 and the table is working in slim/flow mode. Used to indicate the beginning and end of the table column footers, which cause text to be repeated at the bottom of each individual column/cell when they overflow.
Unlike tableRowFooter(), these footers are not a table row, or even a table cell, they appear within a cell and are line based. The footer line(s) will potentially be reinserted whenever the table overflows a cell, but N.B. this will NOT cause the commands at the very start of the footer to be re-processed; just the text. When the column overflows after inserting a footer, it does so after having processed the pre-amble for the next paragraph, and remembers the properties for the paragraph. This means that any showstrings and getvars will have been processed at the end of the previous column and the results will be remembered instead of being reprocessed at the top of the new column.
You can change footers mid-way through the table. When used in conjunction with levels, you will override the specified level and all subsequent levels will be cleared.
tableColumnFooternumlevelflags
Parameters
intnum
If num is non-zero then this marks the start of the footer, and when zero it indicates that the footer will stop at the end of the current paragraph. (Footers must be a complete number of paragraphs). If num is 2, then it marks the start of the footer in the normal way, but the footer para(s) will be skipped when first encountered in the text.
intlevel
You can have multiple levels of column footers, by using several calls to tableColumnFooter and specifying a level for each, from 1 to 5. This lets you have up to 5 footers running concurrently. When the table overflows a cell, all of the relevant column footers will be inserted in order, from 1 to 5.
Stringflags
The flags consist of a series of letters that let you control when the column footer is included. They come in two halves as follows:
f,l,m
You can specify which columns include the footer by using flags and distinguishing between first column, last column and middle columns by including a combination of the letters f, l and m. If you don't specify f, l or m, 3B2 will default to including the footer on all columns.
o,h,c,r,t
You can also specify whether to include the footer by using flags to distinguish between the different reasons for the cell ending. Again, if you don't specify any of o, h, c, r or t, 3B2 will default to including the footer whatever the reason for the cell ending. The individual flags work as follows:
o
Footer will appear if the cell overflowed.
h
Footer will appear if a hard column or page break is used.
c
Footer will appear if cell break used.
r
Footer will appear if row break used.
t
Footer will appear at end of table.
Returns
void. This method has no return value.
tableColumnHeader method
PI: tbheadc
Only works when currentTable.overflow = 3 and the table is working in slim/flow mode. Used to indicate the beginning and end of the table column headers, which cause text to be repeated at the top of each individual column/cell.
Unlike tableRowHeader(), these headers are not a table row, or even a table cell, they appear within a cell and are line based. The header line(s) will potentially be re-inserted whenever the table starts a cell, but N.B. this will NOT cause the commands at the very start of the header to be re-processed; just the text.
You can change headers mid-way through the table. When used in conjunction with levels, you will override the specified level and all subsequent levels will be cleared. Thus you could have a main header on level 1, and sub-headers on level 2 that change for each section of the table. If a change of header occurs, whilst inserting existing headers, then the new header(s) will be used and the old ones ignored.
tableColumnHeadernumlevelflags
Parameters
intnum
If num is non-zero then this marks the start of the header, and when zero it indicates that the header will stop at the end of the current paragraph. (Headers must be a complete number of paragraphs). If num is 2, then it marks the start of the header in the normal way, but the header para(s) will be skipped when first encountered in the text.
intlevel
You can have multiple levels of column headers, by using several calls to tableColumnHeader and specifying a level for each, from 1 to 5. This lets you have up to 5 headers running concurrently. When the table starts a new cell, all of the relevant column headers will be inserted in order, from 1 to 5.
Stringflags
You can specify which columns include the header by using flags and distinguishing between first column, last column and middle columns by including a combination of the letters f, l and m.
Returns
void. This method has no return value.
tableEnd method
PI: tbend
End the current table
tableEndtopbreakname
Parameters
inttopbreak
If topbreak is set to 1 and the tableEnd call occurs at the start of a line, then it no longer behaves line a carriage return and doesn't create a newline, whilst still ending the table.
Stringname
If a name is provided here, it will be checked against the 'name' property of the table. If the names mismatch the table will still be ended but a warning message will be generated. These messages can be viewed by using the tformat? command and turning on the relevant messages.
Returns
void. This method does not return a value.
tableRowCaption method
PI: tbcaptr
Used to signify the table caption row(s), in a similar fashion to tableRowHeader. A top caption is inserted at the start of the table, outside of the table rules, and a bottom caption is specified after the table. When a table is too wide and breaks into more than 1 set of columns (see <?tbwmode=1,2or3>) the mid captions is used. When the caption row(s) are encountered in the main body of the table, they are automatically skipped and so only occur outside of the table.
tableRowCaptionnum
Parameters
intnum
tableRowCaption(1) specifies the start of a top caption, tableRowCaption(2) specifies the start of a bottom caption, tableRowCaption(4) specifies the start of a mid-colset caption and tableRowCaption(0) specifies the end of the caption row(s).
Returns
void. This method does not return a value.
tableRowFooter method
PI: tbfootr
Used to indicate the beginning and end of any table footers.
tableRowFooternum
Parameters
intnum
If num is non-zero then this marks the start of the footer, and when zero it indicates that the footer will stop at the end of the current row. (Footers must be complete rows). The footer row(s) will be inserted whenever the table breaks a column/page. If num is 2, then it marks the start of the footer in the normal way, but the footer row(s) will only be inserted when the table breaks, and will be skipped when encountered otherwise.
Returns
void. This method does not return a value.
tableRowHeader method
PI: tbheadr
Used to indicate the beginning and end of the table headers.
You can change headers mid-way through the table. As well as redefining headers mid-way through the table, you can also remove existing headers, without defining new ones. To do this use num=-1, and then either specify a level as normal or specify level=-1 to clear all levels.
tableRowHeadernumlevel
Parameters
intnum
If num is non-zero then this marks the start of the header, and when zero it indicates that the header will stop at the end of the current row. (Headers must be complete rows). The header row(s) will be re-inserted whenever the table starts a new column/page. If num is 2, then it marks the start of the header in the normal way, but the header row(s) will only be inserted when the table restarts, and will be skipped when encountered otherwise.
intlevel
You can have multiple levels of headers, by using several calls to this method and specifying a level for each, from 1 to 5. This lets you have up to 5 headers running concurrently. When the table starts a new column/page, all of the headers will be inserted in order, from 1 to 5.
In addition, you can change headers mid-way through the table. When used in conjunction with levels, you will only override the specified level. Thus you could have a main header on level 1, and sub-headers on level 2 that change for each section of the table. If a change of header occurs, whilst inserting headers, then the new header will be used.
Returns
void. This method has no return value.
tableRowStart method
PI: tbrstrt
Will start a new row within the table, breaking the current line if necessary. The only time that this command is ignored, is right at the very start of a table, or just after a column break or page break, so you can happily include a tableRowStart at the beginning of every row.
tableRowStartrow
Parameters
fTableRowrow
This row object specifies settings for the new row and defaults of its cells.
Returns
void. This method does not return a value.
tableStart method
PI: tbstrt
Signifies the start of a new table.
tableStarttablepreamblename
Parameters
fTabletable
The given table object allows you to set up parameters for the table, the columns and the default cell properties.
Stringpreamble
This optional parameter allows inserting a string of processing instructions literally into the preamble of the new table.
Stringname
This optional parameter allows giving a name to a table. See table 'name' property for more details. This method of giving a name to a table will override the 'name' property, if given previously.
Returns
void. This method does not return a value.
texEnd method
Terminates the current TeX formula.
texEnd
Parameters
None
Returns
void. This method does not return a value
texStart method
This method starts a new TeX formula. Depending on the first parameter, the formula is formatted inline or as its own block. An fTeX object may optionally be specified to set the TeX properties.
texStartblocktex
Parameters
booleanblock
If false, the new TeX formula is formatted within the current paragraph. If true, it is formatted as its own block.
fTeXtex
If specified, this objects sets the properties for the new TeX formula.
Returns
void. This method does not return a value
write method
Insert text at the current formatting position. The text is output as-is and no further processing is performed on its contents.
writestring
Parameters
Stringstring
The string to be inserted at the current formatting position.
Returns
String. The string that was inserted.