Changing the definition of “mod” in spanish impossible?
up vote
7
down vote
favorite
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 |
up vote
7
down vote
favorite
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
2 days ago
1
Is your aim to avoid the accent in the operator names?
– egreg
2 days ago
@UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.
– Michael Fütterer
2 days ago
add a comment |
up vote
7
down vote
favorite
up vote
7
down vote
favorite
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 2 days ago
Michael Fütterer
23015
23015
2
Move the redefinition behind begin document
– Ulrike Fischer
2 days ago
1
Is your aim to avoid the accent in the operator names?
– egreg
2 days ago
@UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.
– Michael Fütterer
2 days ago
add a comment |
2
Move the redefinition behind begin document
– Ulrike Fischer
2 days ago
1
Is your aim to avoid the accent in the operator names?
– egreg
2 days ago
@UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.
– Michael Fütterer
2 days ago
2
2
Move the redefinition behind begin document
– Ulrike Fischer
2 days ago
Move the redefinition behind begin document
– Ulrike Fischer
2 days ago
1
1
Is your aim to avoid the accent in the operator names?
– egreg
2 days ago
Is your aim to avoid the accent in the operator names?
– egreg
2 days ago
@UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.
– Michael Fütterer
2 days ago
@UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.
– Michael Fütterer
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
12
down vote
accepted
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
2 days ago
1
@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).
– alephzero
2 days ago
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
2 days ago
@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.
– egreg
2 days ago
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
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
12
down vote
accepted
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
2 days ago
1
@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).
– alephzero
2 days ago
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
2 days ago
@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.
– egreg
2 days ago
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
2 days ago
add a comment |
up vote
12
down vote
accepted
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
2 days ago
1
@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).
– alephzero
2 days ago
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
2 days ago
@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.
– egreg
2 days ago
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
2 days ago
add a comment |
up vote
12
down vote
accepted
up vote
12
down vote
accepted
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 2 days ago
answered 2 days ago
egreg
699k8518613133
699k8518613133
2
+1: Is unaccentedoperators part of babel then?
– Dr. Manuel Kuehner
2 days ago
1
@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).
– alephzero
2 days ago
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
2 days ago
@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.
– egreg
2 days ago
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
2 days ago
add a comment |
2
+1: Is unaccentedoperators part of babel then?
– Dr. Manuel Kuehner
2 days ago
1
@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).
– alephzero
2 days ago
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
2 days ago
@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.
– egreg
2 days ago
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
2 days ago
2
2
+1: Is unaccentedoperators part of babel then?
– Dr. Manuel Kuehner
2 days ago
+1: Is unaccentedoperators part of babel then?
– Dr. Manuel Kuehner
2 days ago
1
1
@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).
– alephzero
2 days ago
@Dr.ManuelKuehner Yes, see babel-manual.pdf section 27 (which is about the Spanish language options).
– alephzero
2 days ago
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
2 days ago
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
2 days ago
@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.
– egreg
2 days ago
@MichaelFütterer I added a different version. I'm not sure where categorical limit notation is different from analytic notation.
– egreg
2 days ago
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
2 days ago
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
2 days ago
add a comment |
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
2 days ago
1
Is your aim to avoid the accent in the operator names?
– egreg
2 days ago
@UlrikeFischer thanks, your suggestion precisely solves my problem. If you post it as an answer y can accept it.
– Michael Fütterer
2 days ago