How to Put OrCAD/PSpice Schematics in LaTeX
At a glance
- 1. Export the schematic
Print or export the OrCAD Capture drawing to PDF, choosing a suitable page size and vector output when available.
- 2. Check the result
Open the PDF and inspect line quality, text, symbols, and whitespace before including it.
- 3. Include it in LaTeX
Use graphicx and includegraphics to scale or crop the PDF in your document.
- 4. Redraw if needed
Use CircuitikZ when you need editable LaTeX labels or a consistently typeset circuit diagram.
You generally do not import an OrCAD/PSpice schematic file directly into LaTeX. Instead, export the drawing to a graphics format and include it, or recreate the circuit with LaTeX drawing commands. For most reports, a PDF export is the quickest and most reliable route.
Option 1: Export or print to PDF
Open the schematic in OrCAD Capture and use its export or print workflow to create a PDF. The exact menu names and available formats vary by OrCAD version and setup. If you print to a PDF printer, choose a page size that fits the drawing and check the print preview so the schematic is not clipped or surrounded by excessive blank space.
PDF is usually preferable to a screenshot or a low-resolution image: lines and text can remain vector artwork, so they stay crisp when scaled. Whether the PDF is truly vector depends on the export or print path, so inspect the file at high zoom. If PDF is unavailable, export a vector format that your LaTeX workflow can use, or convert the resulting image to PDF. Avoid enlarging a small raster image; it will look blurry.
Include the PDF in LaTeX
Save the exported file beside your .tex file, for example as pspice-schematic.pdf. The graphicx package provides \includegraphics:
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htbp]
\centering
\includegraphics[width=0.9\linewidth]{pspice-schematic.pdf}
\caption{Schematic created in OrCAD Capture.}
\label{fig:pspice-schematic}
\end{figure}
\end{document}
Compile with a PDF-producing engine such as pdfLaTeX, LuaLaTeX, or XeLaTeX. The width=0.9\linewidth option scales the graphic to 90% of the available line width while preserving its proportions. Use width=\linewidth to fill the line width, or set a height instead if that better suits the page. Avoid setting both width and height unless you also use keepaspectratio, or the drawing may be distorted.
If the PDF contains too much whitespace, crop it in LaTeX with trim and clip:
\includegraphics[width=\linewidth,trim=12mm 18mm 12mm 18mm,clip]{pspice-schematic.pdf}
The four trim values are ordered left, bottom, right, top. Adjust them based on the exported page. The clip option makes LaTeX hide the trimmed edges; without it, the full graphic may still show. You can also crop or set the page size when exporting from OrCAD, which may be easier to maintain.
When to redraw it in CircuitikZ
Including a PDF is best when you want to preserve the existing OrCAD layout. It does not make the individual components and wires editable as LaTeX objects, though. If you need to change the diagram in your source, match LaTeX fonts and styles, or create a small circuit that integrates tightly with the surrounding text, redraw it using the circuitikz package.
A PSpice schematic is not automatically converted into a CircuitikZ drawing by \includegraphics. The schematic file and a SPICE netlist describe different things: a netlist lists electrical connections and component values, but it does not necessarily contain the visual placement and routing needed to reproduce the drawing. A redraw therefore requires recreating both the connections and the layout. For a large or carefully arranged schematic, including the PDF is often much less work.
Worked example: fit a full-page export
Suppose the PDF export is a US Letter page, but the schematic itself occupies only the central area. First, check the PDF page in a viewer. If the circuit fits after cropping 8 mm from the left and right and 15 mm from the top and bottom, try:
\includegraphics[width=\linewidth,trim=8mm 15mm 8mm 15mm,clip]{pspice-schematic.pdf}
Here the values mean 8 mm from the left, 15 mm from the bottom, 8 mm from the right, and 15 mm from the top. The cropped graphic is then scaled to the document’s line width. Adjust the crop if labels or component symbols are cut off; the numbers are measurements of the exported page, not universal settings.
Common mistakes
- Using a screenshot: A screenshot is raster artwork and can become visibly pixelated in print. Export to PDF or another vector format when possible.
- Cropping in the wrong order:
trimuses left, bottom, right, top—not left, right, top, bottom. - Forgetting
clip: Addclipwhen you want LaTeX to hide the portions outside the crop rectangle. - Stretching the circuit: Set only a width or height, or use
keepaspectratiowhen setting both. - Expecting a netlist to reproduce the drawing: A netlist captures connectivity, not the full schematic layout or appearance.
- Assuming every PDF export is vector: Zoom in on the exported PDF to check whether lines and text remain sharp.
If the schematic spans several PDF pages, select the required page with the page option, for example \includegraphics[page=2,width=\linewidth]{schematic.pdf}. Check the documentation for your LaTeX engine if you use a graphics format other than PDF.
References
- LaTeX Graphics Companion, 3rd edition, Michel Goossens, Frank Mittelbach, Sebastian Rahtz, Denis Roegel, and Herbert Voss
- The circuitikz package documentation
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.