How to insert an EPS format picture in latex
First step: Generate a picture of the. eps format
1. Save a picture in PDF format using Visio Paint
Use Adobe Acrobat trimming to make the picture fit
Save As. eps format as shown in:
Note: This step must be saved as shown in the diagram, you cannot directly forcibly change the suffix name, otherwise it cannot be displayed after inserting.
2, using Matlab drawing, directly saved as EPS format can be
Step Two: Insert code
1. Add a macro Package
\USEPACKAGE{GRAPHICX}
\usepackage{epstopdf}
2. Place the. eps picture and the. tex file under one path, using the following code:
[Plain]View PlainCopy
- \begin{figure}
- \centering
- \includegraphics[height=2cm,width=3cm]{exp.eps}
- \caption{yes}
- \label{1}
- \end{figure}
A simple and complete sample code is as follows:
[Plain]View PlainCopy
- \documentclass[12pt]{article}
- \USEPACKAGE{GRAPHICX}%use Graph format
- \usepackage{epstopdf}
- \begin{document}
- \begin{figure}
- \centering
- \includegraphics[height=2cm,width=3cm]{exp.eps}
- \caption{yes}
- \label{1}
- \end{figure}
- \end{document}
Put your own saved. EPS pictures and. tex files in the same directory, you can compile and run the view effect
How to insert an EPS format picture in latex