Use of Latex

I need to show this in Latex
\(\displaystyle
\begin{tabular}{|1|r|r|r|}
\hline
Number & Log \line
173.8 & 2.2400 & 2.2400
(14.7)^2. 1.1673×2 + 2.3346 \\hline
Numerator \rightarrow & 4.5746 &
0.4166
4.5746 & 4.5746 \\\hline
2.61
Denominator /rightarrow & 0.4166×3 & 1.2498 & \\\hline
\end {tabular}\) That is how far I can go. Could somebody help me please?
 

Attachments

  • IMG_20220807_155509.jpg
    IMG_20220807_155509.jpg
    429.9 KB · Views: 3
I need to show this in Latex
\(\displaystyle
\begin{tabular}{|1|r|r|r|}
\hline
Number & Log \line
173.8 & 2.2400 & 2.2400
(14.7)^2. 1.1673×2 + 2.3346 \\hline
Numerator \rightarrow & 4.5746 &
0.4166
4.5746 & 4.5746 \\\hline
2.61
Denominator /rightarrow & 0.4166×3 & 1.2498 & \\\hline
\end {tabular}\) That is how far I can go. Could somebody help me please?
The forum doesn't support the tabular. However, you can create a table using the table icon Screen Shot 2022-08-07 at 11.03.04 AM.png and input LaTeX code inside each cell.

No.Log
[imath]173.8[/imath]
[imath](14.7)^2[/imath]
[imath]2.2400[/imath]
[imath]1.1673\times 2[/imath]
[imath]\quad 2.2400[/imath]
[imath]+\, 2.3346[/imath]
Numerator [imath]\implies[/imath][imath]4.5746[/imath][imath] \quad 4.5746[/imath][imath]4.5746[/imath]
[imath]2.61[/imath]
Denominator [imath]\implies[/imath]
[imath]0.4166[/imath]
[imath]0.4166\times 3[/imath]
[imath]-[/imath]
[imath]1.2498[/imath]
[imath]3.3248[/imath]
 
Last edited:
As BBB says, tabular doesn't work here,. I used an array, but it should fill in with the same command lines.
\begin{array}{|l|r|r r|}
\text{No.} & \text{Log} & ~ & ~ \\
\hline
173.8 & 2.2400 & 2.2400 & ~ \\
(14.7)^2 & 1.1673 \times 2 & +2.3346 & ~ \\
\hline
\text{Numerator} \implies & 4.5746 & 4.5476 & 4.5476 \\
\hline
2.61 & 0.4166 & ~ & - \\
\text{Denominator} \implies & 0.4166 \times 3 & 1.2498 & 1.2498 \\
\hline
\end{array}

[math] \begin{array}{|l|r|r r|} \text{No.} & \text{Log} & ~ & ~ \\ \hline 173.8 & 2.2400 & 2.2400 & ~ \\ (14.7)^2 & 1.1673 \times 2 & +2.3346 & ~ \\ \hline \text{Numerator} \implies & 4.5746 & 4.5476 & 4.5476 \\ \hline 2.61 & 0.4166 & ~ & - \\ \text{Denominator} \implies & 0.4166 \times 3 & 1.2498 & 1.2498 \\ \hline \end{array} [/math]
Notes:
I couldn't quite see the bottom of the table but you can add that in yourself.

There is a way to only do part of an \hline but I don't know how to do it. It might be \cline{1-2} to put a line over only cells 1 and 2 but it doesn't work here.

When you fill out the table you need to include all entries, even the blank ones. I used a ~ which indicates a blank space.

I don't know what \line is supposed to do but it doesn't work here. Is that the end of the line so you don't have to put in the blanks?

This might be easier for you to organize if you use tables within tables. For example you could use four 1x2 tables in row 2, etc.

-Dan
 
What is the function of the following
  1. {|l|r|r r|}?
  2. \hline
What are they used to do?​
The {...} after the array is the code for how you want to justify the cells and the | lines say if you want the columns to be lined. "c" means "centered", "l" means "left justified", and "r" means "right justified." So {| l | r | r r |} means we have 4 columns (4 letters tell us that) the left side has a vertical line, there is a vertical line between columns 1 and 2, 2 and 3, and the right side has a vertical line. The l r r r means the first column is left justified and the rest are right justified. (Lots of information in that little symbol!)

\hline puts a horizontal line over the text across the whole table.

You might find this site to be useful.

-Dan
 
The {...} after the array is the code for how you want to justify the cells and the | lines say if you want the columns to be lined. "c" means "centered", "l" means "left justified", and "r" means "right justified." So {| l | r | r r |} means we have 4 columns (4 letters tell us that) the left side has a vertical line, there is a vertical line between columns 1 and 2, 2 and 3, and the right side has a vertical line. The l r r r means the first column is left justified and the rest are right justified. (Lots of information in that little symbol!)

\hline puts a horizontal line over the text across the whole table.

You might find this site to be useful.

-Dan
Thank you so much. You have been of a great help.
 
\hline puts a horizontal line over the text acros
What about the case when the h is not there like in this one:
173.8 & 2.2400 & 2.2400 & ~ \\

So {| l | r | r r |} means we have 4 columns (4 letters tell us that) the left side has a vertical line, there is a vertical line between columns 1 and 2, 2 and 3, and the right side has a vertical line. The l r r r means the first column is left justified and the rest d. (Lots of information in that little symbol!)
But there is are 4 collumns in the attachment I uploaded. Only three are showing in your post. A column separate 4.5746-1.2498 to give 3.3248 at the bottom did you see it? That column is missing. Why is it not showing?
 

Attachments

  • IMG_20220807_155509.jpg
    IMG_20220807_155509.jpg
    429.9 KB · Views: 2
  • IMG_20220808_101110.jpg
    IMG_20220808_101110.jpg
    530 KB · Views: 2
What about the case when the h is not there like in this one:



But there is are 4 collumns in the attachment I uploaded. Only three are showing in your post. A column separate 4.5746-1.2498 to give 3.3248 at the bottom did you see it? That column is missing. Why is it not showing?
There was no line between the 173.8 row and the [imath](`14.7)^2[/imath] line so I didn't put an \hline there.

I couldn't quite see the whole last row in the image so I didn't put it there. You should easily be able to add that last line in. Pretty much just copy and paste the row above and if there are any blanks that need to be there just type a ~ there. You can post it on the Forum to test it.

-Dan
 
\begin{array}{|l|r|r|r|r|}
\text{No.}&\text{Log}&~&~
\\\hline
173.8&2.2400&2.2400&2.2400~
\\\
(147)^2&1.1673×2&+2.3346&~
\\\hline
\text{Numerator}\implies&4.5746&4.5476&4.5476
\\\hline
2.61&0.4166&~&-
\\\
\text{Denominator}\implies&0.4166×3&1.2498
\\\\hline
~&~&~&3.3248
\end{array}
 
\begin{array}{|l|r|r|r|r|}
\text{No.} & \text{Log} &~ &~
\\\hline
173.8 &2.2400&2.2400&2.2400~
\\\
(147)^2&1.1673×2&+2.3346&~
\\\hline
\text{Numerator}\implies&4.5746&4.5476&4.5476
\\\hline
2.61&0.4166&~&-
\\\
\text{Denominator}\implies&0.4166×3&1.2498
\\\\hline
~&~&~&3.3248
\end{array

I am testing this thing and is not working. I will test it further when am back from work.
 
\begin{array}{|l|r|r|r|r|}
\text{No.} & \text{Log} &~ &~
\\\hline
173.8 &2.2400&2.2400&2.2400~
\\\
(147)^2&1.1673×2&+2.3346&~
\\\hline
\text{Numerator}\implies&4.5746&4.5476&4.5476
\\\hline
2.61&0.4166&~&-
\\\
\text{Denominator}\implies&0.4166×3&1.2498
\\\\hline
~&~&~&3.3248
\end{array}

I am testing this thing and is not working. I will test it further when am back from work.
\begin{array}{|l|r|r|r|}
\text{No.} & \text{Log} & ~ & ~ \\
\hline
173.8 & 2.2400 & 2.2400 & ~ \\
(14.7)^2 & 1.1673 \times 2 & +2.3346 & ~ \\
\hline
\text{Numerator} \implies & 4.5746 & 4.5476 & 4.5476 \\
\hline
2.61 & 0.4166 & ~ & - \\
\text{Denominator} \implies & 0.4166 \times 3 & 1.2498 & 1.2498 \\
\hline
~ & ~ & ~ & 3.3248 \\
\hline
\end{array}

Note the \\ after the 3.3248 on the last line.
[math] \begin{array}{|l|r|r|r|} \text{No.} & \text{Log} & ~ & ~ \\ \hline 173.8 & 2.2400 & 2.2400 & ~ \\ (14.7)^2 & 1.1673 \times 2 & +2.3346 & ~ \\ \hline \text{Numerator} \implies & 4.5746 & 4.5476 & 4.5476 \\ \hline 2.61 & 0.4166 & ~ & - \\ \text{Denominator} \implies & 0.4166 \times 3 & 1.2498 & 1.2498 \\ \hline ~ & ~ & ~ & 3.3248 \\ \hline \end{array} [/math]
-Dan
 
\begin{array}{|l|r|r|r|}
\text{No.} & \text{Log} & ~ & ~ \\
\hline
173.8 & 2.2400 & 2.2400 & ~ \\
(14.7)^2 & 1.1673 \times 2 & +2.3346 & ~ \\
\hline
\text{Numerator} \implies & 4.5746 & 4.5476 & 4.5476 \\
\hline
2.61 & 0.4166 & ~ & - \\
\text{Denominator} \implies & 0.4166 \times 3 & 1.2498 & 1.2498 \\
\hline
~ & ~ & ~ & 3.3248 \\
\hline
\end{array}

Note the \\ after the 3.3248 on the last line.
[math] \begin{array}{|l|r|r|r|} \text{No.} & \text{Log} & ~ & ~ \\ \hline 173.8 & 2.2400 & 2.2400 & ~ \\ (14.7)^2 & 1.1673 \times 2 & +2.3346 & ~ \\ \hline \text{Numerator} \implies & 4.5746 & 4.5476 & 4.5476 \\ \hline 2.61 & 0.4166 & ~ & - \\ \text{Denominator} \implies & 0.4166 \times 3 & 1.2498 & 1.2498 \\ \hline ~ & ~ & ~ & 3.3248 \\ \hline \end{array} [/math]
-Dan
But what are these \\ doing?. What is their function? And why must they be put there exactly?
 
But what are these \\ doing?. What is their function? And why must they be put there exactly?
The \\ indicates a line break. With a table we have to do it all in one statement so we need to tell LaTeX when we are done with a line.
\text{This is line 1.} \\ \text{This is line 2.}

[math]\text{This is line 1.} \\ \text{This is line 2.}[/math]
-Dan
 
when I code I put spaces in to remind me where I need to end { } symbols
With more complicated expressions, I often type a template with all the {} where needed, first

\frac{\frac{}{}}{\sqrt{\frac{}{}}}

and then go back and fill 'em in

\frac{\frac{x^2-9x+10}{5x^2-15x-3}}{\sqrt{\frac{x^2-144}{6x^2+x+1}}}

(Not recommended with smartphone use)

o_O
 
[math] \begin{array}{|l|r|r|r|} \text{No.} & \text{Log} & ~ & ~ \\ \hline 173.8 & 2.2400 & 2.2400 & 2.2400 ~ \\ (147)^2 & 1.1673×2 & + 2.3346 & ~ \ \hline \text{Numerator}\implies & 4.5746 & 4.5476 & 4.5476 \\ \hline 2.61 & 0.4166 & ~ & - \\ \text{Denominator}\implies & 0.4166×3 & 1.2498 \hline ~ & ~ & ~ & 3.3248 \hline \end{array[/math]�
 
Last edited:
[math] \begin{array}{|l|r|r|r|} \text{No.} & \text{Log} & ~ & ~ \\ \hline 173.8 & 2.2400 & 2.2400 & 2.2400 ~ \\ (147)^2 & 1.1673\times2 & + 2.3346 & ~ \ \hline \text{Numerator}\implies & 4.5746 & 4.5476 & 4.5476 \\ \hline 2.61 & 0.4166 & ~ & - \\ \text{Denominator}\implies & 0.4166\times3 & 1.2498 ~ & ~ & ~ & 3.3248 \hline \end{array[/math]
Why is the text not entering the the table?
 
[math] \begin{array}{|l|r|r|r|} \text{No.} & \text{Log} & ~ & ~ \\ \hline 173.8 & 2.2400 & 2.2400 & 2.2400 ~ \\ (147)^2 & 1.1673×2 & + 2.3346 & ~ \\ \hline \text{Numerator}\implies & 4.5746 & 4.5476 & 4.5476 \\ \hline 2.61 & 0.4166 & ~ & - \\ \text{Denominator}\implies & 0.4166×3 & 1.2498 \\ \hline ~ & ~ & ~ & 3.3248 \\ \hline \end{array}[/math]Waou! I finally got it. Thanks to everyone that assisted me about this problem. I will try some more to ensure I properly understand it.
 
Top