**Describe the solution you'd like** Add a mode that outputs a LaTeX (or a PDF) diagram for the intermediate representation.