Creating Table with Different Last 3 Rows

  • LaTeX
  • Thread starter Rajini
  • Start date
  • Tags
    Table
In summary, the conversation discusses creating a table with six columns, but wanting the last three rows to have only four columns and the fourth column to contain common text. The conversation also mentions using parbox to span the fourth column of the last three rows as a single cell without affecting the first row.
  • #1
Rajini
621
4
hello all,
in the following code you can create a 6 column table. But i want to make the last 3 rows a bit different. How to make the last 3 rows to have only 4 columns and the 4th column to have some text, which is common for all the last 3 rows.
thanks
Code:
\begin{table}[!t]
\caption{Assignments of DFT calculated wavenumbers.}\label{tab:1stas}
\vspace{3mm}
\centering
\begin{tabular}[width=1\linewidth]{lccccl}
\hline\hline
Experimental & FC from     & $e_j^2$ & DFT calculated & FC from      & Mode description\\[0ex]
wavenumber   & NIS         &         & wavenumber     & DFT          & \\[0ex]
[cm$^{-1}$]  &[N~m$^{-1}$] &         & [cm$^{-1}$]    & [N~m$^{-1}$] & \\[0ex]
\hline
\multirow{3}{*}{390.9} & \multirow{3}{*}{79.08}& \multirow{3}{*}{0.45} & 394.5 & 68.97 & Breathing mode, $A_1^{\prime}$\\
& &                                                                    & 400.1 & 82.27 & Breathing mode, $A_1^{\prime}$\\
& &                                                                    & 410.6 & 90.86 & $A_2^{\prime\prime}$\\
\hline
446.8 & 27.27 & 0.10 &&&\\
538.4 & 3.29  & 0.01 &&&\\
595.7 & 43.99 & 0.13 &&&\\
\hline\hline
\end{tabular}
\end{table}
 
Physics news on Phys.org
  • #3
Hi las3rjock,
But nothing on parbox is given in that link. It doesn't help me in anyway. For i want to span the 4th column of the last 3 rows as single. That means 4th column and 3, 4, and 5 row should be as a single cell. And this should not affect 1st row.
 

1. How do I create a table with different last 3 rows?

To create a table with different last 3 rows, you can use the "nth-last-child" selector in CSS to target and style the last 3 rows of your table. Alternatively, you can also use the "slice" method in JavaScript to remove the last 3 rows of the table and replace them with new rows.

2. Can I add different formatting to the last 3 rows of my table?

Yes, you can add different formatting to the last 3 rows of your table by using the "nth-last-child" selector in CSS. This allows you to target and style the last 3 rows separately from the rest of the table.

3. How can I remove the last 3 rows of my table and replace them with new rows?

To remove the last 3 rows of your table and replace them with new rows, you can use the "slice" method in JavaScript. This method allows you to specify the starting and ending index of the rows you want to remove, and then add new rows using the "appendChild" method.

4. Is it possible to create a table with different last 3 rows using HTML only?

No, it is not possible to create a table with different last 3 rows using HTML only. You will need to use CSS or JavaScript to target and modify the last 3 rows of the table.

5. Can I create a table with different last 3 rows in any programming language?

Yes, you can create a table with different last 3 rows in any programming language as long as it supports CSS or JavaScript. These languages allow you to target and modify the last 3 rows of the table, regardless of the programming language used to create the table.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
Replies
0
Views
2K
Back
Top