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!!










share|improve this question




















  • 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










  • @siracusa that works in text mode! Good to know. I need it for post an answer regarding how to insert braces in math mode: I wanted to write in math mode and not in normal text :).
    – manooooh
    3 hours ago








  • 2




    “without loading any package” But you are loading amsmath!
    – Henri Menke
    2 hours ago






  • 1




    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
    1 hour ago















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!!










share|improve this question




















  • 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










  • @siracusa that works in text mode! Good to know. I need it for post an answer regarding how to insert braces in math mode: I wanted to write in math mode and not in normal text :).
    – manooooh
    3 hours ago








  • 2




    “without loading any package” But you are loading amsmath!
    – Henri Menke
    2 hours ago






  • 1




    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
    1 hour ago













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!!










share|improve this question















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago

























asked 3 hours ago









manooooh

7501213




7501213








  • 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










  • @siracusa that works in text mode! Good to know. I need it for post an answer regarding how to insert braces in math mode: I wanted to write in math mode and not in normal text :).
    – manooooh
    3 hours ago








  • 2




    “without loading any package” But you are loading amsmath!
    – Henri Menke
    2 hours ago






  • 1




    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
    1 hour ago














  • 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










  • @siracusa that works in text mode! Good to know. I need it for post an answer regarding how to insert braces in math mode: I wanted to write in math mode and not in normal text :).
    – manooooh
    3 hours ago








  • 2




    “without loading any package” But you are loading amsmath!
    – Henri Menke
    2 hours ago






  • 1




    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
    1 hour 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












@siracusa that works in text mode! Good to know. I need it for post an answer regarding how to insert braces in math mode: I wanted to write in math mode and not in normal text :).
– manooooh
3 hours ago






@siracusa that works in text mode! Good to know. I need it for post an answer regarding how to insert braces in math mode: I wanted to write in math mode and not in normal text :).
– manooooh
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




1




1




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
1 hour 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
1 hour ago










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}


enter image description here



Also works in MathJax. Live example: http://mathb.in/29559






share|improve this answer





















  • 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




    @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
    39 mins ago













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',
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
});


}
});














draft saved

draft discarded


















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

























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}


enter image description here



Also works in MathJax. Live example: http://mathb.in/29559






share|improve this answer





















  • 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




    @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
    39 mins ago

















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}


enter image description here



Also works in MathJax. Live example: http://mathb.in/29559






share|improve this answer





















  • 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




    @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
    39 mins ago















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}


enter image description here



Also works in MathJax. Live example: http://mathb.in/29559






share|improve this answer












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}


enter image description here



Also works in MathJax. Live example: http://mathb.in/29559







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 hours ago









Henri Menke

67.8k7150255




67.8k7150255












  • 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




    @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
    39 mins 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




    @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
    39 mins 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
39 mins 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
39 mins ago




















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

サソリ

広島県道265号伴広島線

Setup Asymptote in Texstudio