# How to make the pdf file that inserted stayed the position I give?

I'd like to typeset the Mathematica code.My solution is

Select it (by clicking on the right square bracket ]). Then, following the menu's File>Save Selection As... and saving as a PDF produces the PDF output:

So I achieve a pdf file. Then I insert in my Latex document.

My sample code:

\documentclass[b5paper,UTF8]{article}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{times}

\begin{document}
\subsection{Iteration Order}
Consider the following matrix :

\begin{figure}[h]
\fbox{\includegraphics[width=.7\textwidth]{IO1.pdf}}
\end{figure}

We can use a Table expression to create a copy of the matrix by iterating over all
of its elements:

\begin{figure}[h]
\fbox{\includegraphics[width=.7\textwidth]{IO2.pdf}}
\end{figure}

This identity operation is uninteresting, but we can transform the array by swapping
the order of the iteration variables. For example, we can swap i and j iterators.
This amounts to swapping the level 1 and level 2 indices and their corresponding
elements:

\end{document}

However, the file became as shown below:

Namely, the pdf file that inserted staying other position.

So my question is:

1. how to make the PDf file stayed the position that I give?
1. Is it possible to zip the size of the PDF file that I insert to the Latex document?
• If you don't want things to float, don't use a floating environment such as figure. – Peter Grill Oct 28 '14 at 4:42
• @PeterGrill,OK, I got it, I delete rhis enviroment :figure,it work normally:-) – xyz Oct 28 '14 at 4:56