How Do You Format Fractions in LaTeX?

  • Thread starter Thread starter NotMrX
  • Start date Start date
  • Tags Tags
    Numbers Writing
Click For Summary
To format fractions in LaTeX, use the command \frac{numerator}{denominator} without spaces. The discussion highlights confusion over the use of forward and backward slashes in LaTeX commands, emphasizing that only the backward slash is correct for commands. Users are encouraged to avoid copy-pasting fractions, as this can lead to formatting issues, particularly with subscripts. The original poster is experimenting with complex equations but is encountering errors due to incorrect command syntax. Proper understanding of LaTeX formatting is essential for achieving the desired mathematical presentation.
NotMrX
Messages
97
Reaction score
0
Hello,

How do you all make your numbers look so nice with a horizonatal line between the fraction? I tried inserting some from copy and paste and it lost all the subscripts. Is there a way to do this on a computer without saving capabilities?
 
Physics news on Phys.org
If you want to format a fraction, type in [ tex ]\frac{1}{2}[ /tex ], without the spaces, of course.

This ends up looking like \frac{1}{2}.
 
I was looking at the tutorial and it seemed that sometimes next to the tex it used forward slash and sometimes it used back slash. Does it make a difference?

I am just trying some stuff here:
\frac{1}{2}
\int
\intX^2dx
\lambda
 
I wrote the following without the space
[ tex]\int\int\frac{G\lambdaY}{\sqrt[3]{Y^2+(x-r)^2}}dx\lamda\dr[/tex]

this was the command I typed in trying to get if I is the integral sign
I I [G*(m/L)*Y/(Y^2+(x-r)^2)^(3/2)*dx*m/L*dr

I guess that is a long math sentence to start with but I don't see the error but the commands (backward slashes \) within themselves seem to mess up. I don't if it is possible to change the tutorial but it use both the forward and backward slash in [ /tex] and there seems to be an extra slash in the fraction command.

Here is what was produced from my latex entry:
\int\int\frac{G\lambdaY}{\sqrt[3]{Y^2+(x-r)^2}}dx\lamda\dr
 

Similar threads

  • · Replies 64 ·
3
Replies
64
Views
6K
  • · Replies 10 ·
Replies
10
Views
904
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 11 ·
Replies
11
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 6 ·
Replies
6
Views
584
Replies
8
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
13K