  Doubly periodic tangles, or \textit{DP tangles}, are embeddings of curves in
the thickened plane that are periodically repeated in two directions. They are
completely defined by their generating cells, the {\it flat motifs}, which can
be chosen in infinitely many ways. DP tangles are used in modelling materials
and physical systems of entangled filaments. In this paper we establish the
mathematical framework of the topological theory of DP tangles. We first
introduce a formal definition of DP tangles as topological objects and proceed
with an exhaustive analysis in order to characterize the notion of {\it
equivalence} between DP tangles and between their flat motifs. We further
generalize our results to other diagrammatic categories, such as framed,
virtual, singular, pseudo and bonded DP tangles, which could be used in novel
applications.
