(also nonabelian homological algebra)
Let $C$ be a differential graded category.
A twisted complex $E$ in $C$ is
a graded set $\{E_i\}_{i \in \mathbb{Z}}$ of objects of $C$, such that only finitely many $E_i$ are not the zero object;
a set of morphisms $\{q_{i j} : E_i \to E_j \}_{i,j \in \mathbb{Z}}$ such that
$deg(q_{i j}) = i-j+1$;
$\forall i,j : \; d q_{i j} + \sum_{k} q_{k j}\circ q_{i k} = 0$.
The differential graded category $PreTr(C)$ of twisted complexes in $C$ has as objects twisted complexes and
with differential given on $f \in C(E_i, E'_j)^l$ given by
The construction of categories of twisted complexes is functorial in that for $F : C \to C'$ a dg-functor, there is a dg-functor
etc.
Passing from a dg-category to its category of twisted complexes is a step towards enhancing it to a pretriangulated dg-category.