Compose

Command line:
tlapi ‑cCOMPOSE [‑snShow] sPart
Command line:
tlapi ‑cTYPESET [‑snShow] sPart
Library call:
nComposeStatus = TLtypeset (sPart, nShow)
Library call:
nComposeStatus = TLcompose (sPart, (char *) NULL, nShow, 0L, pnStatus)
Scripting call:
nStatus = Compose (bShow)

Function

Run the composition engine on the current partition to create rendered output pages.

Arguments

sPart

The path of the partition to be composed. The scripting call uses the Partition property to determine the partition to use.

nShow

The Windows showmode for the typesetting progress display. By default, the typesetting dialog will be displayed.

The only useful values are SW_NORMAL (1) and SW_MINIMIZE (6). The latter causes the progress window to run minimised. There is no way to prevent the creation of a window.

[Note] Note

If a serious error occurs when typesetting a document, Windows may display an error mode dialog. If the API is called from a service or a batch script, this may cause the calling application to hang. If you do not want Windows to display an error mode dialog, add 256 to the value of the Windows showmode.

This parameter is ignored on Unix.

bShow

This applies to the scripting interface only. If this is true a progress indication window is shown.

pnStatus

This is the status of the operation (0 for success, or one of the values listed in Status Codes). The TLcompose function returns this through a pointer to a long integer.

nComposeStatus

The value returned by the library functions is one of the following:

0:   Typesetting was successful.
1:   Typesetting completed with one or more warnings. A warning indicates that a requested formatting operation could not be completed as specified, but that the associated data is included in the output. For example, a word that has been split because it is too large to fit in a table cell generates a warning.
2:   Typesetting completed with one or more errors (and possibly warnings). An error indicates data that is missing or corrupted in the output, for example a graphics file that could not be found.
3:   Typesetting did not complete. A condition was encountered that caused the typesetting to stop.
4:   Fatal error. Please report any such failures to Turn-Key support.

To retrieve the standard status value, use the TLcompose function and use the value returned by pnStatus.

For additional command line arguments see “Common Flag Arguments”.

Scripting Call Return

The return value is zero if composition was successful, or one of the values listed in Status Codes if not.

The ComposeStatus property indicates whether page images are available after this method has completed.

Examples

Command line:

tlapi ‑cCOMPOSE manuals/topix/volume1

Library call:

/* Run typesetting with progress window minimised */
status = TLtypeset("manuals/topix/volume1", 6);

Scripting call:

status = topleaf.Compose(false);