1

I am trying to prepare a presentation with beamer however I keep getting an odd error while manipulating an image.

I am using graphicx package and the code is as follows:

\begin{frame}
\frametitle{title}
\includegraphics{figure.png}
\end{frame}

This doesn't cause any problem but the figure is always out of the scale, so when I try to scale it as \includegraphics[scale=0.7]{figure.png} (or any other manipulation) it returns this error:

! Missing \endcsname inserted. \relax l.61 \end{frame}

I tried putting the figure in boxes, columns or prescale it so far nothing works. I cannot find the problem. Please help.

Update: Here is the whole tex file so far:

\documentclass[turkish]{beamer} \usetheme{Berkeley} \usecolortheme{seahorse} \usefonttheme{serif} `\usepackage{xcolor}` `\usepackage[turkish]{babel}` `\usepackage[utf8]{inputenc}` `\usepackage[T1]{fontenc}` `\usepackage{graphicx}` %%%%%%%%KAPAK SAYFASI%%%%%%%%%%%%%%% \title[] % (optional, only for long titles) {title} \author[author1, author2] {author1\inst{1} \and author2\inst{1}} \institute[University] {\inst{1}% Department\\ University} \subject{subject} \date[2015] `%%%%%%%%İÇİNDEKİLER ÖZELLİKLERİ%%%%%%%%%%%` `\AtBeginSection[]` `{` ` \begin{frame}` ` \frametitle{Table of Contents}` ` \tableofcontents` ` \end{frame}` `}` `\AtBeginSubsection[]` `{` ` \begin{frame}` ` \frametitle{Table of Contents}` ` \tableofcontents[currentsection,currentsubsection]` ` \end{frame}` `}` %%%%%%%%%%%%%SAYFALAR%%%%%%%%%%%%%% \begin{document} ` \frame{\titlepage}` ` ` ` \begin{frame}` ` \frametitle{İçindekiler}` ` \tableofcontents[currentsection]` ` \end{frame}` \section{analysis} \begin{frame} \frametitle{} \end{frame} ` \begin{frame}` ` \frametitle{types}` `% \begin{center}` `% \includegraphics{16.png}`
`% \end{center}` `\tiny{\underline{source:} http://...}` ` \end{frame}`
\end{document}

  • Add to your question a complete, little document allowing us to reproduce the problem mentioned. – Gonzalo Medina Sep 8 '15 at 13:21
  • 1
    are you using a babel language that makes = active? – David Carlisle Sep 8 '15 at 13:28
  • Thank you, I removed babel, problem solved. But I need to use babel too, how can I override = active? – Sahika Koyun Sep 8 '15 at 13:35
2

The problem is that the turkish module for babel makes = active; use \shorthandoff{=} (since inputenc with utf8 encoding is used, suppressing the shorthand is not a problem):

\documentclass[turkish]{beamer}
\usepackage{babel}

\begin{document}
\shorthandoff{=}

\begin{frame}
\frametitle{title}
\includegraphics[scale=0.7]{example-image-a}
\end{frame}

\end{document}
  • Thank you, I have been struggling with this for a while now. Everything works now. – Sahika Koyun Sep 8 '15 at 13:51

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.