2

I have a very long table (about 6 pages) so I'm trying to use longtable package. However, is there any way how to modify entries of the table without actually starting a new table. Now I have data for two countries (which is about 3 pages) and after that, I want to change names of the countries and continue the table as it is. I manage to insert the data twi, however, I fail to change the entries inside the table. I hope its clear what I want. I would really appreciate any help, its taking me hours already and I still can't figure the right way to do it. I try to insert my code, maybe it is more clear. Lina

\documentclass [a4paper,12pt]{report} 
\usepackage{multirow}
\usepackage{lscape}
\usepackage{array}
\usepackage{graphicx}
\usepackage{apacite}        
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{caption} \captionsetup[table]{skip=10pt}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}
\renewcommand*{\arraystretch}{0.8}
\begin{document}
\begin{landscape}
\begin{center}
\begin{longtable}{|l|ccc|ccc|ccc|ccc|ccc|ccc|ccc|ccc|}
\caption{Multinomial Logit Model}  \\
\hline
\multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{Denmark}} & \multicolumn{12}{c|}{\textbf{Sweden}} \\ 
\cline{2-25} 
 & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} \\ \cline{2-25} 
 & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} \\ \hline
\endfirsthead


\caption{(Continued)} \\

\hline
\multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{Denmark}} & \multicolumn{12}{c|}{\textbf{Sweden}} \\ 
\cline{2-25} 
 & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} \\ \cline{2-25} 
 & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} \\ 

\hline
\endhead
\hline \multicolumn{25}{|r|}{{Continued on next page}} \\ \hline
\endfoot

\hline
\endlastfoot


\textit{Coexceedances = 1} &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\
Constant &  & -1.86*** &  &  &  &  &  & -1.90*** &  &  &  &  &  & -2.61*** &  &  &  &  &  & -2.72*** &  &  &  &  \\
Coex. Lagged &  & 0.27*** &  &  &  &  &  & 0.25*** &  &  &  &  &  & 0.43*** &  &  &  &  &  & 0.41*** &  &  &  &  \\
Systemic Risk &  & 0.28*** &  &  &  &  &  & 0.20* &  &  &  &  &  & 0.30*** &  &  &  &  &  & 0.20* &  &  &  &  \\
Yield Curve &  & -0.34 &  &  &  &  &  & -0.35 &  &  &  &  &  & -0.80 &  &  &  &  &  & -0.78 &  &  &  &  \\
Volatility Own &  & 0.26 &  &  &  &  &  & 0.05 &  &  &  &  &  & 1.13*** &  &  &  &  &  & 0.96*** &  &  &  &  \\
Volatility US &  & 0.85 &  &  &  &  &  & 0.88 &  &  &  &  &  & 0.65 &  &  &  &  &  & 0.62 &  &  &  &  \\
Contagion DK &  & - &  &  & - &  &  & - &  &  &  &  &  & - &  &  & - &  &  & 0.21* &  &  &  &  \\
Contagion SE &  & - &  &  & - &  &  & 0.23** &  &  &  &  &  & - &  &  & - &  &  &  &  &  &  &  \\
Contagion NO &  & - &  &  & - &  &  & 0.22 &  &  &  &  &  & - &  &  & - &  &  & 0.44*** &  &  &  &  \\
Contagion FI &  & - &  &  & - &  &  & 0.04 &  &  &  &  &  & - &  &  & - &  &  & 0.40** &  &  &  &  \\

\end{longtable}
\end{center}
\end{landscape}

\end{document}
  • Welcome to TeX.SX! Please help us to help you and reduce what you have above to a minimal working example (MWE) that succinctly demonstrates the problem. As it stands, there is a lot of extra information that simply hides the problem. – Sean Allred May 4 '14 at 6:24
  • Hi Sean, thanks for editing my comment. I reduced the table itself, however, I don't think I can do anything with the commands above. What tried so far is placing this command into different part of the code, modifying entries Denmark and Sweden, but it still doesn't work. \multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{Denmark}} & \multicolumn{12}{c|}{\textbf{Sweden}} \\ – user51053 May 4 '14 at 6:29
  • What I was able to get is, first page with Denmark & Sweden, and later on all tables with new entries, but I want it to be 3 pages for each and it just doesn't work – user51053 May 4 '14 at 6:31
2

Don't use center around a long table (it doesn't centre it, it just adds spurious vertical space). You can use two tables but put no space between them. Also if you need to force the columns to be the same width then you can use \kill rows to tell one table about wide entries in the other, although that wasn't needed here. Unrelated but I used \extrarowheight from the array package to keep the horizontal lines away from the text.

enter image description here

\documentclass [a4paper,12pt]{report} 
\usepackage{multirow}
\usepackage{lscape}
\usepackage{array}
\usepackage{graphicx}
\usepackage{apacite}        
\usepackage{booktabs}
\usepackage{longtable,array}
\usepackage{caption} \captionsetup[table]{skip=10pt}
\renewcommand{\labelenumii}{\theenumii}
\renewcommand{\theenumii}{\theenumi.\arabic{enumii}.}
\renewcommand*{\arraystretch}{0.8}
\begin{document}
\begin{landscape}

\setlength\LTpre{0pt}
\setlength\LTpost{0pt}
\setlength\extrarowheight{2pt}
\begin{longtable}{|l|ccc|ccc|ccc|ccc|ccc|ccc|ccc|ccc|}
\caption{Multinomial Logit Model}  \\
\hline
\multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{Denmark}} & \multicolumn{12}{c|}{\textbf{Sweden}} \\ 
\cline{2-25} 
 & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} \\ \cline{2-25} 
 & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} \\ \hline
\endfirsthead


\caption{(Continued)} \\

\hline
\multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{Denmark}} & \multicolumn{12}{c|}{\textbf{Sweden}} \\ 
\cline{2-25} 
 & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 1}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 2}}} \\ \cline{2-25} 
 & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} \\ 

\hline
\endhead
\hline \multicolumn{25}{|r|}{{Continued on next page}} \\ \hline
\endfoot

\hline
\endlastfoot


\textit{Coexceedances = 1} &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\
Constant &  & -1.86*** &  &  &  &  &  & -1.90*** &  &  &  &  &  & -2.61*** &  &  &  &  &  & -2.72*** &  &  &  &  \\
Coex. Lagged &  & 0.27*** &  &  &  &  &  & 0.25*** &  &  &  &  &  & 0.43*** &  &  &  &  &  & 0.41*** &  &  &  &  \\
Systemic Risk &  & 0.28*** &  &  &  &  &  & 0.20* &  &  &  &  &  & 0.30*** &  &  &  &  &  & 0.20* &  &  &  &  \\
Yield Curve &  & -0.34 &  &  &  &  &  & -0.35 &  &  &  &  &  & -0.80 &  &  &  &  &  & -0.78 &  &  &  &  \\
Volatility Own &  & 0.26 &  &  &  &  &  & 0.05 &  &  &  &  &  & 1.13*** &  &  &  &  &  & 0.96*** &  &  &  &  \\
Volatility US &  & 0.85 &  &  &  &  &  & 0.88 &  &  &  &  &  & 0.65 &  &  &  &  &  & 0.62 &  &  &  &  \\
Contagion DK &  & - &  &  & - &  &  & - &  &  &  &  &  & - &  &  & - &  &  & 0.21* &  &  &  &  \\
Contagion SE &  & - &  &  & - &  &  & 0.23** &  &  &  &  &  & - &  &  & - &  &  &  &  &  &  &  \\
Contagion NO &  & - &  &  & - &  &  & 0.22 &  &  &  &  &  & - &  &  & - &  &  & 0.44*** &  &  &  &  \\
Contagion FI &  & - &  &  & - &  &  & 0.04 &  &  &  &  &  & - &  &  & - &  &  & 0.40** &  &  &  &  \\

\end{longtable}


\begin{longtable}{|l|ccc|ccc|ccc|ccc|ccc|ccc|ccc|ccc|}
\multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{France}} & \multicolumn{12}{c|}{\textbf{UK}} \\ 
\cline{2-25} 
 & \multicolumn{6}{c|}{\textit{\textbf{Model 3}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 4}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 3}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 4}}} \\ \cline{2-25} 
 & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} \\ \hline
\endfirsthead
\hline
\multirow{3}{*}{} & \multicolumn{12}{c|}{\textbf{France}} & \multicolumn{12}{c|}{\textbf{UK}} \\ 
\cline{2-25} 
 & \multicolumn{6}{c|}{\textit{\textbf{Model 3}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 4}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 3}}} & \multicolumn{6}{c|}{\textit{\textbf{Model 4}}} \\ \cline{2-25} 
 & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} & \multicolumn{3}{c|}{\textit{\textbf{Coeff.}}} & \multicolumn{3}{c|}{\textit{\textbf{Prob.}}} \\ 

\hline
\endhead
\hline \multicolumn{25}{|r|}{{Continued on next page}} \\ \hline
\endfoot

\hline
\endlastfoot


\textit{Coexceedances = 1} &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  &  \\
Constant &  & -1.86*** &  &  &  &  &  & -1.90*** &  &  &  &  &  & -2.61*** &  &  &  &  &  & -2.72*** &  &  &  &  \\
Coex. Lagged &  & 0.27*** &  &  &  &  &  & 0.25*** &  &  &  &  &  & 0.43*** &  &  &  &  &  & 0.41*** &  &  &  &  \\
Systemic Risk &  & 0.28*** &  &  &  &  &  & 0.20* &  &  &  &  &  & 0.30*** &  &  &  &  &  & 0.20* &  &  &  &  \\
Yield Curve &  & -0.34 &  &  &  &  &  & -0.35 &  &  &  &  &  & -0.80 &  &  &  &  &  & -0.78 &  &  &  &  \\
Volatility Own &  & 0.26 &  &  &  &  &  & 0.05 &  &  &  &  &  & 1.13*** &  &  &  &  &  & 0.96*** &  &  &  &  \\
Volatility US &  & 0.85 &  &  &  &  &  & 0.88 &  &  &  &  &  & 0.65 &  &  &  &  &  & 0.62 &  &  &  &  \\
Contagion DK &  & - &  &  & - &  &  & - &  &  &  &  &  & - &  &  & - &  &  & 0.21* &  &  &  &  \\
Contagion SE &  & - &  &  & - &  &  & 0.23** &  &  &  &  &  & - &  &  & - &  &  &  &  &  &  &  \\
Contagion NO &  & - &  &  & - &  &  & 0.22 &  &  &  &  &  & - &  &  & - &  &  & 0.44*** &  &  &  &  \\
Contagion FI &  & - &  &  & - &  &  & 0.04 &  &  &  &  &  & - &  &  & - &  &  & 0.40** &  &  &  &  \\

\end{longtable}

\end{landscape}

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.