bm problem with newcommand
Καλημέρα!
If I use the package bm
, I have problems with the newcommand{hm}{mathop{}!text{ημ} mathop{}!}
.
N.B.: I don't have problems with the mathop{}!text{ημ} mathop{}!
, but with the newcommand{hm}{mathop{}!text{ημ} mathop{}!}
As I 'm saying, the strange is that the code:
documentclass[a4paper,11pt]{book}
usepackage{amsmath, amsthm, amssymb, amsfonts}
usepackage{mathtools}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{cmbright}
usepackage{kerkis}
usepackage{bm}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
end{document}
is OK, but this code:
documentclass[a4paper,11pt]{book}
usepackage{amsmath, amsthm, amssymb, amsfonts}
usepackage{mathtools}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{cmbright}
usepackage{kerkis}
usepackage{bm}
newcommand{hm}{mathop{}!text{ημ} mathop{}!}
begin{document}
$hm x$
end{document}
get's me an error.
What is happening?
Ευχαριστώ εκ των προτέρων!!!
macros bm
add a comment |
Καλημέρα!
If I use the package bm
, I have problems with the newcommand{hm}{mathop{}!text{ημ} mathop{}!}
.
N.B.: I don't have problems with the mathop{}!text{ημ} mathop{}!
, but with the newcommand{hm}{mathop{}!text{ημ} mathop{}!}
As I 'm saying, the strange is that the code:
documentclass[a4paper,11pt]{book}
usepackage{amsmath, amsthm, amssymb, amsfonts}
usepackage{mathtools}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{cmbright}
usepackage{kerkis}
usepackage{bm}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
end{document}
is OK, but this code:
documentclass[a4paper,11pt]{book}
usepackage{amsmath, amsthm, amssymb, amsfonts}
usepackage{mathtools}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{cmbright}
usepackage{kerkis}
usepackage{bm}
newcommand{hm}{mathop{}!text{ημ} mathop{}!}
begin{document}
$hm x$
end{document}
get's me an error.
What is happening?
Ευχαριστώ εκ των προτέρων!!!
macros bm
Please note thattext
is never a good choice for something like this. It typesets in italic if the surrounding context is italic (for example inside a theorem construction), that was probably not what was intended. Sadly many users misuse thetext
command.
– daleif
Dec 13 '18 at 11:39
I have to use the greek characters "ημ" in math mode (ημΑ=sinA). So I must usetext
command. Or not?
– Kώστας Κούδας
Dec 17 '18 at 6:55
add a comment |
Καλημέρα!
If I use the package bm
, I have problems with the newcommand{hm}{mathop{}!text{ημ} mathop{}!}
.
N.B.: I don't have problems with the mathop{}!text{ημ} mathop{}!
, but with the newcommand{hm}{mathop{}!text{ημ} mathop{}!}
As I 'm saying, the strange is that the code:
documentclass[a4paper,11pt]{book}
usepackage{amsmath, amsthm, amssymb, amsfonts}
usepackage{mathtools}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{cmbright}
usepackage{kerkis}
usepackage{bm}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
end{document}
is OK, but this code:
documentclass[a4paper,11pt]{book}
usepackage{amsmath, amsthm, amssymb, amsfonts}
usepackage{mathtools}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{cmbright}
usepackage{kerkis}
usepackage{bm}
newcommand{hm}{mathop{}!text{ημ} mathop{}!}
begin{document}
$hm x$
end{document}
get's me an error.
What is happening?
Ευχαριστώ εκ των προτέρων!!!
macros bm
Καλημέρα!
If I use the package bm
, I have problems with the newcommand{hm}{mathop{}!text{ημ} mathop{}!}
.
N.B.: I don't have problems with the mathop{}!text{ημ} mathop{}!
, but with the newcommand{hm}{mathop{}!text{ημ} mathop{}!}
As I 'm saying, the strange is that the code:
documentclass[a4paper,11pt]{book}
usepackage{amsmath, amsthm, amssymb, amsfonts}
usepackage{mathtools}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{cmbright}
usepackage{kerkis}
usepackage{bm}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
end{document}
is OK, but this code:
documentclass[a4paper,11pt]{book}
usepackage{amsmath, amsthm, amssymb, amsfonts}
usepackage{mathtools}
usepackage[english,greek]{babel}
usepackage[utf8]{inputenc}
usepackage{cmbright}
usepackage{kerkis}
usepackage{bm}
newcommand{hm}{mathop{}!text{ημ} mathop{}!}
begin{document}
$hm x$
end{document}
get's me an error.
What is happening?
Ευχαριστώ εκ των προτέρων!!!
macros bm
macros bm
asked Dec 13 '18 at 8:26
Kώστας Κούδας
1187
1187
Please note thattext
is never a good choice for something like this. It typesets in italic if the surrounding context is italic (for example inside a theorem construction), that was probably not what was intended. Sadly many users misuse thetext
command.
– daleif
Dec 13 '18 at 11:39
I have to use the greek characters "ημ" in math mode (ημΑ=sinA). So I must usetext
command. Or not?
– Kώστας Κούδας
Dec 17 '18 at 6:55
add a comment |
Please note thattext
is never a good choice for something like this. It typesets in italic if the surrounding context is italic (for example inside a theorem construction), that was probably not what was intended. Sadly many users misuse thetext
command.
– daleif
Dec 13 '18 at 11:39
I have to use the greek characters "ημ" in math mode (ημΑ=sinA). So I must usetext
command. Or not?
– Kώστας Κούδας
Dec 17 '18 at 6:55
Please note that
text
is never a good choice for something like this. It typesets in italic if the surrounding context is italic (for example inside a theorem construction), that was probably not what was intended. Sadly many users misuse the text
command.– daleif
Dec 13 '18 at 11:39
Please note that
text
is never a good choice for something like this. It typesets in italic if the surrounding context is italic (for example inside a theorem construction), that was probably not what was intended. Sadly many users misuse the text
command.– daleif
Dec 13 '18 at 11:39
I have to use the greek characters "ημ" in math mode (ημΑ=sinA). So I must use
text
command. Or not?– Kώστας Κούδας
Dec 17 '18 at 6:55
I have to use the greek characters "ημ" in math mode (ημΑ=sinA). So I must use
text
command. Or not?– Kώστας Κούδας
Dec 17 '18 at 6:55
add a comment |
2 Answers
2
active
oldest
votes
You could do
renewcommand{hm}{...}
but there's a glitch: when bm
does its work, it redefines hm
. So hm x
would produce the expected result, but bm{hm x}
wouldn't and just render the “x”.
I suggest to use a different name, such as hmop
.
I also suggest a different way to define such operators:
documentclass[a4paper,11pt]{book}
usepackage{cmbright}
usepackage{kerkis}
usepackage[utf8]{inputenc}
usepackage[english,greek]{babel}
usepackage{amsmath}
usepackage{bm}
DeclareMathAlphabet{mathgreek}{LGR}{maksf}{m}{n}
SetMathAlphabet{mathgreek}{bold}{LGR}{maksf}{bx}{n}
makeatletter
newcommand{DeclareGreekMathOperator}[2]{%
begingroupletIeCtranslate@greek
protected@edef@temp{#2}%
edefx{endgroup
unexpanded{DeclareMathOperator{#1}}%
{noexpandmathgreek{unexpandedexpandafter{@temp}}}%
}x
}
deftranslate@greek#1{csname LGRstring#1endcsname}
makeatother
DeclareGreekMathOperator{hmop}{ημ}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
$hmop x$
$bm{hmop x}$
end{document}
Where's the advantage in such a complicated definition? Try your code in an italics context:
textit{abc $mathop{}!text{ημ} mathop{}! x$ def}
would print ημ in italics as well.
Very helpful!!! Thanks a lot!!!
– Kώστας Κούδας
Dec 13 '18 at 11:32
add a comment |
The hm
macro is defined by package bm
:
If there is a 'heavy' math version defined (usually accessed by a
user-commandheavymath
) then a similar commandhm
is defined
which access these 'ultra bold' fonts.
If you don't need it then use renewcommand{hm}{patati patata}
.
However,bm{hm x}
will not work.
– egreg
Dec 13 '18 at 11:02
@egreg thanks (of course I was not aware ofbm
redefininghm
)
– jfbu
Dec 13 '18 at 15:08
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%2f464653%2fbm-problem-with-newcommand%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You could do
renewcommand{hm}{...}
but there's a glitch: when bm
does its work, it redefines hm
. So hm x
would produce the expected result, but bm{hm x}
wouldn't and just render the “x”.
I suggest to use a different name, such as hmop
.
I also suggest a different way to define such operators:
documentclass[a4paper,11pt]{book}
usepackage{cmbright}
usepackage{kerkis}
usepackage[utf8]{inputenc}
usepackage[english,greek]{babel}
usepackage{amsmath}
usepackage{bm}
DeclareMathAlphabet{mathgreek}{LGR}{maksf}{m}{n}
SetMathAlphabet{mathgreek}{bold}{LGR}{maksf}{bx}{n}
makeatletter
newcommand{DeclareGreekMathOperator}[2]{%
begingroupletIeCtranslate@greek
protected@edef@temp{#2}%
edefx{endgroup
unexpanded{DeclareMathOperator{#1}}%
{noexpandmathgreek{unexpandedexpandafter{@temp}}}%
}x
}
deftranslate@greek#1{csname LGRstring#1endcsname}
makeatother
DeclareGreekMathOperator{hmop}{ημ}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
$hmop x$
$bm{hmop x}$
end{document}
Where's the advantage in such a complicated definition? Try your code in an italics context:
textit{abc $mathop{}!text{ημ} mathop{}! x$ def}
would print ημ in italics as well.
Very helpful!!! Thanks a lot!!!
– Kώστας Κούδας
Dec 13 '18 at 11:32
add a comment |
You could do
renewcommand{hm}{...}
but there's a glitch: when bm
does its work, it redefines hm
. So hm x
would produce the expected result, but bm{hm x}
wouldn't and just render the “x”.
I suggest to use a different name, such as hmop
.
I also suggest a different way to define such operators:
documentclass[a4paper,11pt]{book}
usepackage{cmbright}
usepackage{kerkis}
usepackage[utf8]{inputenc}
usepackage[english,greek]{babel}
usepackage{amsmath}
usepackage{bm}
DeclareMathAlphabet{mathgreek}{LGR}{maksf}{m}{n}
SetMathAlphabet{mathgreek}{bold}{LGR}{maksf}{bx}{n}
makeatletter
newcommand{DeclareGreekMathOperator}[2]{%
begingroupletIeCtranslate@greek
protected@edef@temp{#2}%
edefx{endgroup
unexpanded{DeclareMathOperator{#1}}%
{noexpandmathgreek{unexpandedexpandafter{@temp}}}%
}x
}
deftranslate@greek#1{csname LGRstring#1endcsname}
makeatother
DeclareGreekMathOperator{hmop}{ημ}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
$hmop x$
$bm{hmop x}$
end{document}
Where's the advantage in such a complicated definition? Try your code in an italics context:
textit{abc $mathop{}!text{ημ} mathop{}! x$ def}
would print ημ in italics as well.
Very helpful!!! Thanks a lot!!!
– Kώστας Κούδας
Dec 13 '18 at 11:32
add a comment |
You could do
renewcommand{hm}{...}
but there's a glitch: when bm
does its work, it redefines hm
. So hm x
would produce the expected result, but bm{hm x}
wouldn't and just render the “x”.
I suggest to use a different name, such as hmop
.
I also suggest a different way to define such operators:
documentclass[a4paper,11pt]{book}
usepackage{cmbright}
usepackage{kerkis}
usepackage[utf8]{inputenc}
usepackage[english,greek]{babel}
usepackage{amsmath}
usepackage{bm}
DeclareMathAlphabet{mathgreek}{LGR}{maksf}{m}{n}
SetMathAlphabet{mathgreek}{bold}{LGR}{maksf}{bx}{n}
makeatletter
newcommand{DeclareGreekMathOperator}[2]{%
begingroupletIeCtranslate@greek
protected@edef@temp{#2}%
edefx{endgroup
unexpanded{DeclareMathOperator{#1}}%
{noexpandmathgreek{unexpandedexpandafter{@temp}}}%
}x
}
deftranslate@greek#1{csname LGRstring#1endcsname}
makeatother
DeclareGreekMathOperator{hmop}{ημ}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
$hmop x$
$bm{hmop x}$
end{document}
Where's the advantage in such a complicated definition? Try your code in an italics context:
textit{abc $mathop{}!text{ημ} mathop{}! x$ def}
would print ημ in italics as well.
You could do
renewcommand{hm}{...}
but there's a glitch: when bm
does its work, it redefines hm
. So hm x
would produce the expected result, but bm{hm x}
wouldn't and just render the “x”.
I suggest to use a different name, such as hmop
.
I also suggest a different way to define such operators:
documentclass[a4paper,11pt]{book}
usepackage{cmbright}
usepackage{kerkis}
usepackage[utf8]{inputenc}
usepackage[english,greek]{babel}
usepackage{amsmath}
usepackage{bm}
DeclareMathAlphabet{mathgreek}{LGR}{maksf}{m}{n}
SetMathAlphabet{mathgreek}{bold}{LGR}{maksf}{bx}{n}
makeatletter
newcommand{DeclareGreekMathOperator}[2]{%
begingroupletIeCtranslate@greek
protected@edef@temp{#2}%
edefx{endgroup
unexpanded{DeclareMathOperator{#1}}%
{noexpandmathgreek{unexpandedexpandafter{@temp}}}%
}x
}
deftranslate@greek#1{csname LGRstring#1endcsname}
makeatother
DeclareGreekMathOperator{hmop}{ημ}
begin{document}
$mathop{}!text{ημ} mathop{}! x$
$hmop x$
$bm{hmop x}$
end{document}
Where's the advantage in such a complicated definition? Try your code in an italics context:
textit{abc $mathop{}!text{ημ} mathop{}! x$ def}
would print ημ in italics as well.
answered Dec 13 '18 at 11:13
egreg
710k8618853171
710k8618853171
Very helpful!!! Thanks a lot!!!
– Kώστας Κούδας
Dec 13 '18 at 11:32
add a comment |
Very helpful!!! Thanks a lot!!!
– Kώστας Κούδας
Dec 13 '18 at 11:32
Very helpful!!! Thanks a lot!!!
– Kώστας Κούδας
Dec 13 '18 at 11:32
Very helpful!!! Thanks a lot!!!
– Kώστας Κούδας
Dec 13 '18 at 11:32
add a comment |
The hm
macro is defined by package bm
:
If there is a 'heavy' math version defined (usually accessed by a
user-commandheavymath
) then a similar commandhm
is defined
which access these 'ultra bold' fonts.
If you don't need it then use renewcommand{hm}{patati patata}
.
However,bm{hm x}
will not work.
– egreg
Dec 13 '18 at 11:02
@egreg thanks (of course I was not aware ofbm
redefininghm
)
– jfbu
Dec 13 '18 at 15:08
add a comment |
The hm
macro is defined by package bm
:
If there is a 'heavy' math version defined (usually accessed by a
user-commandheavymath
) then a similar commandhm
is defined
which access these 'ultra bold' fonts.
If you don't need it then use renewcommand{hm}{patati patata}
.
However,bm{hm x}
will not work.
– egreg
Dec 13 '18 at 11:02
@egreg thanks (of course I was not aware ofbm
redefininghm
)
– jfbu
Dec 13 '18 at 15:08
add a comment |
The hm
macro is defined by package bm
:
If there is a 'heavy' math version defined (usually accessed by a
user-commandheavymath
) then a similar commandhm
is defined
which access these 'ultra bold' fonts.
If you don't need it then use renewcommand{hm}{patati patata}
.
The hm
macro is defined by package bm
:
If there is a 'heavy' math version defined (usually accessed by a
user-commandheavymath
) then a similar commandhm
is defined
which access these 'ultra bold' fonts.
If you don't need it then use renewcommand{hm}{patati patata}
.
answered Dec 13 '18 at 8:34
jfbu
46.1k66148
46.1k66148
However,bm{hm x}
will not work.
– egreg
Dec 13 '18 at 11:02
@egreg thanks (of course I was not aware ofbm
redefininghm
)
– jfbu
Dec 13 '18 at 15:08
add a comment |
However,bm{hm x}
will not work.
– egreg
Dec 13 '18 at 11:02
@egreg thanks (of course I was not aware ofbm
redefininghm
)
– jfbu
Dec 13 '18 at 15:08
However,
bm{hm x}
will not work.– egreg
Dec 13 '18 at 11:02
However,
bm{hm x}
will not work.– egreg
Dec 13 '18 at 11:02
@egreg thanks (of course I was not aware of
bm
redefining hm
)– jfbu
Dec 13 '18 at 15:08
@egreg thanks (of course I was not aware of
bm
redefining hm
)– jfbu
Dec 13 '18 at 15:08
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%2f464653%2fbm-problem-with-newcommand%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
Please note that
text
is never a good choice for something like this. It typesets in italic if the surrounding context is italic (for example inside a theorem construction), that was probably not what was intended. Sadly many users misuse thetext
command.– daleif
Dec 13 '18 at 11:39
I have to use the greek characters "ημ" in math mode (ημΑ=sinA). So I must use
text
command. Or not?– Kώστας Κούδας
Dec 17 '18 at 6:55