TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a text in Dutch in which I want to use the greatest common divisor. In English, I could use something like $\gcd(123,321)$. However, in Dutch, we call the function grootste gemene deler, ggd. Of course, I could use $\text{ggd}(123,321)$ (in fact, for this I wouldn't even need math mode, but suppose this is inside a larger equation). But isn't there a way to get the mathematical commands the translated?

share|improve this question
Do you ask, if there is a translation of the output of \gcd into other languages? – Christian Hupfer Sep 3 '14 at 17:23
@ChristianHupfer Either that or a way to use a function like \ggd, using some kind of package that would provide this function based on the language. I'm sorry, I didn't quite know how to put this question into words. – Camil Staps Sep 3 '14 at 17:24
You do need math, as it is math and to match style with other math. To make the spacing correct do not use \text but something like \DeclareMathOperator{\ggd}{ggd}. – Hans-Peter E. Kristiansen Sep 3 '14 at 17:25
You could use babel, but you have to provide the translation for supported languages yourself. I don't know that there some translations available – Christian Hupfer Sep 3 '14 at 17:26
@Hans-PeterE.Kristiansen that works, great! Supposing there are no translations already available you can make it an answer. – Camil Staps Sep 3 '14 at 17:28
up vote 5 down vote accepted

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.

Add other languages at will ;-)





\SetString{\gcdname}{ggt}% Groesster gemeinsamer Teiler

\SetString{\gcdname}{gcd}% Greatest common divisor










enter image description here

share|improve this answer
This is possibly/probably the best option, as it allows copying math between documents in a different language and doesn't add a whole load of new commands, like \DeclareMathOperator{\ggd}{ggd} would. – Camil Staps Sep 3 '14 at 17:46
I think there should be some math-language option, as one might want to have text in German, say, but however stick to US notations for functions. – Bernard Sep 3 '14 at 17:51
@Bernard: Do you mean an option to the \ggd command? – Christian Hupfer Sep 3 '14 at 19:44
@Christian Hupfer: I would rather think of a .sty file, with translations for each language — more or less the way localisations work in cleveref. – Bernard Sep 3 '14 at 20:17
@Bernard: That's an interesting idea... Will you provide the French translations? (My knowledge of French is..., say, limited ;-) ) – Christian Hupfer Sep 3 '14 at 21:08

If you load the package amsmath, you can easily define new math operator names using that package's \DeclareMathOperator macro. E.g.,

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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