# Problem with calculutor, calculus

MWE

\documentclass[a4paper,11pt]{report}
\usepackage[turkish]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{calculator} % 2014/02/20 v.2.0
\usepackage{calculus}   % 2014/02/20 v.2.0

\begin{document}

Ş ş Ç ç % Before

\newcommand\gga{10}
\newcommand\ggb{30}
\newcommand\ggc{5}
\newcommand\ggd{5}
\newcommand\gge{10}
\newcommand\ggf{9}

Ş ş Ç ç % After

\end{document}


and output,

no problem. But added the This Line,

How is it changing macro in MWE?

• Don't use single letters like this: many are already defined to mark accents (e.g., \b, \c, \d, \H, \k, \r, \t, \u, \v). – jon Oct 11 '15 at 6:17
• A colleague of mine had an issue with a paper; I discovered that he was redefining \c (to \gamma, because he knew Greek), but that particular paper had a Turkish coauthor whose surname started with Ş. Don't use \def unless you have a good reason to; packages such as calculator that do redefinitions without any check are to be avoided, in my opinion. Use some distinguishable prefix, like you did at the beginning. – egreg Oct 11 '15 at 9:39

\documentclass[a4paper,11pt]{report}
\usepackage[turkish]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{calculator} % 2014/02/20 v.2.0
\usepackage{calculus}   % 2014/02/20 v.2.0

\begin{document}

Ş ş Ç ç % Before

\newcommand\gga{10}
\newcommand\ggb{30}
\newcommand\ggc{5}
\newcommand\ggd{5}
\newcommand\gge{10}
\newcommand\ggf{9}

\show\c  \show\solc  % Look into the log file

Ş ş Ç ç % After

\end{document}


It seems that your used macro \c has another definition and gives the problem. Follow the documentation and use varaiables \solx for your solutions. Change x to what you need, for example c.

With \show you can see in the log file, what the following macro means. The result for my MWE is:

> \c=macro:
->\T1-cmd \c \T1\c .
l.25 \show\c
\show\solc

> \solc=macro:
->19.


You see, macro \solc has the value 19.

At last the reason for this behaviour is that \usepackage[utf8]{inputenc} translates Ş into \c{S} (and similarly for the other letters with the cedilla). \c marks the "cedillia" that is added to the following letter (here in the example S). Now you redefined the cedillia to 19 so you get at last \c{S} --> 19{S} --> 19S. And so redefining \c is definitely a bad idea, especially for Turks (Thanks to @egreg for his great comment!)
• @Özgür In LaTeX exists a lot of predefined macros. \c marks the accent you used in your text line. Thats the reason you got 19 (new content of \c) followed by S etc. (Sorry, I do not know the english name of this accent) – Mensch Oct 11 '15 at 6:28
• According to Wikipedia, the under accent is called “Çengel işareti” or “Sedil” in Turkish and “cedilla” in English. “Cedille" in German. You could add that the utf8 option to inputenc translates Ş into \c{S} (and similarly for the other letters with the cedilla), so redefining \c is definitely a bad idea, especially for Turks. – egreg Oct 11 '15 at 9:42