This paper describes a way of displaying a structured text, such as a computer program, on a video screen. The authors state the problem well: given a structured document and a screen of finite size, find a representation of the document that will fit on the screen and, at the same time, give the user a clear view of the document’s structure. Usually what is wanted is not the whole document but rather some part of it called the focus. To solve the problem, you need a strategy both for indentation and for deciding when a chunk of text should be replaced by a brief description of that text. Ordinarily that brief description is just the syntactic category of the text.
The display program is aware of, and uses, the structure of the text (more precisely, its abstract syntax). This approach was pioneered by Teitelbaum and Reps [1], and applied specifically to the display problem by Mikelsons [2]; both of these references are cited in the paper. Each node of the syntax tree is associated with a rectangular window of text. The paper develops a calculus of windows and then presents a display algorithm based on that calculus.
This paper should be useful to anyone writing or studying structured editors. It is clearly written and its approach has been used in practice (for a language called Cèpage). However, it does not solve the problem completely; a notable omission is how comments are handled--a difficult problem since comments are not generally part of the abstract syntax of a programming language.