3

MWE:

\documentclass[a4paper,11pt]{article}
\usepackage{amssymb}
\usepackage{rotating}
%\usepackage[turkish]{babel}
\begin{document}
\newcommand{\olok}{\rotatebox[origin=c]{135}{$\twoheadrightarrow$}}
\olok
\end{document}

and displaying

enter image description here

But, It takes Missing \endcsname inserted when I added \usepackage[turkish]{babel}.

I didn't find about this question. Does anyone know how to fix it?

(Perhaps about\shorthandoff{})

Alan Munn
  • 218,180
Özgür
  • 3,270

1 Answers1

3

Define \olok within the document preamble, not inside the document where you'll have other content-related information:

\documentclass{article}
\usepackage{amssymb,graphicx}
\usepackage[turkish]{babel}

% Document-related definitions
\newcommand{\olok}{\rotatebox[origin=c]{135}{$\twoheadrightarrow$}}

\begin{document}
\olok
\end{document}

The above suggestion is a minor work-around.

The problem is related to the use of = which is made active under \usepackage[turkish]{babel}. As such, origin=c is not interpreted in the way one would expect a key=value input should be. For general applications, you can momentarily switch off the "active-ness" of = using

\shorthandoff{=}% Make = not active any more
\rotatebox[origin=c]{135}{$\twoheadrightarrow$}
\shorthandon{=}% Make = active again
Werner
  • 603,163
  • Question [Closed]. I'm sorry. I'm very tired. I couldn't think. – Özgür Mar 02 '15 at 22:51
  • This is not actually an answer to the question, although it is kind of a workaround. If you simply put \rotatebox[origin=c]{90}{$\twoheadrightarrow$} into the document and load the [turkish] option, the document fails. So there's more to the problem than this. – Alan Munn Mar 02 '15 at 22:54
  • @AlanMunn: I see... this has to do (it seems) with an improper interpretation of =. – Werner Mar 02 '15 at 22:56
  • It usually needs \shorthandoff{=}. I think it is a dupe of http://tex.stackexchange.com/questions/160385/newgeometry-doesnt-work-with-turkish-babel-package – percusse Mar 02 '15 at 23:00
  • @percusse: Correct... – Werner Mar 02 '15 at 23:01