Entering mathematical statements using latex

In summary: Where bbcode tags are implemented on a forum, they are usually used for formatting of text, just as in this case.
  • #1
Adesh
735
191
TL;DR Summary
Why different sites use different codes?
I have been to other forum sites too where we need to encode a mathematical statement like this \(\displaystyle ...\) , some sites use $...$ before and after the mathematical things and some sites like this great forum use [itex]...[itex]. Why it this so? The latex software like Texstudio, Texmaker etc. uses $$ sign. Some sites (or apps) even use `...` thing, why is this and what's the difference between all these?
 
Physics news on Phys.org
  • #2
This is because we use MathJax which is slightly different than LaTeX. The main difference is ## = [itex] instead of $, and that not all LaTeX style files are included. Of course I cannot answer the question for other sites.
 
  • #3
fresh_42 said:
This is because we use MathJax which is slightly different than LaTeX. The main difference is ## = [itex] instead of $, and that not all LaTeX style files are included. Of course I cannot answer the question for other sites.
StackExchange too uses MathJax, but there you have to use $ for inline math. I believe (could be wrong) MathJax can can be configured to identify ## instead of $ as inline math.
Adesh said:
The latex software like Texstudio, Texmaker etc. uses $$ sign.
They use $ for inline math, and $$ for paragraph-style math.
 
  • #4
fresh_42 said:
This is because we use MathJax which is slightly different than LaTeX
What is the difference between Mathjax and Latex?
 
  • #6
  • #7
Adesh said:
Can you please tell me what are \(\displaystyle ...\) tags used for? Many old websites use this tag.
Different websites have different ways of implementing ##\LaTeX##. It is upto the website to decide how they want to trigger MathJax. Just like PF uses ##\text{##}## for inline ##\LaTeX##, some sites use \(\displaystyle ...\) tags. There is basically nothing more to explain.On a similar note, in PF, we can trigger monospace font using the BBCode [icode]. StackExchange, on the other hand, uses ```` characters to monospace font. This again depends on how the website wants to trigger the HTML tag <code>. Nothing more to explain.
 
  • Like
Likes Adesh
  • #8
Adesh said:
Can you please tell me what are \(\displaystyle ...\) tags used for? Many old websites use this tag.
Where bbcode tags are implemented on a bbs, typically they are used for triggering rendering of ##\LaTeX## code, just as PF uses##delimiters for that purpose.
 
  • Like
Likes Adesh

1. How do I enter fractions in LaTeX?

To enter a fraction in LaTeX, use the \frac command followed by the numerator in curly braces and the denominator in square brackets. For example, \frac{3}{4} would display as $\frac{3}{4}$.

2. How can I add superscripts and subscripts in mathematical statements?

To add a superscript, use the ^ symbol followed by the text you want to appear as the superscript. To add a subscript, use the _ symbol followed by the text you want to appear as the subscript. For example, x^2 would display as $x^2$, and x_i would display as $x_i$.

3. What is the difference between \displaystyle and \textstyle in LaTeX?

The \displaystyle command is used to display mathematical expressions in a larger font size, while \textstyle is used for inline mathematical expressions. For example, \displaystyle\sum_{i=1}^n x_i would display as $\displaystyle\sum_{i=1}^n x_i$, while $\textstyle\sum_{i=1}^n x_i$ would display as $\textstyle\sum_{i=1}^n x_i$.

4. How do I insert special symbols or characters in LaTeX?

To insert special symbols or characters, you can use the backslash (\) followed by the corresponding command. For example, \alpha would display as $\alpha$, and \rightarrow would display as $\rightarrow$. You can also use the \text command to insert text within a mathematical statement. For example, \text{if } x>0 would display as $\text{if } x>0$.

5. What is the purpose of curly braces in LaTeX?

Curly braces {} are used in LaTeX to group together multiple elements or expressions. They are especially useful when entering fractions, square roots, or other mathematical expressions with multiple parts. They are also used to indicate the scope of certain commands, such as \frac, \sum, and \int.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
275
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
20
Views
2K
  • Feedback and Announcements
Replies
1
Views
422
  • Science and Math Textbooks
Replies
28
Views
2K
Back
Top