0

I am using \newfloat to redefine numbers of Figures, as explained here. I used the following code:

\documentclass[12pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
 \usepackage{newfloat}
\DeclareCaptionType[fileext=ext]{Grafico}
\begin{document}

And worked. But I would like that the captions of the new floats to be called as Gráfico 1 - When I try: \DeclareCaptionType[fileext=ext]{Gráfico} I got an error.
How can I do it?

0

I think you're misunderstanding how newfloat works.

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{newfloat}

\DeclareFloatingEnvironment[
  fileext=grf,
  listname={Lista de gráficos},
  name=Gráfico,
]{grafico}

\begin{document}

\listofgrafico

\begin{grafico}[htp]
\centering

\includegraphics[width=2cm]{example-image}

\caption{Ejemplo de gráfico}

\end{grafico}

\end{document}

enter image description here

I used utf8 because my system is set up for it. You should switch, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.