12

Using this preamble:

\documentclass[pdftex,11pt,a4paper,openany]{memoir}
\usepackage[brazil]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{indentfirst}
\usepackage{latexsym}
\usepackage{amsmath,amssymb,amsfonts,wasysym}
\usepackage[pdftex]{graphicx}
\usepackage{wrapfig}
\usepackage[left=3cm,right=2cm,top=3cm,bottom=3cm]{geometry}
\usepackage{color}
\usepackage[dvipsnames]{xcolor}
\definecolor{darkgray}{gray}{0.3}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage[pdftex, colorlinks=true, linkcolor=darkgray, citecolor=blue, urlcolor=blue]{hyperref}

TexMaker gives this error message:

! LaTeX Error: Command \newfloat already defined.
Or name \end... illegal, see p.192 of the manual.

Where is the problem?

doncherry
  • 54,637

2 Answers2

12

Just for the record, I had the same problem, using memoir and floatrow together. Removing pdflatex from the preamble did not solve it.

I compiled the document successfully by adding the following line before loading floatrow:

\let\newfloat\undefined
\usepackage{floatrow}

Thanks to Joseph Wright.

iled
  • 410
11

There's no error with the preamble you provided. If you are trying to load the package float afterwards, don't: memoir has its built-in mechanism for defining new floating environments.

See p. 169 in the documentation.

Leone
  • 576
egreg
  • 1,121,712