How to write symbol in math mode in LaTeX/MathJax?
up vote
1
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
1
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
3 hours ago
4
backslash
in math mode.
– CarLaTeX
3 hours ago
2
“without loading any package” But you are loadingamsmath
!
– Henri Menke
2 hours ago
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
2 hours ago
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
21 mins ago
|
show 10 more comments
up vote
1
down vote
favorite
up vote
1
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 2 hours ago
asked 3 hours ago
manooooh
7551213
7551213
2
Trytextbackslash
in text mode. But what do you need that symbol for?
– siracusa
3 hours ago
4
backslash
in math mode.
– CarLaTeX
3 hours ago
2
“without loading any package” But you are loadingamsmath
!
– Henri Menke
2 hours ago
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
2 hours ago
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
21 mins ago
|
show 10 more comments
2
Trytextbackslash
in text mode. But what do you need that symbol for?
– siracusa
3 hours ago
4
backslash
in math mode.
– CarLaTeX
3 hours ago
2
“without loading any package” But you are loadingamsmath
!
– Henri Menke
2 hours ago
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
2 hours ago
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
21 mins ago
2
2
Try
textbackslash
in text mode. But what do you need that symbol for?– siracusa
3 hours ago
Try
textbackslash
in text mode. But what do you need that symbol for?– siracusa
3 hours ago
4
4
backslash
in math mode.– CarLaTeX
3 hours ago
backslash
in math mode.– CarLaTeX
3 hours ago
2
2
“without loading any package” But you are loading
amsmath
!– Henri Menke
2 hours ago
“without loading any package” But you are loading
amsmath
!– Henri Menke
2 hours ago
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
2 hours ago
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
2 hours ago
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
21 mins ago
@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
21 mins ago
|
show 10 more comments
1 Answer
1
active
oldest
votes
up vote
4
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
2 hours ago
2
@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
1 hour ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
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
2 hours ago
2
@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
1 hour ago
add a comment |
up vote
4
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
2 hours ago
2
@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
1 hour ago
add a comment |
up vote
4
down vote
accepted
up vote
4
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 2 hours ago
Henri Menke
67.8k7150255
67.8k7150255
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
2 hours ago
2
@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
1 hour ago
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
2 hours ago
2
@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
1 hour ago
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
2 hours ago
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
2 hours ago
2
2
@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
1 hour ago
@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
1 hour ago
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
3 hours ago
4
backslash
in math mode.– CarLaTeX
3 hours ago
2
“without loading any package” But you are loading
amsmath
!– Henri Menke
2 hours ago
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
2 hours ago
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
21 mins ago