Changing the definition of “mod” in spanish impossible?












7















I'm writing a math text in spanish and want to change the definition of the "mod" command. However, this seems impossible, as the following MWE shows:



documentclass{article}

usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage[T1]{fontenc}
usepackage{amsmath}

renewcommand{mod}{operatorname{changed}}

begin{document}
$a equiv b mod c$
end{document}


This produces the following output:



enter image description here



However, if I comment the line



usepackage[spanish]{babel}


in the above code, the result I get is



enter image description here



as I would expect.



The same phenomenon happens with other math operators that carry accents in spanish, like for example "max" or "lim", but it works for such that don't have accents, like "sin".










share|improve this question


















  • 2





    Move the redefinition behind begin document

    – Ulrike Fischer
    Nov 23 '18 at 7:35






  • 1





    Is your aim to avoid the accent in the operator names?

    – egreg
    Nov 23 '18 at 7:53











  • @UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.

    – Michael Fütterer
    Nov 23 '18 at 17:17
















7















I'm writing a math text in spanish and want to change the definition of the "mod" command. However, this seems impossible, as the following MWE shows:



documentclass{article}

usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage[T1]{fontenc}
usepackage{amsmath}

renewcommand{mod}{operatorname{changed}}

begin{document}
$a equiv b mod c$
end{document}


This produces the following output:



enter image description here



However, if I comment the line



usepackage[spanish]{babel}


in the above code, the result I get is



enter image description here



as I would expect.



The same phenomenon happens with other math operators that carry accents in spanish, like for example "max" or "lim", but it works for such that don't have accents, like "sin".










share|improve this question


















  • 2





    Move the redefinition behind begin document

    – Ulrike Fischer
    Nov 23 '18 at 7:35






  • 1





    Is your aim to avoid the accent in the operator names?

    – egreg
    Nov 23 '18 at 7:53











  • @UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.

    – Michael Fütterer
    Nov 23 '18 at 17:17














7












7








7








I'm writing a math text in spanish and want to change the definition of the "mod" command. However, this seems impossible, as the following MWE shows:



documentclass{article}

usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage[T1]{fontenc}
usepackage{amsmath}

renewcommand{mod}{operatorname{changed}}

begin{document}
$a equiv b mod c$
end{document}


This produces the following output:



enter image description here



However, if I comment the line



usepackage[spanish]{babel}


in the above code, the result I get is



enter image description here



as I would expect.



The same phenomenon happens with other math operators that carry accents in spanish, like for example "max" or "lim", but it works for such that don't have accents, like "sin".










share|improve this question














I'm writing a math text in spanish and want to change the definition of the "mod" command. However, this seems impossible, as the following MWE shows:



documentclass{article}

usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage[T1]{fontenc}
usepackage{amsmath}

renewcommand{mod}{operatorname{changed}}

begin{document}
$a equiv b mod c$
end{document}


This produces the following output:



enter image description here



However, if I comment the line



usepackage[spanish]{babel}


in the above code, the result I get is



enter image description here



as I would expect.



The same phenomenon happens with other math operators that carry accents in spanish, like for example "max" or "lim", but it works for such that don't have accents, like "sin".







spanish






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 23 '18 at 7:10









Michael FüttererMichael Fütterer

26715




26715








  • 2





    Move the redefinition behind begin document

    – Ulrike Fischer
    Nov 23 '18 at 7:35






  • 1





    Is your aim to avoid the accent in the operator names?

    – egreg
    Nov 23 '18 at 7:53











  • @UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.

    – Michael Fütterer
    Nov 23 '18 at 17:17














  • 2





    Move the redefinition behind begin document

    – Ulrike Fischer
    Nov 23 '18 at 7:35






  • 1





    Is your aim to avoid the accent in the operator names?

    – egreg
    Nov 23 '18 at 7:53











  • @UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.

    – Michael Fütterer
    Nov 23 '18 at 17:17








2




2





Move the redefinition behind begin document

– Ulrike Fischer
Nov 23 '18 at 7:35





Move the redefinition behind begin document

– Ulrike Fischer
Nov 23 '18 at 7:35




1




1





Is your aim to avoid the accent in the operator names?

– egreg
Nov 23 '18 at 7:53





Is your aim to avoid the accent in the operator names?

– egreg
Nov 23 '18 at 7:53













@UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.

– Michael Fütterer
Nov 23 '18 at 17:17





@UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.

– Michael Fütterer
Nov 23 '18 at 17:17










1 Answer
1






active

oldest

votes


















12














I guess that your aim is to use the standard unaccented operator names.



The trick is explained it the manual for babel-spanish, section 5.5.



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

% no accents in math operators
unaccentedoperators

begin{document}

$a equiv b mod{c}$

$lim_{xto c}f(x)$

$arcsin t$

$max A-min A$

end{document}


enter image description here



Beware that mod is not defined with operatorname and your proposed redefinition would be bad anyway.



Anyway, here's a correct way to proceed:



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

%unaccentedoperators

makeatletter
addtomathspanish{renewcommand{mod}{operatorname{mes@op@ac od}}}
makeatother

begin{document}

$a equiv b mod c$

end{document}


enter image description here



If you don't want the accent irrespective of accentedoperators or unaccentedoperators, remove the es@op@ac command.



In general, I don't recommend redefining some standard command to do different things (apart from printing just a different symbol). Better defining omod or whatever name you prefer.






share|improve this answer





















  • 2





    +1: Is unaccentedoperators part of babel then?

    – Dr. Manuel Kuehner
    Nov 23 '18 at 10:05






  • 1





    @Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).

    – alephzero
    Nov 23 '18 at 11:40











  • Actually I do want to use the accented versions because they seem to be quite standard in spanish math texts, and I do want mod to behave like an operator (as this fits my mathematical needs better). For the same reason I want to redefine lim to denote categorical limits instead of analytic ones, so in any case this wouldn't solve my issue.

    – Michael Fütterer
    Nov 23 '18 at 17:11













  • @MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.

    – egreg
    Nov 23 '18 at 18:11













  • Thanks, with that I'll be able to solve the problem! For the categorical limit I just realized that a solution is already described here tex.stackexchange.com/questions/342037/…

    – Michael Fütterer
    Nov 23 '18 at 18:45











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461371%2fchanging-the-definition-of-mod-in-spanish-impossible%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









12














I guess that your aim is to use the standard unaccented operator names.



The trick is explained it the manual for babel-spanish, section 5.5.



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

% no accents in math operators
unaccentedoperators

begin{document}

$a equiv b mod{c}$

$lim_{xto c}f(x)$

$arcsin t$

$max A-min A$

end{document}


enter image description here



Beware that mod is not defined with operatorname and your proposed redefinition would be bad anyway.



Anyway, here's a correct way to proceed:



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

%unaccentedoperators

makeatletter
addtomathspanish{renewcommand{mod}{operatorname{mes@op@ac od}}}
makeatother

begin{document}

$a equiv b mod c$

end{document}


enter image description here



If you don't want the accent irrespective of accentedoperators or unaccentedoperators, remove the es@op@ac command.



In general, I don't recommend redefining some standard command to do different things (apart from printing just a different symbol). Better defining omod or whatever name you prefer.






share|improve this answer





















  • 2





    +1: Is unaccentedoperators part of babel then?

    – Dr. Manuel Kuehner
    Nov 23 '18 at 10:05






  • 1





    @Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).

    – alephzero
    Nov 23 '18 at 11:40











  • Actually I do want to use the accented versions because they seem to be quite standard in spanish math texts, and I do want mod to behave like an operator (as this fits my mathematical needs better). For the same reason I want to redefine lim to denote categorical limits instead of analytic ones, so in any case this wouldn't solve my issue.

    – Michael Fütterer
    Nov 23 '18 at 17:11













  • @MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.

    – egreg
    Nov 23 '18 at 18:11













  • Thanks, with that I'll be able to solve the problem! For the categorical limit I just realized that a solution is already described here tex.stackexchange.com/questions/342037/…

    – Michael Fütterer
    Nov 23 '18 at 18:45
















12














I guess that your aim is to use the standard unaccented operator names.



The trick is explained it the manual for babel-spanish, section 5.5.



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

% no accents in math operators
unaccentedoperators

begin{document}

$a equiv b mod{c}$

$lim_{xto c}f(x)$

$arcsin t$

$max A-min A$

end{document}


enter image description here



Beware that mod is not defined with operatorname and your proposed redefinition would be bad anyway.



Anyway, here's a correct way to proceed:



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

%unaccentedoperators

makeatletter
addtomathspanish{renewcommand{mod}{operatorname{mes@op@ac od}}}
makeatother

begin{document}

$a equiv b mod c$

end{document}


enter image description here



If you don't want the accent irrespective of accentedoperators or unaccentedoperators, remove the es@op@ac command.



In general, I don't recommend redefining some standard command to do different things (apart from printing just a different symbol). Better defining omod or whatever name you prefer.






share|improve this answer





















  • 2





    +1: Is unaccentedoperators part of babel then?

    – Dr. Manuel Kuehner
    Nov 23 '18 at 10:05






  • 1





    @Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).

    – alephzero
    Nov 23 '18 at 11:40











  • Actually I do want to use the accented versions because they seem to be quite standard in spanish math texts, and I do want mod to behave like an operator (as this fits my mathematical needs better). For the same reason I want to redefine lim to denote categorical limits instead of analytic ones, so in any case this wouldn't solve my issue.

    – Michael Fütterer
    Nov 23 '18 at 17:11













  • @MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.

    – egreg
    Nov 23 '18 at 18:11













  • Thanks, with that I'll be able to solve the problem! For the categorical limit I just realized that a solution is already described here tex.stackexchange.com/questions/342037/…

    – Michael Fütterer
    Nov 23 '18 at 18:45














12












12








12







I guess that your aim is to use the standard unaccented operator names.



The trick is explained it the manual for babel-spanish, section 5.5.



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

% no accents in math operators
unaccentedoperators

begin{document}

$a equiv b mod{c}$

$lim_{xto c}f(x)$

$arcsin t$

$max A-min A$

end{document}


enter image description here



Beware that mod is not defined with operatorname and your proposed redefinition would be bad anyway.



Anyway, here's a correct way to proceed:



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

%unaccentedoperators

makeatletter
addtomathspanish{renewcommand{mod}{operatorname{mes@op@ac od}}}
makeatother

begin{document}

$a equiv b mod c$

end{document}


enter image description here



If you don't want the accent irrespective of accentedoperators or unaccentedoperators, remove the es@op@ac command.



In general, I don't recommend redefining some standard command to do different things (apart from printing just a different symbol). Better defining omod or whatever name you prefer.






share|improve this answer















I guess that your aim is to use the standard unaccented operator names.



The trick is explained it the manual for babel-spanish, section 5.5.



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

% no accents in math operators
unaccentedoperators

begin{document}

$a equiv b mod{c}$

$lim_{xto c}f(x)$

$arcsin t$

$max A-min A$

end{document}


enter image description here



Beware that mod is not defined with operatorname and your proposed redefinition would be bad anyway.



Anyway, here's a correct way to proceed:



documentclass{article}

usepackage[T1]{fontenc}
usepackage[utf8]{inputenc}
usepackage[spanish]{babel}
usepackage{amsmath}

%unaccentedoperators

makeatletter
addtomathspanish{renewcommand{mod}{operatorname{mes@op@ac od}}}
makeatother

begin{document}

$a equiv b mod c$

end{document}


enter image description here



If you don't want the accent irrespective of accentedoperators or unaccentedoperators, remove the es@op@ac command.



In general, I don't recommend redefining some standard command to do different things (apart from printing just a different symbol). Better defining omod or whatever name you prefer.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 23 '18 at 18:10

























answered Nov 23 '18 at 9:41









egregegreg

719k8719053205




719k8719053205








  • 2





    +1: Is unaccentedoperators part of babel then?

    – Dr. Manuel Kuehner
    Nov 23 '18 at 10:05






  • 1





    @Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).

    – alephzero
    Nov 23 '18 at 11:40











  • Actually I do want to use the accented versions because they seem to be quite standard in spanish math texts, and I do want mod to behave like an operator (as this fits my mathematical needs better). For the same reason I want to redefine lim to denote categorical limits instead of analytic ones, so in any case this wouldn't solve my issue.

    – Michael Fütterer
    Nov 23 '18 at 17:11













  • @MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.

    – egreg
    Nov 23 '18 at 18:11













  • Thanks, with that I'll be able to solve the problem! For the categorical limit I just realized that a solution is already described here tex.stackexchange.com/questions/342037/…

    – Michael Fütterer
    Nov 23 '18 at 18:45














  • 2





    +1: Is unaccentedoperators part of babel then?

    – Dr. Manuel Kuehner
    Nov 23 '18 at 10:05






  • 1





    @Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).

    – alephzero
    Nov 23 '18 at 11:40











  • Actually I do want to use the accented versions because they seem to be quite standard in spanish math texts, and I do want mod to behave like an operator (as this fits my mathematical needs better). For the same reason I want to redefine lim to denote categorical limits instead of analytic ones, so in any case this wouldn't solve my issue.

    – Michael Fütterer
    Nov 23 '18 at 17:11













  • @MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.

    – egreg
    Nov 23 '18 at 18:11













  • Thanks, with that I'll be able to solve the problem! For the categorical limit I just realized that a solution is already described here tex.stackexchange.com/questions/342037/…

    – Michael Fütterer
    Nov 23 '18 at 18:45








2




2





+1: Is unaccentedoperators part of babel then?

– Dr. Manuel Kuehner
Nov 23 '18 at 10:05





+1: Is unaccentedoperators part of babel then?

– Dr. Manuel Kuehner
Nov 23 '18 at 10:05




1




1





@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).

– alephzero
Nov 23 '18 at 11:40





@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).

– alephzero
Nov 23 '18 at 11:40













Actually I do want to use the accented versions because they seem to be quite standard in spanish math texts, and I do want mod to behave like an operator (as this fits my mathematical needs better). For the same reason I want to redefine lim to denote categorical limits instead of analytic ones, so in any case this wouldn't solve my issue.

– Michael Fütterer
Nov 23 '18 at 17:11







Actually I do want to use the accented versions because they seem to be quite standard in spanish math texts, and I do want mod to behave like an operator (as this fits my mathematical needs better). For the same reason I want to redefine lim to denote categorical limits instead of analytic ones, so in any case this wouldn't solve my issue.

– Michael Fütterer
Nov 23 '18 at 17:11















@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.

– egreg
Nov 23 '18 at 18:11







@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.

– egreg
Nov 23 '18 at 18:11















Thanks, with that I'll be able to solve the problem! For the categorical limit I just realized that a solution is already described here tex.stackexchange.com/questions/342037/…

– Michael Fütterer
Nov 23 '18 at 18:45





Thanks, with that I'll be able to solve the problem! For the categorical limit I just realized that a solution is already described here tex.stackexchange.com/questions/342037/…

– Michael Fütterer
Nov 23 '18 at 18:45


















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f461371%2fchanging-the-definition-of-mod-in-spanish-impossible%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Wiesbaden

Marschland

Dieringhausen