Are math operator names like \gcd available in other languages?
This is an (easy) approach to change the output of the \gcd
operator according to the current language settings. It's not perfect, the spacings could be better, definitely.
Add other languages at will ;-)
\documentclass{article}
\usepackage{amsmath}
\usepackage[ngerman,english,dutch,strings]{babel}
\newcommand{\gcdname}{}
\StartBabelCommands{dutch}{extras}%
\SetString{\gcdname}{ggd}%
\EndBabelCommands
\StartBabelCommands{ngerman}{extras}%
\SetString{\gcdname}{ggt}% Groesster gemeinsamer Teiler
\EndBabelCommands
\StartBabelCommands{english}{extras}%
\SetString{\gcdname}{gcd}% Greatest common divisor
\EndBabelCommands
\let\gcd\relax
\DeclareMathOperator{\gcd}{\gcdname}%
\begin{document}
\selectlanguage{ngerman}
\(\gcd{144,12}\)
\selectlanguage{english}
\(\gcd{144,12}\)
\selectlanguage{dutch}
\(\gcd{144,12}\)
\end{document}
If you load the package amsmath
, you can easily define new math operator names using that package's \DeclareMathOperator
macro. E.g.,
\DeclareMathOperator{\ggd}{ggd}