# Problem with using scale while using \includegraphics [duplicate]

Possible Duplicate:
\usepackage[turkish]{babel} and \includegraphics inconcistency

I previously imported many figures to TEX files and simply use the corresponding parameters without any problems. However, this time I am preparing some slides using beamer and I couldn't figure what's wrong with it. Here is my TEX code related with the problem.

\documentclass{beamer}

\usepackage[latin5]{inputenc}
\RequirePackage[turkish]{babel}

\usetheme{Madrid}
\usepackage{graphicx}
\usepackage{epstopdf}

\begin{document}

\begin{frame}
\frametitle{Markov Karar Süreçleri}
\includegraphics[scale=0.5]{img/mdp.eps}
%\includegraphics{img/mdp.eps}
\end{frame}

\end{document}


The code exists with many compile errors. However, when I simply comment out the includegraphics line scale parameters and uncomment the other one, it compiles smoothly.

Any ideas are welcome..

-

## marked as duplicate by Gonzalo Medina, Torbjørn T., lockstep, Werner, Stefan Kottwitz♦Apr 24 '12 at 16:28

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

actually it is.. –  Orhan Sönmez Apr 9 '12 at 21:30

## 1 Answer

I believed that the problem had been solved, but apparently it hasn't.

The issue is in the fact that the Turkish module for babel activates the = character as a shorthand.

If you don't need the = in text (which is hardly ever needed), you can simply forget about its activation and issue

\shorthandoff{=}


just after \begin{document}.

A different way to solve the problem is to load xkeyval (an extension of the keyval package loaded by graphicx); in this way no \shorthandoff is necessary.

\documentclass{beamer}

\usepackage[latin5]{inputenc}
\RequirePackage[turkish]{babel}

\usetheme{Madrid}
\usepackage{xkeyval}
\usepackage{graphicx}
\usepackage{epstopdf}

\begin{document}

\begin{frame}
\frametitle{Markov Karar Süreçleri}
\includegraphics[scale=0.5]{img/mdp.eps}
\end{frame}

\end{document}

-
Thanks for the quick response. That solves the problem.. –  Orhan Sönmez Apr 9 '12 at 21:26
@OrhanSönmez See edited message for a different solution –  egreg Apr 9 '12 at 22:37