Graphics, Figures & TablesTable spacing

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
rajini
Posts: 64
Joined: Mon Mar 22, 2010 2:27 pm

Table spacing

Post by rajini »

Hello all,
using some dirty tricks, i managed to make a longtable.
But still i want to make a vertical space between the footnote and the table. My table ends with two \hline commands.. Now i want to leave around 4 mm space between the footnote and two \hline. If you compile the code below there wont be any space. How to do it.?
And what is the default font size for footnotes?
'X' contains text of 7 lines (\parbox{8.5cm})

Code: Select all

\begin{longtable}{lccccl}
\caption[Summary] {Summary}\label{tab:1stas}\vspace{3mm}\\
\hline\hline
Experimental & FC from     & $e_j^2$ & DFT calculated & FC from      &Mode description\\[0ex]
wavenumber   & NIS         &         & wavenumber     & DFT          &numbered according\\[0ex]
[cm$^{-1}$]  &[N~m$^{-1}$] &         & [cm$^{-1}$]    & [N~m$^{-1}$] &to fig.~\ref{fig:d3}\\ \hline\hline
\endfirsthead
\multicolumn{6}{c}{{\tablename\ \thetable{} continued from previous page}}\\
\hline\hline
Experimental & FC from     & $e_j^2$ & DFT calculated & FC from      &Mode description\\[0ex]
wavenumber   & NIS         &         & wavenumber     & DFT          &numbered according\\[0ex]
[cm$^{-1}$]  &[N~m$^{-1}$] &         & [cm$^{-1}$]    & [N~m$^{-1}$] &to fig.~\ref{fig:d3}\\ \hline\hline
\endhead
\multicolumn{6}{r}{{continued on next page\ldots}} \\
\endfoot
\endlastfoot
3         & --          & 0.38    & --             & --           & acoustic phonons\\ 
\hline
\multirow{2}{*}{14.9} & \multirow{2}{*}{4.25} & \multirow{2}{*}{0.3} & 11.1 & 8.19 &$E^{\prime}$ $(\nu_2)$ \\
& &                                                                    & 152.9 & 10.03&$E^{\prime}$ $(\nu_2)$\\
\hline
\multirow{6}{*}{208.2} & \multirow{6}{*}{37.66}& \multirow{6}{*}{0.76} & 192.5 & 28.33 &$E^{\prime}$ $(\nu_5)$\\ 
& &                                                                    & 195.9 & 21.90 &$E^{\prime}$ $(\nu_2)$\\
& &                                                                    & 198.0 & 3.51 &$A_2^{\prime}$ $(\nu_7)$ $^a$\\
& &                                                                    & 206.5 & 1.29 & $E^{\prime}$ $(\nu_3)$\\ 
& &                                                                    & 210.5 & 0.67 & $E^{\prime}$ $(\nu_3)$\\ 
& &                                                                    & 217.6 & .99 & $A^{\prime\prime}_2$ $(\nu_4)$\\ 
\hline
46.2 & 14.36 & 0.19 & 230.9 & 23.84 & $A_1^{\prime}$ $(\nu_1)$\\
\hline
\multirow{5}{*}{308.4} & \multirow{5}{*}{38.79} & \multirow{5}{*}{0.35} & 26.0 & 24.94 & $E^{\prime}$ $(\nu_2)$\\
& &                                                                     & 27.3 & 20.31 & $E^{\prime}$ $(\nu_2)$\\
& &                                                                     & 31.9 & 4.57 & $E^{\prime}$ $(\nu_5)$\\
& &                                                                     & 03.5 & 1.01 & $E^{\prime}$ $(\nu_5)$\\
& &                                                                     & 34.3 & 24.70 & $A_1^{\prime}$ $(\nu_1)$\\
\hline\newpage
\multirow{6}{*}{337.5} & \multirow{6}{*}{19.76} & \multirow{6}{*}{0.18} & 31.0 & 43.44 & $A_1^{\prime}$ $(\nu_1)$\\
& &                                                                     & 31.3 & 63.60 & $A_2^{\prime}$ $(\nu_7)$ $^a$\\
& &                                                                     & 351.4 & 72.30 & $E^{\prime\prime}$ $(\nu_8,~R_y)$ $^b$\\
& &                                                                     & 352.0 & 66.13 & $E^{\prime\prime}$ $(\nu_8,~R_y)$ $^b$\\
& &                                                                     & 355.7 & 64.76 & $E^{\prime}$ $(\nu_6)$\\
& &                                                                     & 360.5 & 85.17 & $E^{\prime\prime}$ $(\nu_8)$\\
\hline
\multirow{4}{*}{390.9} & \multirow{4}{*}{79.08}& \multirow{4}{*}{0.45} & 33.9 & 46.88 & $E^{\prime}$ $(\nu_3)$\\ 
& &                                                                    & 34.5 & 68.97 & $A_1^{\prime}$ $(\nu_1)$\\ 
& &                                                                    & 40.1 & 82.27 & $A_1^{\prime}$ $(\nu_3)$\\
& &                                                                    & 40.6 & 90.86 & $A_2^{\prime\prime}$ $(\nu_4)$\\
\hline
446.8 & 27.27 & 0.10 & 449.2 & 15.52 & $E^{\prime}$ $(\nu_6)$\\
\hline
&&&\multicolumn{3}{c}{\multirow{7}{*}{\parbox{8.5cm}{X.}}}\\
&&&\\
538.4 & 3.29  & 0.01 &\\
595.7 & 43.99 & 0.13 &&&\\[7mm]
\multicolumn{6}{l}{\multirow{5}{*}{\parbox{\linewidth}{\footnotesize $^a$This can also be viewed as footnote $(\nu_7)$ of $D_{4h}$}}}\\
\multicolumn{6}{l}{\multirow{5}{*}{\parbox{\linewidth}{\footnotesize $^b$This can also be second foot}}}\\
\hline\hline
\end{longtable}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Table spacing

Post by gmedina »

Hi,

I would suggest you to use the threeparttablex package:

Code: Select all

\documentclass{article}
\usepackage{multirow,longtable,threeparttablex}
\begin{document}

\begin{ThreePartTable}
\begin{TableNotes}
  \item[a] A first note
  \item[b] A second note
\end{TableNotes}
\begin{longtable}{lccccl}
\caption[Summary] {Summary}\label{tab:1stas}\vspace{3mm}\\
\hline\hline
Experimental & FC from     & $e_j^2$ & DFT calculated & FC from      &Mode description\\[0ex]
wavenumber   & NIS         &         & wavenumber     & DFT          &numbered according\\[0ex]
[cm$^{-1}$]  &[N~m$^{-1}$] &         & [cm$^{-1}$]    & [N~m$^{-1}$] &to fig.~\ref{fig:d3}\\ \hline\hline
\endfirsthead
\multicolumn{6}{c}{{\tablename\ \thetable{} continued from previous page}}\\
\hline\hline
Experimental & FC from     & $e_j^2$ & DFT calculated & FC from      &Mode description\\[0ex]
wavenumber   & NIS         &         & wavenumber     & DFT          &numbered according\\[0ex]
[cm$^{-1}$]  &[N~m$^{-1}$] &         & [cm$^{-1}$]    & [N~m$^{-1}$] &to fig.~\ref{fig:d3}\\ \hline\hline
\endhead
\multicolumn{6}{r}{{continued on next page\ldots}} \\
\endfoot
\insertTableNotes\\
\endlastfoot
3         & --          & 0.38    & --             & --           & acoustic phonons\\ 
\hline
\multirow{2}{*}{14.9} & \multirow{2}{*}{4.25} & \multirow{2}{*}{0.3} & 11.1 & 8.19 &$E^{\prime}$ $(\nu_2)$ \\
& &                                                                    & 152.9 & 10.03&$E^{\prime}$ $(\nu_2)$\\
\hline
\multirow{6}{*}{208.2} & \multirow{6}{*}{37.66}& \multirow{6}{*}{0.76} & 192.5 & 28.33 &$E^{\prime}$ $(\nu_5)$\\ 
& &                                                                    & 195.9 & 21.90 &$E^{\prime}$ $(\nu_2)$\\
& &                                                                    & 198.0 & 3.51 &$A_2^{\prime}$ $(\nu_7)$ \tnote{a}\\
& &                                                                    & 206.5 & 1.29 & $E^{\prime}$ $(\nu_3)$\\ 
& &                                                                    & 210.5 & 0.67 & $E^{\prime}$ $(\nu_3)$\\ 
& &                                                                    & 217.6 & .99 & $A^{\prime\prime}_2$ $(\nu_4)$\\ 
\hline
46.2 & 14.36 & 0.19 & 230.9 & 23.84 & $A_1^{\prime}$ $(\nu_1)$\\
\hline
\multirow{5}{*}{308.4} & \multirow{5}{*}{38.79} & \multirow{5}{*}{0.35} & 26.0 & 24.94 & $E^{\prime}$ $(\nu_2)$\\
& &                                                                     & 27.3 & 20.31 & $E^{\prime}$ $(\nu_2)$\\
& &                                                                     & 31.9 & 4.57 & $E^{\prime}$ $(\nu_5)$\\
& &                                                                     & 03.5 & 1.01 & $E^{\prime}$ $(\nu_5)$\\
& &                                                                     & 34.3 & 24.70 & $A_1^{\prime}$ $(\nu_1)$\\
\hline\newpage
\multirow{6}{*}{337.5} & \multirow{6}{*}{19.76} & \multirow{6}{*}{0.18} & 31.0 & 43.44 & $A_1^{\prime}$ $(\nu_1)$\\
& &                                                                     & 31.3 & 63.60 & $A_2^{\prime}$ $(\nu_7)$ \tnote{a}\\
& &                                                                     & 351.4 & 72.30 & $E^{\prime\prime}$ $(\nu_8,~R_y)$\tnote{b}\\
& &                                                                     & 352.0 & 66.13 & $E^{\prime\prime}$ $(\nu_8,~R_y)$\tnote{b}\\
& &                                                                     & 355.7 & 64.76 & $E^{\prime}$ $(\nu_6)$\\
& &                                                                     & 360.5 & 85.17 & $E^{\prime\prime}$ $(\nu_8)$\\
\hline
\multirow{4}{*}{390.9} & \multirow{4}{*}{79.08}& \multirow{4}{*}{0.45} & 33.9 & 46.88 & $E^{\prime}$ $(\nu_3)$\\ 
& &                                                                    & 34.5 & 68.97 & $A_1^{\prime}$ $(\nu_1)$\\ 
& &                                                                    & 40.1 & 82.27 & $A_1^{\prime}$ $(\nu_3)$\\
& &                                                                    & 40.6 & 90.86 & $A_2^{\prime\prime}$ $(\nu_4)$\\
\hline
446.8 & 27.27 & 0.10 & 449.2 & 15.52 & $E^{\prime}$ $(\nu_6)$\\
\hline
&&&\multicolumn{3}{c}{\multirow{7}{*}{\parbox{8.5cm}{X.}}}\\
&&&\\
538.4 & 3.29  & 0.01 &\\
595.7 & 43.99 & 0.13 &&&\\[7mm]
\hline\hline
\end{longtable}
\end{ThreePartTable}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
rajini
Posts: 64
Joined: Mon Mar 22, 2010 2:27 pm

Re: Table spacing

Post by rajini »

Hi gmedina, thanks
At present i cant use that package. seems that package is not installed..But will do it in 2 days and let you know.
rajini
rajini
Posts: 64
Joined: Mon Mar 22, 2010 2:27 pm

Re: Table spacing

Post by rajini »

hello friend,
thanks, now it is perfect. I should also use environ + threeparttable package.
Since i cannot install (i don't have admin-powder), so from internet, i downloaded and copied all .sty files to the directory where i have all my .tex files.
one final help:
1. we know that longtable is not float so the text above and below the table wont match, i mean that the text above the table wont reach the right-end and the text after the table starts as a new paragraph. I can use \noparindent for the text that comes after table. But any way to control the text so it can make a proper right end?
thanks.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Table spacing

Post by gmedina »

Hi rajini,

I dont fully understand you question. Can you please try to describe your problem in more detail? Using the following simplified version I can't understand your problem:

Code: Select all

\documentclass{article}
\usepackage{longtable}
\begin{document}

text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text
\begin{longtable}{cc}
  text & text
\end{longtable}
text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
rajini
Posts: 64
Joined: Mon Mar 22, 2010 2:27 pm

Re: Table spacing

Post by rajini »

Hello Gmedina,

I place the longtable somewhere in a paragraph. After compiling, the text that comes after the table starts as a new paragraph (i mean the line intended a bit). But one can solve this problem using parindent commmand.
And the text that comes before the table wont end properly. i.e., the line wont end at the right end of the line exactly.
Anyway i solved the problem...i thought of using \hfill. but good idea is to place the longtable in between paragraphs than inside a paragraph.
thanks
Post Reply