![]() |
|
|
+ Search |
![]()
|
Apr 13th, 2005 03:00
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 13 April 2005 - 05:12 pm ----------------------
Tex: Latex: Figure: Add: How to: How to add a figure to LaTeX?
To insert a figure
---
Steps: Overview:
1. -Include the graphics package
\usepackage[dvips]{graphicx}
and put this in the header part.
2. -Make sure the files you want
to insert as figures are in
(or converted to) the PostScript (.ps) or
Encapsulated PostScript (.eps) format
3. -Then use in your document, in the position where you want your
figure to appear
--- cut here: begin --------------------------------------------------
\begin{figure}
\caption{<your caption>}
\includegraphics{<your filename>}
\label{<your label>}
\end{figure}
--- cut here: end ----------------------------------------------------
---
---
e.g.
--- cut here: begin --------------------------------------------------
\begin{figure}
\caption{mycaptiontest}
\includegraphics{ddd.eps}
\label{mylabeltest}
\end{figure}
--- cut here: end ----------------------------------------------------
---
This will show:
--- cut here: begin --------------------------------------------------
Figure 1: mycaptiontest
+-----------+
| |
| |
| your |
| image |
| |
| |
| |
| |
+-----------+
--- cut here: end ----------------------------------------------------
---
e.g. to center the figure
--- cut here: begin --------------------------------------------------
\begin{figure}
\caption{mycaptiontest}
\centerline{
\includegraphics{ddd.eps}
}
\label{mylabeltest}
\end{figure}
--- cut here: end ----------------------------------------------------
---
This will show:
--- cut here: begin --------------------------------------------------
Figure 1: mycaptiontest
+-----------+
| |
| |
| your |
| image |
| |
| |
| |
| |
+-----------+
--- cut here: end ----------------------------------------------------
---
e.g. more figures: 2 figures
--- cut here: begin --------------------------------------------------
\begin{figure}
\caption{mycaptiontest}
\centerline{
\includegraphics{ddd.eps}
}
\label{mylabeltest}
\end{figure}
\begin{figure}
\caption{mycaptiontest}
\centerline{
\includegraphics{ddd.eps}
}
\label{mylabeltest}
\end{figure}
--- cut here: end ----------------------------------------------------
---
This will show:
--- cut here: begin --------------------------------------------------
Figure 1: mycaptiontest
+-----------+
| |
| |
| your |
| image |
| |
| |
| |
| |
+-----------+
Figure 2: mycaptiontest
+-----------+
| |
| |
| your |
| image |
| |
| |
| |
| |
+-----------+
--- cut here: end ----------------------------------------------------
---
e.g. more figures: 3 figures
--- cut here: begin --------------------------------------------------
\begin{figure}
\caption{mycaptiontest}
\centerline{
\includegraphics{ddd.eps}
}
\label{mylabeltest}
\end{figure}
\begin{figure}
\caption{mycaptiontest}
\centerline{
\includegraphics{ddd.eps}
}
\label{mylabeltest}
\end{figure}
\begin{figure}
\caption{mycaptiontest}
\centerline{
\includegraphics{ddd.eps}
}
\label{mylabeltest}
\end{figure}
--- cut here: end ----------------------------------------------------
---
This will show:
--- cut here: begin --------------------------------------------------
Figure 1: mycaptiontest
+-----------+
| |
| |
| your |
| image |
| |
| |
| |
| |
+-----------+
Figure 2: mycaptiontest
+-----------+
| |
| |
| your |
| image |
| |
| |
| |
| |
+-----------+
Figure 3: mycaptiontest
+-----------+
| |
| |
| your |
| image |
| |
| |
| |
| |
+-----------+
--- cut here: end ----------------------------------------------------
---
e.g.
to fit your image to the width of your page
--- cut here: begin --------------------------------------------------
\begin{figure}
\caption{mycaptiontest}
\includegraphics[width=\textwidth]{ddd.eps}
\label{mylabeltest}
\end{figure}
--- cut here: end ----------------------------------------------------
---
--- cut here: begin --------------------------------------------------
Figure 1: mycaptiontest
+------------------------------------------------------------------+
| |
| |
| |
| |
| |
| your image |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+------------------------------------------------------------------+
--- cut here: end ----------------------------------------------------
---
---
Internet: see also:
---
----------------------------------------------------------------------