Changing the definition of “mod” in spanish impossible?
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:
However, if I comment the line
usepackage[spanish]{babel}
in the above code, the result I get is
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
add a comment |
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:
However, if I comment the line
usepackage[spanish]{babel}
in the above code, the result I get is
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
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
add a comment |
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:
However, if I comment the line
usepackage[spanish]{babel}
in the above code, the result I get is
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
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:
However, if I comment the line
usepackage[spanish]{babel}
in the above code, the result I get is
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
spanish
asked Nov 23 '18 at 7:10
Michael Fütterer
23515
23515
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
add a comment |
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
add a comment |
1 Answer
1
active
oldest
votes
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}
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}
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.
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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}
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}
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.
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
add a comment |
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}
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}
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.
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
add a comment |
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}
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}
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.
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}
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}
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.
edited Nov 23 '18 at 18:10
answered Nov 23 '18 at 9:41
egreg
709k8618823165
709k8618823165
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
add a comment |
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
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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