Given an ordinary category $C$, a pasting diagram in $C$ is a sequence of composable morphisms in $C$
We think of these arrows as not yet composed, but pasted together at their objects, such as to form a composable sequence, and then say the value of the sequence is the composite morphism in $C$. Or, we could say that a pasting diagram is a specified decomposition of whatever morphism $f$ it evaluates to, thus breaking down $f$ into morphisms $f_i$ which, in practice, are usually “more basic” than $f$ relative to some type of structure on $C$. For example, if $C$ is a monoidal category, the $f_i$ might be instances of associativity isomorphisms.
Pasting decompositions become more elaborate in higher categories. An example of a pasting diagram in a (let’s say strict) 2-category is a pasting of two squares
To evaluate this diagram as a single 2-morphism, we read this diagram explicitly as the vertical composite of the 2-morphism
with the 2-morphism
(Notice that the two halves of the boundary of each of these two 2-morphisms are themselves 1-dimensional pasting diagrams.) Similarly, there can be situations where one pastes together other shapes (triangles, pentagons, etc.), and there may be multiple paths on the way to resolving the diagram into a single 2-morphism, but the idea is that all such paths evaluate to the same 2-morphism, at least in a strict 2-category. General theorems which refer to the uniqueness of pastings are called pasting theorems.
On the other hand, the following diagram is not a pasting diagram:
Thus, formal definitions of pasting diagram include conditions which impose a consistent “directionality” of the cells so they can be pasted together.
In an n-category a pasting diagram is similarly a collection of n-morphisms with a prescribed way how they are to fit together at their boundaries. There are a number of ways of formalizing pasting diagrams, depending partly on the constituent shapes one allows, and also on the technical hypotheses that allow proofs of pasting theorems, which include directionality conditions but usually also “loop-freeness” conditions to ensure there exists a unique way to resolve or evaluate the diagram. (N.B.: usually a completely unambiguous evaluation is only possible in a strict $n$-category; in a weak $n$-category, one allows uniqueness up to a “contractible space of choices”.)
Despite some technical differences among the formalizations, the core idea throughout is that the overall geometric shapes of pasting diagrams should be (contractible) $n$-dimensional polyhedra, broken down into smaller polyhedral cells which come equipped with directionality or orientations, that can be sensibly pasted together as in the above descriptions once the cells have been assigned values in an $n$-category.
Various formalisms for pasting diagrams have been proposed. They include
pasting schemes (Johnson)
parity complexes (Street)
directed complexes? (Steiner)
Each of these formalisms involve graded sets $\{C_n\}_{n \geq 0}$ together with maps $\partial^+_n: C_{n+1} \to P(C_n)$, $\partial^-_n: C_{n+1} \to P(C_n)$. This goes under various names; here we call it a parity structure. It should be thought of as assigning to each “cell” of dimension $n+1$ a collection of positive boundary cells and negative boundary cells in dimension $n$. The formalisms above are distinguished by the choice of axioms on parity structures, but there is definite kinship among them.
Also related are various notions of categories of shapes, including
The notion of pasting in a 2-category was introduced in
A reasonably self-contained, formal, and illustrated seven-page introduction to pasting diagrams in the context of weak 2-categories, and their relation to string diagrams is given by Chris Schommer-Pries in Section A.4 of “The Classification of Two-Dimensional Extended Topological Field Theories”, arXiv:1112.1000v2.
A survey discussion of pasting in 2-categories is in
from definition 2.10 on. Details are in
Dominic Verity gave a bicategorical pasting theorem in
A definition and discussion of pasting diagrams in strict omega-categories is in
Sjoerd Crans, Pasting presentation for Omega-categories (web)
Sjoerd Crans, Pasting schemes for the monoidal biclosed structure on $\omega$-$\mathbf{Cat}$ (web, ps, pdf)
The notion of pasting scheme used by Crans was introduced by Johnson,
Other notions of pasting presentations have been given by Street and by Steiner,
Street, Parity complexes, Cahiers Top. Géom Diff. Catégoriques 32 (1991), 315-343. (link) Corrigenda, Cahiers Top. Géom Diff. Catégoriques 35 (1994), 359-361. (link)
Richard Steiner, The algebra of directed complexes, Appl. Cat. Struct. 1 (1993), 247-284.
For an online link to the notion of directed complex, see
There is also
For a cubical approach to multiple compositions and other references see the paper