Tag Archives: latex

Visio figures in LaTeX

This is one way to use figures made in Microsoft Visio in your latex (pdfLatex) document.

The first step is to get the figure as a PDF file. If you are using Visio 2007 you may use the PDF add-in from Microsoft. Another option is using Adobe Acrobat or the free PDFCreator.

When printing, select the figure and in the print dialog select the option to only print the current selection.

The problem is that the figures will use a whole page even if they’re small. You may either crop it (using a tool like pdfcrop) or specify a viewport when including the figure in the document.

To find out the viewport variables, convert the PDF to PostScript using pdf2ps. Now check the beginning of the file for a line like this:

%%BoundingBox: 56 368 446 551

This is the viewport variables to use when including the figure in the latex document:

\includegraphics[viewport = 56 368 446 551]{figure.pdf}

Or include it in a figure with caption that may be referenced:

		\includegraphics[viewport = 56 368 446 551]{figure.pdf}
	\caption{Figure caption here}

It may be referenced to in the text using e.g. Please see figure ~\ref{figure} for details. The tilde is used as a non-breaking space to avoid unfortunate linebreaks.

See this page for more details working with figures in Latex.