0

I'm new to this, but I'm using LaTeX to format my MA thesis. I have multiple troublesome tables that defy my attempts at making them fit appropriately on the page. In my current table, there are 6 columns, many of which have a lot of text. I, at one time, had my code producing the table with reduced column sizes. It was not the best looking table, as all the words were scrunched up and in bad form. But that same line of code no longer works and I'm not sure why.

I know there are a lot of questions regarding longtable width--I've been through dozens, and replicated their solutions. I don't know exactly what I'm doing wrong!

Here's my latest attempt at just producing the table, with no concern for the width (and even that won't work--it keeps saying I have an extra alignment tab, but I can't see it).

\usepackage{setspace}
\usepackage
[
        letterpaper,
        left=3.81cm,
        right=2.56cm,
        top=2.56cm,
        bottom=2.56cm
]
{geometry}
\usepackage{graphicx}
\usepackage[T1]{fontenc}
%\usepackage[parfill]{parskip}
\usepackage{times}
\frenchspacing
\usepackage{rotating}
\usepackage{longtable}
\usepackage[skip=0.5\baselineskip]{caption}

\begin{center} \begin{longtable}{llllll} \caption{Example of Measuring Complexity Using Attribute Recording} \label{tab-Example of Measuring Complexity Using Attribute Recording} Variable & Sector 1 & Sector 2 & Sector 3 & Sector 4 & ECS\ \hline Rim Tool & CWS & CWS & CWS & CWS & 0.25\ Rim Technique & Stamped & Stamped & Stamped & Stamped & 0.25\ Rim Configuration & Right Oblique & Right Oblique & Right Oblique & Right Oblique & 0.25\ Lip Element Placement & Top & Top & Top & Top & 0.25\ Lip Tool & CWS & CWS & CWS & CWS & 0.25\ Lip Technique & Stamped & Stamped & Stamped & Stamped & 0.25\ Lip Configuration & Right Oblique & Right Oblique & Right Oblique & Right Oblique & 0.25\ Decorative Element 1 Placement & Rim to Base & Rim to Base & Rim to Base & Rim to Base & 0.25\ Decorative Element 1Tool & CWS & CWS & CWS & CWS & 0.25\ Decorative Element 1 Technique & Stamped & Stamped & Stamped & Stamped & 0.25\ Decorative Element 1 Configuration & Right Oblique & Right Oblique & Right Oblique & Right Oblique & 0.25\ Rim Interior Design Tool & Plain & Plain & Plain & Plain & 0.25\ Rim Interior Design Technique & Plain & Plain & Plain & Plain & 0.25\ Rim Interior Design Configuration & Plain & Plain & Plain & Plain & 0.25\ Interior Decorative Element 1 Placement & Rim to Base & Rim to Base & Rim to Base & Rim to Base & 0.25\ Interior Decorative Element 1 Tool & Plain & Plain & Plain & Plain & 0.25\ Interior Decorative Element 1 Technique & Plain & Plain & Plain & Plain & 0.25\ Interior Decorative Element 1 Configuration & Plain & Plain & Plain & Plain & 0.25\ Rim Type & Non-Collared & Non-Collared & Non-Collared & Non-Collared & 0.25\ Rim Orientation & Outflaring & Outflaring & Outflaring & Outflaring & 0.25\ Exterior Rim Profile & Concave & Concave & Concave & Concave & 0.25\ Interior Rim Profile & Convex & Convex & Convex & Convex & 0.25\ Rim Shape & Non-Collared Straight & Non-Collared Straight & Non-Collared Straight & Non-Collared Straight & 0.25\ Lip Shape & Flat & Flat & Flat & Flat & 0.25\ Lip Angle & Right Angle & Right Angle & Right Angle & Right Angle & 0.25\ Exterior Surface Treatment 1 Placement & Plain & Plain & Plain & Plain & 0.25\ Exterior Surface Treatment 1 Type & Plain & Plain & Plain & Plain & 0.25\ Interior Surface Treatment 1 Placement & Plain & Plain & Plain & Plain & 0.25\ Interior Surface Treatment 1 Type & Plain & Plain & Plain & Plain & 0.25\ Base Morphology & Conoidal & Conoidal & Conoidal & Conoidal & 0.25\ Neck Morphology & Slightly Constricted & Slightly Constricted & Slightly Constricted & Slightly Constricted & 0.25\ Castellations & Not Castellated & Not Castellated & Not Castellated & Not Castellated & 0.25\ Decorative Complexity Score & & & & 8\ \hline \end{longtable} \end{center} \end{document}```

JGarr
  • 3

1 Answers1

1

The table will fit in a landscape orientation setting the width of the columns. Here the first five have the same width. (Using the package array).

Note how to add a caption to a longtable.

x

\documentclass[12pt,a4paper]{article}

\usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage[letterpaper, left=3.81cm, right=2.56cm, top=2.56cm, bottom=2.56cm ] {geometry} \usepackage{rotating} \usepackage{longtable} \usepackage{caption} \usepackage{pdflscape} % landscape

\usepackage{array} \renewcommand{\arraystretch}{1.7} % stretch the cells vertically \newcolumntype{C}{>{\arraybackslash}m{0.22\textwidth}}

\begin{document}

\begin{landscape} \pagestyle{empty} \begin{longtable}{CCC CCc} \caption{Example of Measuring Complexity Using Attribute Recording} \label{tab-Example} \endfirsthead \endhead \hline Variable & Sector 1 & Sector 2 & Sector 3 & Sector 4 & ECS \ \hline Rim Tool & CWS & CWS & CWS & CWS & 0.25\ Rim Technique & Stamped & Stamped & Stamped & Stamped & 0.25\ Rim Configuration & Right Oblique & Right Oblique & Right Oblique & Right Oblique & 0.25\ Lip Element Placement & Top & Top & Top & Top & 0.25\ Lip Tool & CWS & CWS & CWS & CWS & 0.25\ Lip Technique & Stamped & Stamped & Stamped & Stamped & 0.25\ Lip Configuration & Right Oblique & Right Oblique & Right Oblique & Right Oblique & 0.25\ Decorative Element 1 Placement & Rim to Base & Rim to Base & Rim to Base & Rim to Base & 0.25\ Decorative Element 1 Tool & CWS & CWS & CWS & CWS & 0.25\ Decorative Element 1 Technique & Stamped & Stamped & Stamped & Stamped & 0.25\ Decorative Element 1 Configuration & Right Oblique & Right Oblique & Right Oblique & Right Oblique & 0.25\ Rim Interior Design Tool & Plain & Plain & Plain & Plain & 0.25\ Rim Interior Design Technique & Plain & Plain & Plain & Plain & 0.25\ Rim Interior Design Configuration & Plain & Plain & Plain & Plain & 0.25\ Interior Decorative Element 1 Placement & Rim to Base & Rim to Base & Rim to Base & Rim to Base & 0.25\ Interior Decorative Element 1 Tool & Plain & Plain & Plain & Plain & 0.25\ Interior Decorative Element 1 Technique & Plain & Plain & Plain & Plain & 0.25\ Interior Decorative Element 1 Configuration & Plain & Plain & Plain & Plain & 0.25\ Rim Type & Non-Collared & Non-Collared & Non-Collared & Non-Collared & 0.25\ Rim Orientation & Outflaring & Outflaring & Outflaring & Outflaring & 0.25\ Exterior Rim Profile & Concave & Concave & Concave & Concave & 0.25\ Interior Rim Profile & Convex & Convex & Convex & Convex & 0.25\ Rim Shape & Non-Collared Straight & Non-Collared Straight & Non-Collared Straight & Non-Collared Straight & 0.25\ Lip Shape & Flat & Flat & Flat & Flat & 0.25\ Lip Angle & Right Angle & Right Angle & Right Angle & Right Angle & 0.25\ Exterior Surface Treatment 1 Placement & Plain & Plain & Plain & Plain & 0.25\ Exterior Surface Treatment 1 Type & Plain & Plain & Plain & Plain & 0.25\ Interior Surface Treatment 1 Placement & Plain & Plain & Plain & Plain & 0.25\ Interior Surface Treatment 1 Type & Plain & Plain & Plain & Plain & 0.25\ Base Morphology & Conoidal & Conoidal & Conoidal & Conoidal & 0.25\ Neck Morphology & Slightly Constricted & Slightly Constricted & Slightly Constricted & Slightly Constricted & 0.25\ Castellations & Not Castellated & Not Castellated & Not Castellated & Not Castellated & 0.25\ Decorative Complexity Score & & & & 8\ \hline \end{longtable}

\end{landscape}

\end{document

To improve the longtable transporting the headings and adding a footing

zz

Replace the beginning of the longtable with

\begin{longtable}{CCC CCc}
        \caption{Example of Measuring Complexity Using Attribute Recording} \\ \hline \label{tab-Example}%
            Variable & Sector 1 & Sector 2 & Sector 3 & Sector 4 & ECS \\
        \hline
        \endfirsthead
        \hline
            Variable & Sector 1 & Sector 2 & Sector 3 & Sector 4 & ECS \\
        \hline
        \endhead
        \hline
        \multicolumn{6}{r@{}}{to be continued \ldots}\\
        \endfoot        
        Rim Tool & CWS & CWS & CWS & CWS & 0.25\\
        Rim Technique & Stamped & Stamped & Stamped & Stamped & 0.25\\
Simon Dispa
  • 39,141