2

I have a problem with my table. Basically, I would like to leave a medium skip after the hline before the name of the models (i.e. after the line and before 1. Female).

I tried:

\documentclass{article}
\usepackage{rotating}
\begin{document}
\begin{sidewaystable}
\centering
\footnotesize{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{\textbf{Sensitivity Analysis II}\label{table5}} 
\begin{tabular}{l*{5}{c}}
\hline\hline 
&\multicolumn{1}{c}{\textbf{Fst Stage}}&\multicolumn{2}{c}{\textbf{Snd Stage}}&\multicolumn{1}{c}{\textbf{LL}}&\multicolumn{1}{c}{\textbf{$\rho$=0}} \smallskip \\
 &\multicolumn{1}{c}{\textbf{Lagged SF}}&\multicolumn{1}{c}{\textbf{SF}}&\multicolumn{1}{c}{\textbf{Fairness}}& &\\
 &\multicolumn{1}{c}{\textbf{(Country Level)}}&&&&\\
\hline \medskip
1. Female &0.012***& 0.009***& 0.1999***&3,504.223& -0.053***\\
2. Male \medskip\\ 
3. Europe\\
4. Africa\\
5. Asia\\
6. North America\\
7. South America\\ 
8. Others \medskip \\
9. Left-Oriented\\ 
10. Right-Oriented \medskip \\ 
11. Competition is bad\\ 
12. Competition is good \medskip \\ 
13. Married \\
14. Single\medskip \\ 
15. Turst Others\\
16. No Trust Others \smallskip\\
\hline\hline
\multicolumn{6}{l}{\footnotesize * \(p<0.10\), ** \(p<0.05\), *** \(p<0.01\)}\\
\multicolumn{6}{l}{\footnotesize Standard errors in parentheses}\\
\end{tabular}}
\end{sidewaystable}
\end{document}

Apparently it does not work. No matter where I try to put that skip (before or after hline or after &\multicolumn{1}{c}{\textbf{(Country Level)}}&&&&\\) I cannot leave any skip after the hline.

  • how about `\hline \medskip \`? – Runar Dec 28 '15 at 15:39
  • Nothing happens. Still I cannot introduce the medskip – Dario Dec 28 '15 at 15:43
1

Here are some improvements and a simplification of the code of your table. The row numbers are automated and right-aligned, emulating an enumerate environment, so that the text in the first column is always left-aligned. I also used booktabs, which makes some vertical padding around horizontal lines in tables, and defines an adjustable \addlinespace command , that allows easily separating groups of rows. Last, the makecell package allows for line breaks inside cells, and a common formatting of column/row heads.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{rotating}
\usepackage{caption, booktabs, makecell}
\usepackage{eqparbox}
\renewcommand\theadfont{\bfseries}
\captionsetup{font=bf}
\begin{document}

\begin{sidewaystable}
  \newcounter{rownum}\setcounter{rownum}{0}
  \setlength\defaultaddspace{1.25ex}
  \centering
  \footnotesize{
    \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
    \caption{Sensitivity Analysis II}\label{table5}
    \begin{tabular}{>{\refstepcounter{rownum}\eqmakebox[R][r]{\therownum.}\hskip\labelsep}l*{5}{c}}
      \toprule\midrule
      \multicolumn{1}{c}{}& \textbf{1\textsuperscript{st} Stage} &\multicolumn{2}{c}{\textbf{2\textsuperscript{nd} Stage}}& \textbf{LL}& \boldmath$ \rho=0 $ \\
      \multicolumn{1}{c}{} & \thead{Lagged SF & & & & \\(Country Level)}&\multicolumn{1}{c}{\textbf{SF}}&\multicolumn{1}{c}{\textbf{Fairness}}& &\\
      \cmidrule(lr){1-6}
      \addlinespace
      Female & 0.012*** & 0.009*** & 0.1999*** & 3,504.223 & -0.053*** \\
      Male\\
      \addlinespace
      Europe\\
      Africa\\
      Asia\\
      North America\\
      South America\\
      Others\\
      \addlinespace
      Left-Oriented\\
      Right-Oriented\\
      \addlinespace
      Competition is bad\\
      Competition is good\\
      \addlinespace
      Married \\
      Single\\
      \addlinespace
      Trust Others\\
      No Trust Others\\
      \midrule\bottomrule
      \addlinespace
      \multicolumn{6}{l}{\footnotesize * \(p<0.10\),\quad ** \(p<0.05\),\quad *** \(p<0.01\)}\\
      \multicolumn{6}{l}{\footnotesize Standard errors in parentheses}\\
    \end{tabular}}
\end{sidewaystable}

\end{document} 

enter image description here

2

You can use \noalign:

\documentclass{article}

\begin{document}

\begin{tabular}{l*{5}{c}}
\hline\hline
blb\\
\hline\noalign{\medskip}
1. Female &0.012***& 0.009***& 0.1999***&3,504.223& -0.053***\\
\end{tabular}

\end{document}

enter image description here

  • Thank you guys. Sorted. Both ways solve my problem. Dario – Dario Dec 28 '15 at 17:44
1

Adding a couple of \\seems to introduce some space. You can add medskip, or vspace{<length>}or other vertical spaces also, even negative.

\documentclass{article}
\usepackage{rotating}
\begin{document}
\begin{sidewaystable}
\centering
\footnotesize{
\def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
\caption{\textbf{Sensitivity Analysis II}\label{table5}} 
\begin{tabular}{l*{5}{c}}
\hline\hline \\
&\multicolumn{1}{c}{\textbf{Fst Stage}}&\multicolumn{2}{c}{\textbf{Snd Stage}}&\multicolumn{1}{c}{\textbf{LL}}&\multicolumn{1}{c}{\textbf{$\rho$=0}} \smallskip \\
 &\multicolumn{1}{c}{\textbf{Lagged SF}}&\multicolumn{1}{c}{\textbf{SF}}&\multicolumn{1}{c}{\textbf{Fairness}}& &\\
 &\multicolumn{1}{c}{\textbf{(Country Level)}}&&&&\medskip\\
\hline  \\
1. Female &0.012***& 0.009***& 0.1999***&3,504.223& -0.053***\\
2. Male \\ 
3. Europe\\
4. Africa\\
5. Asia\\
6. North America\\
7. South America\\ 
8. Others \medskip\\
9. Left-Oriented\\ 
10. Right-Oriented \medskip \\ 
11. Competition is bad\\ 
12. Competition is good \medskip \\ 
13. Married \\
14. Single\medskip \\ 
15. Turst Others\\
16. No Trust Others \smallskip\\
\hline\hline\\
\multicolumn{6}{l}{\footnotesize * \(p<0.10\), ** \(p<0.05\), *** \(p<0.01\)}\\
\multicolumn{6}{l}{\footnotesize Standard errors in parentheses}\\
\end{tabular}}
\end{sidewaystable}
\end{document}

Rotated table

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.