3

I have the following table:

\documentclass[a4paper,11pt]{article}

\usepackage{caption}
\usepackage{lscape}  % Package allowing to put your text in landscape 
\usepackage{longtable,pdflscape}   
\captionsetup[table]{font={stretch=1}}     %% change 1.2 as you like
\captionsetup[figure]{font={stretch=1}}    %% change 1.2 as you like       
\usepackage{threeparttable}           
\usepackage{booktabs} 
\usepackage{rotating} 
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{float}





\begin{document}

\begin{table}[H]
\captionsetup{font=large, labelfont=bf}
\centering
\setlength{\tabcolsep}{5pt}
\setlength{\extrarowheight}{1pt}
\begin{threeparttable}
  \caption{Sample of $N$-grams and Unigrams for Each Topic}
\label{tab: tab00002}
    \begin{tabular}{cccccccc} 

      \toprule

   \multicolumn{2}{c}{\textbf{Monetary Policy}} & & \multicolumn{2}{c}{\textbf{Economic Outlook}} & & \multicolumn{2}{c}{\textbf{Inflation Outlook}}  \\

      \midrule

  \multicolumn{1}{c}{Dovish} & \multicolumn{1}{c}{Hawkish} & &\multicolumn{1}{c}{Positive} & \multicolumn{1}{c}{Negative} & &\multicolumn{1}{c}{Positive} & \multicolumn{1}{c}{Negative}\\

\cline{1-2}\cline{4-5}\cline{7-8} \\

favourable lending conditions &  higher commodity prices  & & stronger than expected & negative cyclical momentum &  & tighter labour markets  & fall below \tabularnewline

additional asset purchases &  increase interest rates & & growth momentum & heightened uncertainty  & & higher energy price   & lower wage pressures \tabularnewline

  accommodative stance  & inflationary pressure  & & positive outlook & revised downwards &  &  higher inflation &  disappointing \tabularnewline

 increase the envelope  & strong fundamentals  & & revised upwards & downside risks & & solid wage growth  & higher unemployment \tabularnewline

reduce interest rates  & counter upside risks  & & strong recovery &  vulnerabilities  & & build up  & unutilised capacity \tabularnewline

heightened alertness &  rise in inflation & & encouraging & decelerating & & higher pressure  & lower unit labour costs \tabularnewline

extension of credit & end purchases & & upswing & disequilibria  &  & stronger than expected & lower oil prices \tabularnewline

liquidity provision & winding down  & & impetus  & contracting  &  & upside risks  & contained \tabularnewline

weakening & rising wages  & & surging & headwinds  & & fast growing  & muted \tabularnewline

subdued & withdrawal  & & upturn & softening  & & second round effects  & sluggish \tabularnewline

    \bottomrule
    \end{tabular}
    \begin{tablenotes}[flushleft]
\small
\item\hskip -\fontdimen2\font\textit{Note}: The table shows a sample of $n$-grams and unigrams for each ECB field-specific dictionary.
\end{tablenotes}
\end{threeparttable}
\end{table}


\end{document}

The issue is that the table is too wide to make it in the paper and I don't want it to be displayed horizontal. What I would like to do is to have, instead of 3 main columns, 1 main column below each other. Basically, a table below each other table.

Can anyone help me do it?

Thanks a lot!

3
  • 1
    Even if you remove \setlength{\extrarowheight}{1pt} from your code, such a table will be too tall for the page layout you currently use. By the way: your example is not compilable since \usepackage{caption} and \begin{document} are missing.
    – leandriis
    Oct 16 at 15:52
  • edited the code to make it compilable, sorry. Then I guess the only option is to make a horizontal display, isn't it?
    – Rollo99
    Oct 16 at 15:58
  • Not necessarily. You could also adjust the font size to make it fit. But there are alo other options inclusing redesigning the table. It all depends on what you're open to.
    – leandriis
    Oct 16 at 15:59
3

Here are two versions of your table with the requested layout. Personally, I would not center the contents, though.

enter image description here

\documentclass[a4paper,11pt]{article}

\usepackage{caption}   
\usepackage{threeparttable}           
\usepackage{booktabs} 
\usepackage{array}


\begin{document}

\begin{table}
  \captionsetup{font=large, labelfont=bf}
  \centering
  \small
  \begin{threeparttable}
    \caption{Sample of $N$-grams and Unigrams for Each Topic}
    \label{tab: tab00002}
    \begin{tabular}{cc} 
      \toprule
      \multicolumn{2}{c}{\textbf{Monetary Policy}} \\
      \midrule
      \multicolumn{1}{c}{Dovish} & \multicolumn{1}{c}{Hawkish} \\
      \midrule
      favourable lending conditions &  higher commodity prices   \tabularnewline
      additional asset purchases &  increase interest rates \tabularnewline
      accommodative stance  & inflationary pressure  \tabularnewline
      increase the envelope  & strong fundamentals   \tabularnewline
      reduce interest rates  & counter upside risks  \tabularnewline
      heightened alertness &  rise in inflation \tabularnewline
      extension of credit & end purchases \tabularnewline
      liquidity provision & winding down  \tabularnewline
      weakening & rising wages   \tabularnewline
      subdued & withdrawal   \tabularnewline
      \midrule
      \multicolumn{2}{c}{\textbf{Economic Outlook}}\\
      \midrule
      \multicolumn{1}{c}{Positive} & \multicolumn{1}{c}{Negative} \\
      \midrule
      stronger than expected & negative cyclical momentum \tabularnewline
      growth momentum & heightened uncertainty   \tabularnewline
      positive outlook & revised downwards  \tabularnewline
      revised upwards & downside risks  \tabularnewline
      strong recovery &  vulnerabilities \tabularnewline
      encouraging & decelerating \tabularnewline
      upswing & disequilibria   \tabularnewline
      impetus  & contracting \tabularnewline
      surging & headwinds\tabularnewline
      upturn & softening \tabularnewline
      \midrule
      \multicolumn{2}{c}{\textbf{Inflation Outlook}}  \\
      \midrule
      \multicolumn{1}{c}{Positive} & \multicolumn{1}{c}{Negative}\\
      \midrule
      tighter labour markets  & fall below \tabularnewline
      higher energy price   & lower wage pressures \tabularnewline
      higher inflation &  disappointing \tabularnewline
      solid wage growth  & higher unemployment \tabularnewline
      build up  & unutilised capacity \tabularnewline
      higher pressure  & lower unit labour costs \tabularnewline
      stronger than expected & lower oil prices \tabularnewline
      upside risks  & contained \tabularnewline
      fast growing  & muted \tabularnewline
      second round effects  & sluggish \tabularnewline
      \bottomrule
    \end{tabular}
    \begin{tablenotes}[flushleft]
    \small
    \item\hskip -\fontdimen2\font\textit{Note}: The table shows a sample of $n$-grams and unigrams for each ECB field-specific dictionary.
    \end{tablenotes}
  \end{threeparttable}
\end{table}

\begin{table}
  \captionsetup{font=large, labelfont=bf}
  \centering
  \begin{threeparttable}
    \caption{Sample of $N$-grams and Unigrams for Each Topic}
    \label{tab: tab00002}
    \begin{tabular}{*{2}{wc{0.4\linewidth}}} 
      \toprule
      \multicolumn{2}{c}{\textbf{Monetary Policy}} \\
      \midrule
      \multicolumn{1}{c}{Dovish} & \multicolumn{1}{c}{Hawkish} \\
      \midrule
      favourable lending conditions &  higher commodity prices   \tabularnewline
      additional asset purchases &  increase interest rates \tabularnewline
      accommodative stance  & inflationary pressure  \tabularnewline
      increase the envelope  & strong fundamentals   \tabularnewline
      reduce interest rates  & counter upside risks  \tabularnewline
      heightened alertness &  rise in inflation \tabularnewline
      extension of credit & end purchases \tabularnewline
      liquidity provision & winding down  \tabularnewline
      weakening & rising wages   \tabularnewline
      subdued & withdrawal   \tabularnewline
      \midrule
      \multicolumn{2}{c}{\textbf{Economic Outlook}}\\
      \midrule
      \multicolumn{1}{c}{Positive} & \multicolumn{1}{c}{Negative} \\
      \midrule
      stronger than expected & negative cyclical momentum \tabularnewline
      growth momentum & heightened uncertainty   \tabularnewline
      positive outlook & revised downwards  \tabularnewline
      revised upwards & downside risks  \tabularnewline
      strong recovery &  vulnerabilities \tabularnewline
      encouraging & decelerating \tabularnewline
      upswing & disequilibria   \tabularnewline
      impetus  & contracting \tabularnewline
      surging & headwinds\tabularnewline
      upturn & softening \tabularnewline
      \midrule
      \multicolumn{2}{c}{\textbf{Inflation Outlook}}  \\
      \midrule
      \multicolumn{1}{c}{Positive} & \multicolumn{1}{c}{Negative}\\
      \midrule
      tighter labour markets  & fall below \tabularnewline
      higher energy price   & lower wage pressures \tabularnewline
      higher inflation &  disappointing \tabularnewline
      solid wage growth  & higher unemployment \tabularnewline
      build up  & unutilised capacity \tabularnewline
      higher pressure  & lower unit labour costs \tabularnewline
      stronger than expected & lower oil prices \tabularnewline
      upside risks  & contained \tabularnewline
      fast growing  & muted \tabularnewline
      second round effects  & sluggish \tabularnewline
      \bottomrule
    \end{tabular}
    \begin{tablenotes}[flushleft]
    \small
    \item\hskip -\fontdimen2\font\textit{Note}: The table shows a sample of $n$-grams and unigrams for each ECB field-specific dictionary.
    \end{tablenotes}
  \end{threeparttable}
\end{table}

\end{document}

Here is an alternative layout of your table that alos fits onto a single page in portrait orientation:

enter image description here

\documentclass[a4paper,11pt]{article}
\usepackage[english]{babel}
\usepackage{caption}   
\usepackage{threeparttable}           
\usepackage{booktabs} 
\usepackage{tabularx}
\usepackage{ragged2e}


\usepackage{enumitem}
\newlist{tabitem}{itemize}{1}
\setlist[tabitem]{label=--, noitemsep,leftmargin=*,topsep=0pt,partopsep=0pt, nosep, before=\begin{minipage}[t]{\hsize}, after=\end{minipage}}

\begin{document}


\begin{table}
  \captionsetup{font=large, labelfont=bf}
  \setlength{\tabcolsep}{4pt}
  \centering
  \begin{threeparttable}
    \caption{Sample of $N$-grams and Unigrams for Each Topic}
    \label{tab: tab00002}
    \begin{tabularx}{\linewidth}{@{}*{3}{>{\RaggedRight\arraybackslash}X}@{}} 
      \toprule
      \multicolumn{1}{c}{\textbf{Monetary Policy}} & \multicolumn{1}{c}{\textbf{Economic Outlook}} & \multicolumn{1}{c}{\textbf{Inflation Outlok}} \\
      \cmidrule(r){1-1}  \cmidrule(lr){2-2} \cmidrule(l){3-3}
      \multicolumn{1}{c}{Dovish} & \multicolumn{1}{c}{Positive} & \multicolumn{1}{c}{Positive} \\
      \cmidrule(r){1-1}  \cmidrule(lr){2-2} \cmidrule(l){3-3}
      
      \begin{tabitem}
      \item favourable lending conditions
      \item additional asset purchases 
      \item accommodative stance 
      \item increase the envelope
      \item reduce interest rates 
      \item heightened alertness 
      \item extension of credit 
      \item liquidity provision 
      \item weakening 
      \item subdued 
      \end{tabitem}
      &
      \begin{tabitem}
      \item stronger than expected 
      \item growth momentum 
      \item positive outlook  
      \item revised upwards 
      \item strong recovery 
      \item encouraging 
      \item upswing 
      \item impetus 
      \item surging 
      \item upturn 
      \end{tabitem}
      &
      \begin{tabitem}
       \item tighter labour markets
       \item higher energy price   
       \item higher inflation      
       \item solid wage growth     
       \item build up              
       \item higher pressure        
       \item stronger than expected
       \item upside risks          
       \item fast growing          
       \item second round effects  
      \end{tabitem}
      \\
      \cmidrule(r){1-1}  \cmidrule(lr){2-2} \cmidrule(l){3-3}
      \multicolumn{1}{c}{Hawkish} & \multicolumn{1}{c}{Negative} & \multicolumn{1}{c}{Negative} \\
      \cmidrule(r){1-1}  \cmidrule(lr){2-2} \cmidrule(l){3-3}
      \begin{tabitem}
      \item higher commodity prices   
      \item increase interest rates 
      \item inflationary pressure  
      \item strong fundamentals   
      \item counter upside risks  
      \item rise in inflation 
      \item end purchases 
      \item winding down  
      \item rising wages   
      \item withdrawal   
      \end{tabitem}
            &
      \begin{tabitem}
      \item negative cyclical momentum 
      \item heightened uncertainty   
      \item revised downwards  
      \item downside risks  
      \item vulnerabilities 
      \item decelerating 
      \item disequilibria   
      \item contracting 
      \item headwinds
      \item softening 
      \end{tabitem}
      &
      \begin{tabitem}
       \item fall below 
       \item lower wage pressures 
       \item disappointing 
       \item higher unemployment 
       \item unutilised capacity 
       \item unit labour costs 
       \item lower oil prices 
       \item contained 
       \item muted 
       \item sluggish 
      \end{tabitem}
      
      \\
      \bottomrule
    \end{tabularx}
    \begin{tablenotes}[flushleft]
    \small
    \item\hskip -\fontdimen2\font\textit{Note}: The table shows a sample of $n$-grams and unigrams for each ECB field-specific dictionary.
    \end{tablenotes}
  \end{threeparttable}
\end{table}
\end{document}
3

I would allow line breaks in the cells. I would also switch to a landscape format, in order to keep the number of line breaks manageable. Finally, I'd left-align rather than center the cell contents.

enter image description here

\documentclass[a4paper,11pt]{article}
\usepackage[margin=2.5cm]{geometry}
\usepackage{caption} 
\usepackage{threeparttable} 
\usepackage{booktabs} 
\usepackage{rotating} 
\usepackage{tabularx,ragged2e}
%% Left-aligned cell contents, automatic 
%%   line-breaking w/ hanging indentation
\newcolumntype{L}{>{\RaggedRight\hangafter=1\hangindent=1em}X}

\begin{document}
\begin{sidewaystable}
\captionsetup{font=large, labelfont=bf, skip=0.5\baselineskip}
\setlength{\tabcolsep}{4pt} % default: 6pt

\begin{threeparttable}
\caption{Sample of $n$-grams and unigrams for each topic}
\label{tab:tab00002}
\begin{tabularx}{\textwidth}{@{} *{6}{L} @{}} 

 \toprule

 \multicolumn{2}{c}{Monetary Policy} & 
 \multicolumn{2}{c}{Economic Outlook} & 
 \multicolumn{2}{c@{}}{Inflation Outlook} \\

 \cmidrule(r){1-2} \cmidrule(lr){3-4} \cmidrule(l){5-6} \\

 Dovish & Hawkish & Positive & Negative & Positive & Negative \\

 \midrule

favourable lending conditions & higher commodity prices & 
stronger than expected & negative cyclical momentum & 
tighter labour markets & fall below \\ \addlinespace

additional asset purchases & increase interest rates & 
growth momentum & heightened uncertainty & 
higher energy price & lower wage pressures \\ \addlinespace

accommodative stance & inflationary pressure & 
positive outlook & revised downwards & 
higher inflation & disappointing \\ \addlinespace

increase the envelope & strong fundamentals & 
revised upwards & downside risks & 
solid wage growth & higher unemployment \\ \addlinespace

reduce interest rates & counter upside risks & 
strong recovery & vulnerabilities & 
build up & unutilised capacity \\ \addlinespace

heightened alertness & rise in inflation & 
encouraging & decelerating & 
higher pressure & lower unit labour costs \\ \addlinespace

extension of credit & end purchases & 
upswing & disequilibria & 
stronger than expected & lower oil prices \\ \addlinespace

liquidity provision & winding down & 
impetus & contracting & 
upside risks & contained \\ \addlinespace

weakening & rising wages & 
surging & headwinds & 
fast growing & muted \\ \addlinespace

subdued & withdrawal & 
upturn & softening & 
second round effects & sluggish \\

 \bottomrule
\end{tabularx}

\smallskip\small
\begin{tablenotes}[flushleft]
\item\hskip-\fontdimen2\font\textit{Note}: The table shows a sample of $n$-grams and unigrams for each ECB field-specific dictionary.
\end{tablenotes}

\end{threeparttable}
\end{sidewaystable}

\end{document}
1
  • great answers! I learned quite a bit! Thanks
    – Rollo99
    Oct 16 at 18:48

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.