Latex Code for One Set Minus Another .... .... A\B .... ....

In summary: So \K is not a valid command.In summary, the conversation discusses a problem with using the backslash character in LaTeX code and the correct way to write it. The conversation also mentions a tool called "Detexify" that helps find the correct commands for special characters in LaTeX.
  • #1
Math Amateur
Gold Member
MHB
3,990
48
Recently I posted the following text on the Analysis forum ..." ... ... In order to demonstrate that \(\displaystyle K\) is closed, we prove that \(\displaystyle \mathbb{R}^n\K\) is open. Indeed, choose \(\displaystyle y \notin K\) and define \(\displaystyle O_j = \{ x \in \mathbb{R}^n \ \mid \ \mid \mid x - y \mid \mid \gt \frac{1}{j} \}\) for \(\displaystyle j \in \mathbb{N}\). ... ... "... and (as I did above) got a red \K in \mathbb{R}^n\K presumably because I'm misusing a special character \ in the code ...

What is wrong with what I've done and how do I correct it?

Further, how does one correctly write Latex code for one set minus another as in A\B?

Peter
 
Physics news on Phys.org
  • #2
This works, although there might be a better solution...

\mathbb{R}^n\text{\\}K

gives:

\(\displaystyle \mathbb{R}^n\text{\\}K\)
 
  • #3
MarkFL said:
This works, although there might be a better solution...

\mathbb{R}^n\text{\\}K

gives:

\(\displaystyle \mathbb{R}^n\text{\\}K\)
Thanks Mark ... but seems strange to me that two \s are required in text{ \\ } ... but then ... hey ... that's the rules of the code :)

Thanks again ...

Peter
 
  • #4
Peter said:
Thanks Mark ... but seems strange to me that two \s are required in text{ \\ } ... but then ... hey ... that's the rules of the code :)

Thanks again ...

Peter

Yeah, you have to escape the escape character to get a literal character. :)

You can also use:

\mathbb{R}^n\backslash K

or:

\mathbb{R}^n\setminus K (this one has more padding to the left and right of the slash)
 
  • #5
I also want to point out that in the "MHB Widgets" block to the right of the editor is "Detexify" listed as the second entry in the list, and clicking that will popup a window into which you can draw a character you wish to use, and it will give you in most cases several options to try. (Yes)
 
  • #6
MarkFL said:
\mathbb{R}^n\setminus K (this one has more padding to the left and right of the slash)
This is the correct solution.

Peter said:
What is wrong with what I've done and how do I correct it?
The command \K is undefined. TeX commands usually consist of a backslash followed by letters.
 

1. What is the purpose of using "Latex Code for One Set Minus Another" in scientific research?

The purpose of using "Latex Code for One Set Minus Another" is to represent mathematical equations and expressions in a clear and consistent manner. It is commonly used in scientific research to present data and findings in a professional and organized way.

2. How do you write "A\B" in Latex code?

To write "A\B" in Latex code, you would use the following syntax: $A\setminus B$. This will produce the symbol for set minus, which is a backslash within a set of parentheses.

3. Can you use "Latex Code for One Set Minus Another" for other mathematical operations besides subtraction?

Yes, "Latex Code for One Set Minus Another" can be used for other mathematical operations such as addition, multiplication, division, and more. It is a versatile tool for representing various mathematical concepts.

4. Are there any shortcuts or commands for "Latex Code for One Set Minus Another"?

Yes, there are various shortcuts and commands that can be used for "Latex Code for One Set Minus Another". These include \setminus, \smallsetminus, \backslash, and \smallbackslash. These commands can be used to produce different symbols for set minus.

5. Is there a recommended way to format "Latex Code for One Set Minus Another" in a research paper?

It is recommended to use the \setminus command for "Latex Code for One Set Minus Another" in a research paper, as it produces a clear and professional-looking symbol for set minus. Additionally, it is important to follow proper formatting guidelines and ensure that the code is properly aligned and indented to improve readability.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
857
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
3K
Replies
11
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
933
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
279
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
283
Back
Top