Graphics, Figures & TablesAlter Figure Caption Prefix globally

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

Alter Figure Caption Prefix globally

Post by paulosousa »

Hello,

I tried to change the caption of the graphic but cannot do it
with the example the output is
Figura 1: ¿Qué actividades te gusta hacer en tus tiempos libres?
and I need:
Gráfico 1: ¿Qué actividades te gusta hacer en tus tiempos libres?
anyone could please help me?

Code: Select all

\documentclass[12pt, twoside, a4paper, spanish]{article}
\usepackage[portuguese]{babel}
\usepackage[applemac]{inputenc}
\usepackage[left=2.0cm,top=2.0cm,right=2.0cm,bottom=2.0cm]{geometry}
\usepackage{amsmath,amssymb,amsfonts,textcomp,setspace,graphicx,makeidx, fancyhdr,color,lastpage,url}

\begin{document}
\section{A}
\subsection{Anexo 2}
Análisis grafica de resultados
\begin{figure}[h]
\centering \includegraphics[scale=0.5]{figuras/G1.png}
\caption{¿Qué actividades te gusta hacer en tus tiempos libres?}
\end{figure}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Alter Figure Caption Prefix globally

Post by Stefan Kottwitz »

paulosousa wrote:I tried to change the caption of the graphic
What did you try? Usually this information could be useful in addition. Good minimal example, so I checked that this works, added to the preamble:

Code: Select all

\addto{\captionsportuguese}{\renewcommand*{\figurename}{Gráfico}}
Stefan
LaTeX.org admin
paulosousa
Posts: 90
Joined: Sun Jun 24, 2012 8:48 pm

Alter Figure Caption Prefix globally

Post by paulosousa »

Hi Stefan,

thanks a lot. It worked.

I tried this.

Code: Select all

\addto{\captions}{\renewcommand*{\figure}{Grafico}}
But I was wrong!!
Post Reply