A method and system automatically produce a temporal layout for controlling the presentation of a multimedia document. A partial temporal layout, or schedule, is produced during a compiletime phase of the method from duration information about the media items included in the document, and from the temporal relationships between the media items, as specified by a document author. Several temporal relationships are supported, including "simultaneous with", for synchronization of two media items or events, and relationships such as "before by 10 seconds." The temporal formatter positions media data items having predictable behavior in time according to the specified temporal relationships and using the specified durations, and creates an auxiliary temporal layout with unresolved times for each media data item or event therein having unpredictable behavior. The temporal formatter automatically produces temporal layouts for documents that include media items for which internal events and continuously adjustable durations are specified, thereby providing for very flexible positioning of media items in time without the author's involvement. The author of the document may specify a flexibility metric at the media or event level related to the continuously adjustable durations that provides the temporal formatter with guidance as to how to best position temporally related media items in time. In an illustrated embodiment, the flexibility metric consists of duration-adjustment costs, and the temporal formatter uses linear programming to solve for solutions to equations formulating the temporal constraints between connected components in the document.