7

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..

11

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

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