• Including Visio diagrams in LyX documents

    by  • March 3, 2010 • lyx, TeX, visio • 1 Comment

    If you want to be able to include Visio drawings within your LyX documents, the process is relatively painless as you can export the drawing as a PDF and embed the PDF directly into the document.

    First, create your diagram in Visio as normal. Then, click File > Page Setup, select the Page Size tab and click the radio button entitled ‘Size to fit drawing contents’:


    The bounding box will shrink to fit your drawing, which makes for easier positioning within LyX as you won’t have any whitespace issues arising from borders from your drawing.

    If you are using Visio 2007, and have the Save as PDF or XPS plugin installed, you may go directly to File > Publish as PDF or XPS and save the diagram as a PDF. If you are using Visio 2003, or 2007 but do not have the plugin, then you can install a PDF printer, such as CutePDF (just go for whatever you’re most comfortable with) and File > Print directly to the PDF printer.

    Within LyX, the process of embedding this PDF into your document is really easy. Click Insert > Graphics, browse for the PDF file and optionally set the scale or width and height to suit. LyX will render a preview of the image within the document and when you compile it to a DVI/PDF, you should see the Visio drawing output inline with the text.


    .NET developer at thetrainline.com, previously web developer at MRM Meteorite. Awarded a PhD in misbehaviour detection in wireless ad-hoc networks. A keen C# ASP.net developer bridging the gap with APIs and JavaScript frameworks, one web app at a time.


    One Response to Including Visio diagrams in LyX documents

    1. Marcus Watchorn
      November 2, 2010 at 8:28 pm

      I just saw example that shows how to script diagram generation using VBA and Visio 2007 http://www.isrcomputing.com/knowledge-base/40-code-example/178-how-to-draw-network-diagrams-using-visio-2007-and-vba

    Leave a Reply

    Your email address will not be published. Required fields are marked *