Smooth formal embeddings and the residue complex Let $\pi\colon X \ar S$ be a finite type morphism of noetherian schemes. A {\it smooth formal embedding\/} of $X$ (over $S$) is a bijective closed immersion $X \subset \mfrak{X}$, where $\mfrak{X}$ is a noetherian formal scheme, formally smooth over $S$. An example of such an embedding is the formal completion $\mfrak{X} = Y_{/ X}$ where $X \subset Y$ is an algebraic embedding. Smooth formal embeddings can be used to calculate algebraic De~Rham (co)homology. Our main application is an explicit construction of the Grothendieck residue complex when $S$ is a regular scheme. By definition the residue complex is the Cousin complex of $\pi^{!} \mcal{O}_{S}$, as in \cite{RD}. We start with I-C.~Huang's theory of pseudofunctors on modules with $0$-dimensional support, which provides a graded sheaf $\bigoplus_{q} \mcal{K}^{q}_{\,X / S}$. We then use smooth formal embeddings to obtain the coboundary operator $\delta \colon\mcal{K}^{q}_{X / S} \ar \mcal{K}^{q + 1}_{\,X / S}$. We exhibit a canonical isomorphism between the complex $(\mcal{K}^{\bdot}_{\,X / S}, \delta)$ and the residue complex of \cite{RD}. When $\pi$ is equidimensional of dimension $n$ and generically smooth we show that $\mrm{H}^{-n} \mcal{K}^{\bdot}_{\,X/S}$ is canonically isomorphic to to the sheaf of regular differentials of Kunz-Waldi \cite{KW}. Another issue we discuss is Grothendieck Duality on a noetherian formal scheme $\mfrak{X}$. Our results on duality are used in the construction of $\mcal{K}^{\bdot}_{\,X / S}$. Categories:14B20, 14F10, 14B15, 14F20