How to write equations in a post?

  • Thread starter jacdiam89
  • Start date
In summary: I think a good way to do this is to create a new thread specifically for "how to latex" and link it from here. That way people who are looking for more detail wouldn't have to wade through 49 pages of old, irrelevant information.
  • #1
jacdiam89
5
1
Hello! I'm new here, and i would like to konw how to write an equation in my post. For example, the Freidmann equation. Do i need a particular software or there is a function to do it while I'm writing the post in the forum? Wich are the steps? Thank you
Jacopo

(sorry for my italianenglish, i will improve writing here :) )
 
  • Like
Likes Riotto
Physics news on Phys.org
  • #3
Ok thank you, now i will try to write the Friedmann equation...
 
  • #4
Oh, good, I've found the [itex]\Sigma[/itex] button above the text box. When i press this button a box appears with all the symbols. Problem solved!

[itex](\frac{\dot{a}}{a})^{2}=(H_{0})^{2}[ \Omega_{0,r}(\frac{a}{a_{0}})^{-4}+\Omega_{0,m}(\frac{a}{a_{0}})^{-3}+(1-\Omega_{0})(\frac{a}{a_{0}})^{2}+\Omega_{\Lambda}][/itex]

Et voilà, thank you again.

Jacopo
 
  • #5
Glad you found how to do it. FYI, we often point new members who ask this question to the following thread:

https://www.physicsforums.com/showthread.php?t=386951
 
Last edited by a moderator:
  • #6
Redbelly98 said:
Glad you found how to do it. FYI, we often point new members who ask this question to the following thread:

https://www.physicsforums.com/showthread.php?t=386951
That thread could use some cleanup. Borek's post about the old preview bug should be deleted. It's weird to explain multiple lines by linking to page 19 of 49 of an old locked thread filled with lots of irrelevant information and broken LaTex code. (I would just link to a web page that explains the align environment). Those are just examples. I'm reluctant to link to this thread myself because of all the problems with it.

The thread should at least explain the difference between itex and tex tags (you could e.g. use my example below), link to the comprehensive LaTeX symbol list, mention the 50 character bug, mention the quick edit refresh bug, and mention that the best way to learn is to click on the quote button every time you see a post that makes you think "I wonder how he did that". (OK, I see now that the "how to latex" document actually does that last thing).

Example of itex vs tex: The function [itex]\sin:\mathbb R\rightarrow\mathbb R[/itex] is defined by [tex]\sin x=\sum_{n=0}^\infty \frac{(-1)^n}{(2n+1)!}x^{2n+1},[/tex] for all [itex]x\in\mathbb R[/itex]. Note that the comma must be placed inside the tex tags, and that you shouldn't type any line breaks.

The "how to latex" pdf should also be updated. It doesn't mention itex tags, fails to mention that \\ only works in specific environments (like align), falsely claims that tex tags are equivalent to "dollar sign, LaTeX code, dollar sign" in a LaTeX document. (This would give you a result equivalent to itex. You need two dollar signs before and after the code to get a result equivalent to tex). The pdf explains some things in awkward ways. For example matrices: [tex]\Lambda=\gamma\begin{pmatrix}1 & -v\\ -v & 1\end{pmatrix}[/tex] I also think people would prefer to use the cases environment instead of arrays: [tex]\chi_{\mathbb Q}(x)=\begin{cases}1 &\text{if }x\in\mathbb Q\\ 0 &\text{if }x\notin\mathbb Q.\end{cases}[/tex] The displaystyle command is explained badly. It's used to prevent LaTeX from formatting the math the way it normally would when the math image is to appear on a line that also includes text. Compare [itex]\sum_{k=0}^n x_k[/itex] to [itex]{\displaystyle \sum_{k=0}^n x_k}[/itex]. The latter code includes a "displaystyle". Note the positions of the curly brackets. They don't go where you'd normally put them. (Compare it with the source code for this image: [itex]\sqrt{x^2}[/itex]).
 
Last edited by a moderator:
  • #7
I deleted Borek's post. The thread was originally meant to direct people to other areas of the forum that explained things in more detail. At some point I added a simple example to the post, so that people completely new to LaTeX would have a starting point.

I agree that a cleanup of the detailed how-to stuff would be a big help.
 

1. How do I format equations in a post?

To format equations in a post, you can use LaTeX or MathJax. These are both typesetting systems that allow you to write mathematical equations using specific syntax. You can then either embed the equation or use a plugin to display it properly on your post.

2. Do I need to know LaTeX or MathJax to write equations in a post?

No, you do not need to know LaTeX or MathJax in order to write equations in a post. There are several plugins and tools available that allow you to input equations using a graphical interface, without the need for any coding or syntax knowledge.

3. How can I include mathematical symbols in my equations?

To include mathematical symbols in your equations, you can use the LaTeX or MathJax syntax. These systems have a wide range of symbols and functions that you can use to write equations. You can also search for a specific symbol online and copy and paste it into your equation.

4. Can I write equations in different languages?

Yes, you can write equations in different languages using the LaTeX or MathJax syntax. These systems support multiple languages and have specific commands for writing equations in different languages. However, you may need to install additional packages or plugins to enable this functionality.

5. How do I align equations in my post?

To align equations in your post, you can use the align environment in LaTeX or the align attribute in MathJax. This allows you to specify how you want your equations to be aligned, whether it's left, right, or centered. You can also use additional commands to adjust the spacing and formatting of your equations.

Similar threads

  • Feedback and Announcements
Replies
5
Views
1K
  • Feedback and Announcements
Replies
2
Views
1K
  • Feedback and Announcements
Replies
18
Views
1K
  • Feedback and Announcements
Replies
14
Views
835
  • Feedback and Announcements
Replies
20
Views
2K
  • Feedback and Announcements
Replies
9
Views
2K
  • Feedback and Announcements
Replies
5
Views
1K
  • Feedback and Announcements
Replies
16
Views
530
  • STEM Career Guidance
Replies
3
Views
1K
Replies
1
Views
46
Back
Top