1

I would like to change the name "Σχήμα" to "Εικόνα" as you can see in the screenshot. Without babel it would be easy since I change the document element Figure to other word. How can I do it in babel. I tried \addto\captionsenglish{\renewcommand{\figurename}{Εικόνα.}. But it can not do it. My code is

\documentclass[12pt]{report}

\usepackage[english,greek]{babel}

\usepackage{graphicx}

\usepackage{tabularx}

\usepackage{multirow}

\begin{figure}[H]

\includegraphics[width=20cm]{PictureA.jpg}

\centering \selectlanguage{greek}

\caption{Αρχική κατάσταση. Μετωπιαία όψη.}

\end{figure}

\end{document}

enter image description here

moewe
  • 175,683
  • 2
    Untested, but for Greek you would expect something like \addto\captionsgreek{\renewcommand{\figurename}{Εικόνα.}} and not \captionsenglish. – moewe Aug 29 '21 at 09:21
  • ...I can even think why I was trying with captionsenglish..thank you – Petros Mourouzis Aug 29 '21 at 09:23
  • This is the same with the listfigures?\addto\captionsgreek{\renewcommand{\listoffigures}{Κατάλογος Εικόνων}} – Petros Mourouzis Aug 29 '21 at 10:16
  • \listoffigures is the entire command that prints the list of figures. \listfigurename is the heading that you get from \listoffigures. See the list in https://tex.stackexchange.com/q/82993/35864. – moewe Aug 29 '21 at 10:19
  • \def\figurename{...} should handle both the \caption and LOF, but you have to make the change AFTER babel does it (\AtBeginDocument?). – John Kormylo Aug 29 '21 at 17:18
  • @JohnKormylo In multilingual documents redefining captions with \AtBeginDocument is not correct, because the default string is restored when the language is selected. – Javier Bezos Sep 06 '21 at 07:34

1 Answers1

2

Currently (≥ 3.51) the best option is \setlocalecaption, as shown:

\documentclass[12pt]{report}

\usepackage[english,greek]{babel}

\setlocalecaption{greek}{figure}{Εικόνα}

\usepackage{graphicx}

\begin{document}

\begin{figure} \includegraphics[width=20cm]{PictureA.jpg} \centering \selectlanguage{greek} \caption{Αρχική κατάσταση. Μετωπιαία όψη.} \end{figure}

\end{document}

This generates the following caption: enter image description here

Javier Bezos
  • 10,003