# error float.sty line99

Well, here is my problem. My friends can compile this document. I can't, and I don't know why. The error is:

File: "C:\Program Files\MikTex\tex\latex\float\float.sty
Type: Error
Line: Line99
message: ! LaTeX Error: Command \float@makebox already defined.


If u can tell me how fix it, I'll be very grateful. I'm using TexMaker and MikTex 2.9.

% PREAMBLE
% Document
\documentclass[spanish,10pt,a4paper,twoside]{article}
\usepackage[top=1in, bottom=1in, left=1in, right=1in, marginpar=57pt]{geometry}
%   \usepackage{anysize}
%   \marginsize{3cm}{3cm}{1.5cm}{1.5cm} %izquierda derecha arriba abajo
% Language
\usepackage[latin1]{inputenx}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
% AMS Packages
\usepackage{amsmath}

%--------------------------------------------------------------
% Graphics Packages
%--------------------------------------------------------------
\usepackage{graphicx}
\usepackage{subcaption}
%Wrapfig: Insertar imagen dentro del texto,
\usepackage{wrapfig}

\usepackage{float}
%   \floatstyle{boxed}
%   \restylefloat{figure}

% SUBFIGURE Y SUBFIG ESTAN DESCATALOGADOS Y NO DEBEN USARSE
%\usepackage{subfigure}
%   \usepackage[lofdepth,lotdepth]{subfig}
%   \usepackage[section]{placeins}

\begin{document}

Hello , fans of Latex

\subsection{Images}

\subsubsection{Matrix of images}

\begin{figure}[H]
\framebox[1\textwidth]{\begin{minipage}[m]{1\textwidth}
\centering
\begin{subfigure}[b]{0.2\textwidth}
\includegraphics[width=\textwidth]{gatico.jpeg}%
\vspace{-1pt}\\%
\includegraphics[width=\textwidth]{gatico.jpeg}%
\vspace{-1pt}
\end{subfigure}%
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{gatico.jpeg}%
\vspace{-1pt}
\end{subfigure}\\%
\begin{subfigure}[b]{0.6\textwidth}
\includegraphics[width=0.3333\textwidth]{gatico.jpeg}%
\includegraphics[width=0.3333\textwidth]{gatico.jpeg}%
\includegraphics[width=0.3333\textwidth]{gatico.jpeg}%
\end{subfigure}
\end{minipage}}
\caption{Collage}
\end{figure}

\begin{figure}[H]
\framebox[1\textwidth]{\begin{minipage}[m]{1\textwidth}
\centering
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{gatico.jpeg}%
\caption{}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{gatico.jpeg}%
\caption{}
\end{subfigure}
\end{minipage}}
\caption{Matrix of images}
\end{figure}

\end{document}


I can compile this document https://www.writelatex.com, and this is the result http://dl.dropbox.com/u/29496113/gatico.pdf

-
You can indent you code by four spaces to get them formatted properly. or select the code and press {} found above. – Harish Kumar Jan 14 '13 at 23:59
Wow, thanks a lot #Harish Kumar – Daniteba Jan 15 '13 at 0:05
Thank you again, @Harish Kumar ^^ – Daniteba Jan 15 '13 at 0:09
Perhaps your MiKTeX is not up to date? Can you add \listfiles as first line in your MWE and check the given list of used packages in your log file? Which version of MiKTeX, package float do you (and your friends) use? – Kurt Jan 15 '13 at 0:24
If I comment out the includegraphics (as I don't have that file) and remove sone characters that appear to have been mis-encoded between latin-1 and utf-8 while posting, your file runs without error in texlive 2012 – David Carlisle Jan 15 '13 at 0:26

\usepackage{float}
\usepackage{hyperref}


i.e. hyperref after float so the hyperref package is able to patch the float package. See also: http://www.tex.ac.uk/cgi-bin/texfaq2html?label=hyperdupdest

When changing the load order the problem should go away, at least it does on my PC.

caption.sty v3.3-65 is out now (on CTAN and as TeXlive update) and has a revised handling of load order regarding the float and hyperref packages. All six load order combinations caption-float-hyperref should now compile find and give correct results, at least if you use at least v6.82q of hyperref.
YES!! Thanks a lot, @AxelSommerfeldt Wow, i've never figured out that's was the problem. Thank you again ^^ I also resolved the problem with float before subcaption, do you know why it also works?? – Daniteba Jan 15 '13 at 11:12
@Daniteba I usually implement and test the caption package bundle with correct package load orders (especially regarding hyperref as noted in its README). Since the caption package bundle currently supports 7 document class families, 3 babel options, and 17 packages I simply cannot test (and support) all wrong package orders as well. So it might happen that a specific version will drop an error message in such cases. However, I put that specific package load order on my TODO list so the very next version will give the expected (=wrong) result without error messages. – Axel Sommerfeldt Jan 18 '13 at 15:40
@Daniteba caption.sty v3.3-65 is out now (on CTAN and as TeXlive update) and has a revised handling of load order regarding the float and hyperref packages. All six combinations should now give correct results, at least if you use at least v6.82q of hyperref. (So when using these versions your example document should compile again and will now give a correct result additionally.) – Axel Sommerfeldt Feb 6 '13 at 7:54