# LaTeX Font-consistent Diagrams Using Dia

Ensuring that manuscripts I produce using LaTeX have a consistent font throughout the document has been a long-held obsession of mine. The majority of documents I produce typically contain block diagrams which I almost always generate using third-party tools. One of the problems, however, with integrating LaTeX documents with input files (typically JPG, PNG, EPS et al.) from these external tools is that of ending up with a final output that has inconsistent fonts.

I have been experimenting with TikZ [1] and PSTricks [2], but with their steep learning curves, I was forced to look for quick fixes. While I religiously started using LaTeXDraw [3] in the not so distant past, I recently discovered that Dia [4] can export diagrams as LaTeX PGF macros. Here is how I integrate PGF Macros into LaTeX documents.

• Draw Dia diagram
• Export output as LaTeX PGF macro (.tex extension)
• Use ‘tikz’ package in LaTeX preamble

LaTeX Minimal Example


12345678910111213141516171819\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\title{\textbf{\LaTeXe font-consistent diagrams using Dia}}
\author{Munthu}
\date{}
\begin{document}
\maketitle
\section{A minimal example}
You will notice that the fonts used in Figure \ref{fig:latex_dia_integration} are consistent with the document.
\begin{figure}[hb]
\begin{center}
\framebox[0.90\textwidth]{%
\input{dia_latex_block_diagrams.tex}
}
\end{center}
\caption[]{\label{fig:latex_dia_integration} A sample font-consistent figure
}
\end{figure}
\end{document}



Final PDF Output

Reference