triroff, An Adaptation of the UNIX ditroff for Formatting Tri-Directional Text

Daniel M. Berry

Cheriton School of Computer Science
University of Waterloo
Waterloo, ON, Canada

Abstract:

This talk describes a system for formatting documents consisting of text written in languages printed in three different directions, left-to-right, right-to-left, and top-to-bottom, For example the paper on which this talk is based is such a document because in contains text written in English, Hebrew, Japanese, and Chinese. The system assumes that the input is in the order in which the text is read aloud, and it produces output in which each language is printed in its own correct direction, but for which a human cognizant of the reading conventions will reproduce the input order. The system consists of three major pieces of software. Ossana and Kernighan's (unchanged) ditroff, for formatting text consisting of only left-to-right or unidirectional text, Buchman and Berry's ffortid for arranging that right-to-left text buried in ditroff output is printed from right to left, and a new program bditroff, for arranging that top-to-bottom text buried in ditroff output is printed from top to bottom.