A structure specification scheme is described which can be used to specify the structures of certain two-dimensional patterns. Algorithms are developed to test whether a pattern has a (strongly) well-formed structure with respect to a given structure specification scheme. This method is applicable to the analysis of two-dimensional mathematical expressions and the format of printed material. The usefulness of this method is limited to the analysis of patterns whose structures are based upon a number of operators. When it is applicable, a strongly well-formed structure can be constructed in time n2, where n is the number of primitive components of the pattern. © 1970 American Elsevier Publishing Company, Inc. All rights reserved.