How to write symbol in math mode in LaTeX/MathJax?
up vote
3
down vote
favorite
How can we insert the symbol in math mode for LaTeX and MathJax without loading any package that is required to achieve this symbol?
I tried
documentclass{article}
usepackage{amsmath}
begin{document}
$$
end{document}
but the program gives errors, also with ${}$
, text{}
etc. fails. In MathJax I use $$
and it produces error.
The context of the problem is I want to represent the (missing) symbol inside a formula (not in SE). The solution is add that symbol, so I want to alert the user "Hey, you forgot to add
$$
in ${1,2,3}$
. It should be ${1,2,3}$
" (of course the site does not have single quotes (`)).
Thanks!!
math-mode symbols
|
show 10 more comments
up vote
3
down vote
favorite
How can we insert the symbol in math mode for LaTeX and MathJax without loading any package that is required to achieve this symbol?
I tried
documentclass{article}
usepackage{amsmath}
begin{document}
$$
end{document}
but the program gives errors, also with ${}$
, text{}
etc. fails. In MathJax I use $$
and it produces error.
The context of the problem is I want to represent the (missing) symbol inside a formula (not in SE). The solution is add that symbol, so I want to alert the user "Hey, you forgot to add
$$
in ${1,2,3}$
. It should be ${1,2,3}$
" (of course the site does not have single quotes (`)).
Thanks!!
math-mode symbols
2
Trytextbackslash
in text mode. But what do you need that symbol for?
– siracusa
Nov 30 at 4:00
4
backslash
in math mode.
– CarLaTeX
Nov 30 at 4:00
2
“without loading any package” But you are loadingamsmath
!
– Henri Menke
Nov 30 at 4:45
2
Reading your comment to Henri's answer, I think it would be better to add to your question why you want to use a backslash character in math mode. Displaying escaped braces in math mode seems really uncommon to me, so perhaps there is a completely different but better solution to your actual problem (I suspect it has to do with displaying source code)
– siracusa
Nov 30 at 5:21
1
@manooooh I would use a code block in HTML (or whatever output format you're using): anything except a LaTeX/MathJax formula (because you want to show the literal raw text that is to be input, not the result of treating it as a formula).
– ShreevatsaR
Nov 30 at 7:19
|
show 10 more comments
up vote
3
down vote
favorite
up vote
3
down vote
favorite
How can we insert the symbol in math mode for LaTeX and MathJax without loading any package that is required to achieve this symbol?
I tried
documentclass{article}
usepackage{amsmath}
begin{document}
$$
end{document}
but the program gives errors, also with ${}$
, text{}
etc. fails. In MathJax I use $$
and it produces error.
The context of the problem is I want to represent the (missing) symbol inside a formula (not in SE). The solution is add that symbol, so I want to alert the user "Hey, you forgot to add
$$
in ${1,2,3}$
. It should be ${1,2,3}$
" (of course the site does not have single quotes (`)).
Thanks!!
math-mode symbols
How can we insert the symbol in math mode for LaTeX and MathJax without loading any package that is required to achieve this symbol?
I tried
documentclass{article}
usepackage{amsmath}
begin{document}
$$
end{document}
but the program gives errors, also with ${}$
, text{}
etc. fails. In MathJax I use $$
and it produces error.
The context of the problem is I want to represent the (missing) symbol inside a formula (not in SE). The solution is add that symbol, so I want to alert the user "Hey, you forgot to add
$$
in ${1,2,3}$
. It should be ${1,2,3}$
" (of course the site does not have single quotes (`)).
Thanks!!
math-mode symbols
math-mode symbols
edited Nov 30 at 5:33
asked Nov 30 at 3:47
manooooh
8801315
8801315
2
Trytextbackslash
in text mode. But what do you need that symbol for?
– siracusa
Nov 30 at 4:00
4
backslash
in math mode.
– CarLaTeX
Nov 30 at 4:00
2
“without loading any package” But you are loadingamsmath
!
– Henri Menke
Nov 30 at 4:45
2
Reading your comment to Henri's answer, I think it would be better to add to your question why you want to use a backslash character in math mode. Displaying escaped braces in math mode seems really uncommon to me, so perhaps there is a completely different but better solution to your actual problem (I suspect it has to do with displaying source code)
– siracusa
Nov 30 at 5:21
1
@manooooh I would use a code block in HTML (or whatever output format you're using): anything except a LaTeX/MathJax formula (because you want to show the literal raw text that is to be input, not the result of treating it as a formula).
– ShreevatsaR
Nov 30 at 7:19
|
show 10 more comments
2
Trytextbackslash
in text mode. But what do you need that symbol for?
– siracusa
Nov 30 at 4:00
4
backslash
in math mode.
– CarLaTeX
Nov 30 at 4:00
2
“without loading any package” But you are loadingamsmath
!
– Henri Menke
Nov 30 at 4:45
2
Reading your comment to Henri's answer, I think it would be better to add to your question why you want to use a backslash character in math mode. Displaying escaped braces in math mode seems really uncommon to me, so perhaps there is a completely different but better solution to your actual problem (I suspect it has to do with displaying source code)
– siracusa
Nov 30 at 5:21
1
@manooooh I would use a code block in HTML (or whatever output format you're using): anything except a LaTeX/MathJax formula (because you want to show the literal raw text that is to be input, not the result of treating it as a formula).
– ShreevatsaR
Nov 30 at 7:19
2
2
Try
textbackslash
in text mode. But what do you need that symbol for?– siracusa
Nov 30 at 4:00
Try
textbackslash
in text mode. But what do you need that symbol for?– siracusa
Nov 30 at 4:00
4
4
backslash
in math mode.– CarLaTeX
Nov 30 at 4:00
backslash
in math mode.– CarLaTeX
Nov 30 at 4:00
2
2
“without loading any package” But you are loading
amsmath
!– Henri Menke
Nov 30 at 4:45
“without loading any package” But you are loading
amsmath
!– Henri Menke
Nov 30 at 4:45
2
2
Reading your comment to Henri's answer, I think it would be better to add to your question why you want to use a backslash character in math mode. Displaying escaped braces in math mode seems really uncommon to me, so perhaps there is a completely different but better solution to your actual problem (I suspect it has to do with displaying source code)
– siracusa
Nov 30 at 5:21
Reading your comment to Henri's answer, I think it would be better to add to your question why you want to use a backslash character in math mode. Displaying escaped braces in math mode seems really uncommon to me, so perhaps there is a completely different but better solution to your actual problem (I suspect it has to do with displaying source code)
– siracusa
Nov 30 at 5:21
1
1
@manooooh I would use a code block in HTML (or whatever output format you're using): anything except a LaTeX/MathJax formula (because you want to show the literal raw text that is to be input, not the result of treating it as a formula).
– ShreevatsaR
Nov 30 at 7:19
@manooooh I would use a code block in HTML (or whatever output format you're using): anything except a LaTeX/MathJax formula (because you want to show the literal raw text that is to be input, not the result of treating it as a formula).
– ShreevatsaR
Nov 30 at 7:19
|
show 10 more comments
1 Answer
1
active
oldest
votes
up vote
7
down vote
accepted
You probably want to use the backslash to exclude elements from a set. To this end use setminus
. To get the set of all integers without zero, you'd write
documentclass{article}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
$mathbb{Z} setminus { 0 }$
end{document}
Also works in MathJax. Live example: http://mathb.in/29559
I was aware ofsetminus
. As I said in comments, the symbol is for represent the{}
) but I wanted to display it in math mode, so I think the appropiate symbol isbackslash
.
– manooooh
Nov 30 at 5:01
3
@manooooh - You wrote, "I think the appropriate symbol isbackslash
". That's not quite right, sincesetminus
has math type "mathbin" ("binary operator"), whereasbackslash
has math type "mathord" ("ordinary"). In order to get the typographically proper amount of spacing around the backslash character, what you would need to write ismathbin{backslash}
.
– Mico
Nov 30 at 6:36
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
accepted
You probably want to use the backslash to exclude elements from a set. To this end use setminus
. To get the set of all integers without zero, you'd write
documentclass{article}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
$mathbb{Z} setminus { 0 }$
end{document}
Also works in MathJax. Live example: http://mathb.in/29559
I was aware ofsetminus
. As I said in comments, the symbol is for represent the{}
) but I wanted to display it in math mode, so I think the appropiate symbol isbackslash
.
– manooooh
Nov 30 at 5:01
3
@manooooh - You wrote, "I think the appropriate symbol isbackslash
". That's not quite right, sincesetminus
has math type "mathbin" ("binary operator"), whereasbackslash
has math type "mathord" ("ordinary"). In order to get the typographically proper amount of spacing around the backslash character, what you would need to write ismathbin{backslash}
.
– Mico
Nov 30 at 6:36
add a comment |
up vote
7
down vote
accepted
You probably want to use the backslash to exclude elements from a set. To this end use setminus
. To get the set of all integers without zero, you'd write
documentclass{article}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
$mathbb{Z} setminus { 0 }$
end{document}
Also works in MathJax. Live example: http://mathb.in/29559
I was aware ofsetminus
. As I said in comments, the symbol is for represent the{}
) but I wanted to display it in math mode, so I think the appropiate symbol isbackslash
.
– manooooh
Nov 30 at 5:01
3
@manooooh - You wrote, "I think the appropriate symbol isbackslash
". That's not quite right, sincesetminus
has math type "mathbin" ("binary operator"), whereasbackslash
has math type "mathord" ("ordinary"). In order to get the typographically proper amount of spacing around the backslash character, what you would need to write ismathbin{backslash}
.
– Mico
Nov 30 at 6:36
add a comment |
up vote
7
down vote
accepted
up vote
7
down vote
accepted
You probably want to use the backslash to exclude elements from a set. To this end use setminus
. To get the set of all integers without zero, you'd write
documentclass{article}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
$mathbb{Z} setminus { 0 }$
end{document}
Also works in MathJax. Live example: http://mathb.in/29559
You probably want to use the backslash to exclude elements from a set. To this end use setminus
. To get the set of all integers without zero, you'd write
documentclass{article}
usepackage{amsmath}
usepackage{amssymb}
begin{document}
$mathbb{Z} setminus { 0 }$
end{document}
Also works in MathJax. Live example: http://mathb.in/29559
answered Nov 30 at 4:43
Henri Menke
68.3k7152255
68.3k7152255
I was aware ofsetminus
. As I said in comments, the symbol is for represent the{}
) but I wanted to display it in math mode, so I think the appropiate symbol isbackslash
.
– manooooh
Nov 30 at 5:01
3
@manooooh - You wrote, "I think the appropriate symbol isbackslash
". That's not quite right, sincesetminus
has math type "mathbin" ("binary operator"), whereasbackslash
has math type "mathord" ("ordinary"). In order to get the typographically proper amount of spacing around the backslash character, what you would need to write ismathbin{backslash}
.
– Mico
Nov 30 at 6:36
add a comment |
I was aware ofsetminus
. As I said in comments, the symbol is for represent the{}
) but I wanted to display it in math mode, so I think the appropiate symbol isbackslash
.
– manooooh
Nov 30 at 5:01
3
@manooooh - You wrote, "I think the appropriate symbol isbackslash
". That's not quite right, sincesetminus
has math type "mathbin" ("binary operator"), whereasbackslash
has math type "mathord" ("ordinary"). In order to get the typographically proper amount of spacing around the backslash character, what you would need to write ismathbin{backslash}
.
– Mico
Nov 30 at 6:36
I was aware of
setminus
. As I said in comments, the symbol is for represent the
required to write braces (here {}
) but I wanted to display it in math mode, so I think the appropiate symbol is backslash
.– manooooh
Nov 30 at 5:01
I was aware of
setminus
. As I said in comments, the symbol is for represent the
required to write braces (here {}
) but I wanted to display it in math mode, so I think the appropiate symbol is backslash
.– manooooh
Nov 30 at 5:01
3
3
@manooooh - You wrote, "I think the appropriate symbol is
backslash
". That's not quite right, since setminus
has math type "mathbin" ("binary operator"), whereas backslash
has math type "mathord" ("ordinary"). In order to get the typographically proper amount of spacing around the backslash character, what you would need to write is mathbin{backslash}
.– Mico
Nov 30 at 6:36
@manooooh - You wrote, "I think the appropriate symbol is
backslash
". That's not quite right, since setminus
has math type "mathbin" ("binary operator"), whereas backslash
has math type "mathord" ("ordinary"). In order to get the typographically proper amount of spacing around the backslash character, what you would need to write is mathbin{backslash}
.– Mico
Nov 30 at 6:36
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%2f462507%2fhow-to-write-symbol-in-math-mode-in-latex-mathjax%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
Try
textbackslash
in text mode. But what do you need that symbol for?– siracusa
Nov 30 at 4:00
4
backslash
in math mode.– CarLaTeX
Nov 30 at 4:00
2
“without loading any package” But you are loading
amsmath
!– Henri Menke
Nov 30 at 4:45
2
Reading your comment to Henri's answer, I think it would be better to add to your question why you want to use a backslash character in math mode. Displaying escaped braces in math mode seems really uncommon to me, so perhaps there is a completely different but better solution to your actual problem (I suspect it has to do with displaying source code)
– siracusa
Nov 30 at 5:21
1
@manooooh I would use a code block in HTML (or whatever output format you're using): anything except a LaTeX/MathJax formula (because you want to show the literal raw text that is to be input, not the result of treating it as a formula).
– ShreevatsaR
Nov 30 at 7:19