Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a table which gives an overview of some theory. It includes a lot of words or combination of words.

The layout is horrible and not LaTeX quality.

Some guidance as to how to improve would be welcome.

my MWE table is as follows

    \documentclass[11pt,pdftex]{report}

\usepackage{booktabs}
\usepackage[a4paper]{geometry}
\usepackage{tabularx}
\usepackage{microtype}

\geometry{
  includeheadfoot,
  margin=2.5cm,
  hdivide={ ,19cm, }  
}
\setlength{\hoffset}{0.00cm}
\setlength{\voffset}{0.00cm}


\begin{document}
\begin{table}[htdp]
  \caption{Pillar of Institutions}\label{tab:Pillars}
\centering
\begin{tabularx}{0.99\textwidth}{lXXX} 
  \toprule
                          & Regulative & Normative& Cultural-cognitive \\ 
\midrule
Basis of  \linebreak compliance       &Expedience& Social obligation & Take-for-grantedness \linebreak Shared understanding\\
Basis of order & Regulative rules& Binding Expectations &Constitutive Schema\\
Mechanisms & Coercive     &Normative & Mimetic\\
Logic &instrumentally     & Appropriateness& Orthodoxy\\
Indicators & Rules \linebreak Laws  \linebreak Sanctions    &Certifications \linebreak Accreditation  & Common beliefs\linebreak Shared logic of action\\
Basis of legitimacy      &Legally sanctioned & Morally governed & Comprehensible \linebreak Recognisable \linebreak Culturally supported\\
Supported by &Economists  & Early Sociologist & Late Sociologist\\
Primary Propagandists     & North & Selznick & DiMaggio and Powell, Scott\\
Degree of formality       &Formal institutions &Informal institutions&Informal institutions\\
\bottomrule
\end{tabularx}
\end{table}

\end{document}

enter image description here

share|improve this question
    
Could you please add a preamble to the MWE? This makes it easier for us to help. –  biologue Aug 9 '13 at 8:04

3 Answers 3

up vote 10 down vote accepted

You already have some nice touches in your table's design, such as the use of the booktabs package and its associated horizontal line-drawing macros and the avoidance of any vertical rules. I recommend doing the following on top of what you've already done:

  • Use ragged-right look in the columns (no ugly huge interword spaces)
  • By (i) omitting vertical whitespace before the first column and after the last column, (ii) reducing the intercolumn whitespace a bit relative to the LaTeX default, and (iii) varying the default relative widths of the three X columns, you can get rid of virtually all unpleasant line breaks
  • If you set the tabularx group to the full width of the text block, you don't need the \centering instruction. I'd insert a \smallskip, though, to insert a bit of space between the caption and the table's \toprule.

enter image description here

\documentclass[11pt]{report}
\usepackage{booktabs,microtype}
\usepackage[a4paper]{geometry}
\geometry{
  includeheadfoot,
  margin=2.5cm,
  hdivide={ ,19cm, }  
  }
\usepackage{tabularx,ragged2e}
\newcolumntype{Y}{>{\RaggedRight\arraybackslash}X} % modified "X" column

\begin{document}
\begin{table}[htp]
\setlength{\tabcolsep}{4pt}  % slight reduction from default value
\caption{Pillar of Institutions}\label{tab:Pillars}
\smallskip
\begin{tabularx}{\textwidth}{@{} l
  >{\hsize=0.92\hsize}Y      % One can vary widths of "X" column types, 
  >{\hsize=1.04\hsize}Y      % as long as the factors add up to number of 
  >{\hsize=1.04\hsize}Y @{}} % columns of type "X" 
\toprule
 & Regulative & Normative& Cultural-cognitive \\ 
\midrule
Basis of compliance  &Expedience& Social obligation & Take-for-grantedness \linebreak Shared understanding\\
Basis of order & Regulative rules& Binding Expectations &Constitutive Schema\\
Mechanisms & Coercive     &Normative & Mimetic\\
Logic &instrumentally     & Appropriateness& Orthodoxy\\
Indicators & Rules \linebreak Laws  \linebreak Sanctions    &Certifications \linebreak Accreditation  & Common beliefs\linebreak Shared logic of action\\
Basis of legitimacy      &Legally sanctioned & Morally governed & Comprehensible \linebreak Recognisable \linebreak Culturally supported\\
Supported by &Economists  & Early Sociologist & Late Sociologist\\
Primary Propagandists     & North & Selznick & DiMaggio and Powell, Scott\\
Degree of formality       &Formal institutions &Informal institutions&Informal institutions\\
\bottomrule
\end{tabularx}
\end{table}
\end{document}
share|improve this answer
1  
Nice but I think due to the last column you need some vertical row spacing around each row group. –  percusse Aug 9 '13 at 11:13

The manual to the booktabs package offers useful advice on what the author refers to as the layout of formal tables (see page 3, for example). Coincidently, the visually clean layout he advocates is also the one found in many of the engineering textbooks and journals I have consulted.

For typesetting tables I almost always use the extremely flexible ctable package. Here's a simple example:

\documentclass[11pt]{report}

\usepackage{ctable} % loads array, booktabs, and tabularx packages
\usepackage{etoolbox} % eTeX toolbox for class and package authors
\usepackage{microtype}

\usepackage[a4paper]{geometry}

\geometry{
  includeheadfoot,
  margin=2.5cm,
  hdivide={ ,19cm, }  
}

\setlength{\hoffset}{0.00cm}
\setlength{\voffset}{0.00cm}

% change definition of horizontal or vertical text alignment
% for the X column specifier of the tabularx (or ctable) package
% (p = top align, m = middle align, b = bottom align)
% e.g., \tabXcol{\small\raggedright}, \tabXcol[m]{\raggedright}
\newrobustcmd*{\tabXcol}[2][p]{\renewcommand{\tabularxcolumn}[1]{>{#2\arraybackslash}#1{##1}}}

\begin{document}

{\tabXcol{\raggedright}%
\ctable[
  table,
  pos=h!,
  %
  maxwidth=1.0\textwidth,
  %
  caption = {Pillar of Institutions.},
  %
  label=tab:Pillars,
  %
  doinside={\small},
]{@{}llXX@{}}{}{
                                                                                                 \toprule
                      & Regulative          & Normative             & Cultural-cognitive         \\ 
                                                                                                 \midrule
Basis of compliance   & Expedience          & Social obligation     & Take-for-grantedness       \\
                      &                     &                       & Shared understanding       \\
                                                                                                 \addlinespace
Basis of order        & Regulative rules    & Binding Expectations  & Constitutive Schema        \\
                                                                                                 \addlinespace
Mechanisms            & Coercive            & Normative             & Mimetic                    \\
                                                                                                 \addlinespace
Logic                 & instrumentally      & Appropriateness       & Orthodoxy                  \\
                                                                                                 \addlinespace
Indicators            & Rules               & Certifications        & Common beliefs             \\
                      & Laws                & Accreditation         & Shared logic of action     \\
                      & Sanctions           &                       &                            \\
                                                                                                 \addlinespace
Basis of legitimacy   & Legally sanctioned  & Morally governed      & Comprehensible             \\
                      &                     &                       & Recognisable               \\
                      &                     &                       & Culturally supported       \\                                                                                                                               \addlinespace
Supported by          & Economists          & Early Sociologist     & Late Sociologist           \\
                                                                                                 \addlinespace
Primary Propagandists & North               & Selznick              & DiMaggio and Powell, Scott \\
                                                                                                 \addlinespace
Degree of formality   & Formal institutions & Informal institutions & Informal institutions      \\
                                                                                                 \addlinespace
                                                                                                 \bottomrule
}}%

\end{document}

enter image description here

share|improve this answer
    
Notice that the scope of \tabXcol in my example is limited to that particular table due to the use of braces. –  nnunes Aug 9 '13 at 9:35

My very quick take:

enter image description here

\documentclass[11pt,pdftex]{report}

\usepackage{booktabs}
\usepackage[a4paper]{geometry}
\usepackage{tabularx}
\usepackage{microtype}

\geometry{
  includeheadfoot,
  margin=2.5cm,
  hdivide={ ,19cm, }  
}
\setlength{\hoffset}{0.00cm}
\setlength{\voffset}{0.00cm}

\begin{document}
\begin{table}[htdp]
  \caption{Pillar of Institutions}\label{tab:Pillars}
\centering
\begin{tabularx}{0.99\textwidth}{lXXX} 
  \toprule
                          & Regulative & Normative& Cultural-cognitive \\ 
\midrule \midrule
\textit{Basis of compliance} & Expedience & Social obligation & Take-for-grantedness \linebreak Shared understanding\\ \midrule
\textit{Basis of order} & Regulative rules& Binding Expectations &Constitutive Schema\\ \midrule
\textit{Mechanisms} & Coercive & Normative & Mimetic\\ \midrule
\textit{Logic} & instrumentally & Appropriateness& Orthodoxy\\ \midrule
\textit{Indicators} & Rules \linebreak Laws  \linebreak Sanctions    &Certifications \linebreak Accreditation  & Common beliefs\linebreak Shared logic of action\\ \midrule
\textit{Basis of legitimacy} & Legally sanctioned & Morally governed & Comprehensible \linebreak Recognisable \linebreak Culturally supported\\ \midrule
\textit{Supported by} & Economists & Early Sociologist & Late Sociologist\\ \midrule
\textit{Primary Propagandists} & \textsc{North} & \textsc{Selznick} & \textsc{DiMaggio} and \textsc{Powell, Scott}\\ \midrule
\textit{Degree of formality} & Formal institutions & Informal institutions&Informal institutions\\
\bottomrule
\end{tabularx}
\end{table}

\end{document}

What one could still optimize:

  • Text justification in last column (I don't know how to do this)
  • Use shading instead of lines to better separate rows
share|improve this answer
1  
Using the array package, adding >{\raggedright} before the letters in the column specification will fix the justification in the corresponding columns. See the LaTeX Wikibook. –  ChrisS Aug 9 '13 at 9:20
    
+1 good use of (much maligned) midrules, although I would make them slightly lighter, if possible. An alternative, depending on the ultimate output medium, might be to alternate background colours of the rows between white and light grey. –  naught101 Aug 9 '13 at 12:14
    
the vertical spacing between successive entries in the same column is less than the baselineskip for a multi-line entry; this is evident in the first cell of the last column. –  barbara beeton Aug 9 '13 at 12:38
    
I'm not saying this is perfect, just a quick idea. Feel free to modify it. –  biologue Aug 9 '13 at 18:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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