Graphics, Figures & Tableslongtable | Column Alignment

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
marie2011
Posts: 138
Joined: Mon Feb 06, 2012 4:58 pm

longtable | Column Alignment

Post by marie2011 »

Dear forum members,

The second column of this table should be aligned in the left side so that it appears homogeneous. Do I have to work with "tabular"?

Here is the table:

Code: Select all

\documentclass[
12pt,%
%  draft,%
  twoside,%
  BCOR10mm,%
%  bibtotocnumbered,% <= obsolete
  bib=totoc,        % <= recommended
toc=listof,
toc=bibliography,
numbers=noenddot
]{scrreprt}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,ngerman,catalan,english]{babel}
\usepackage{longtable}
\usepackage{tabu}

\begin{document}
\begin{longtable}{lp{.2\linewidth}  p{.6\linewidth}}
  \caption{Resumen}
 \label{tab:etapas}  \\
  \toprule
   \textbf{Nume.} & \textbf{Etapa} &\textbf{Descripción} \\
  \midrule
 \endfirsthead
  \caption[]{Resumen}
 \label{tab:etapas } \\
  \toprule
   \textbf{Nume.} &  \textbf{Etapa}&      \textbf{Descripción} \\
  \midrule
 \endhead
  \midrule
    &\hfill\emph{continuación} \\
  \bottomrule
 \endfoot
  \bottomrule
 \endlastfoot

1.& This is the part which should be aligned in the left side & A brief description of the phase is given

\end{lontable}
\end{document}
Many, many thanks in advance.


Regards,
Marie

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

sommerfee
Posts: 503
Joined: Mon Apr 09, 2007 4:20 pm

longtable | Column Alignment

Post by sommerfee »

I can't compile your sample document:

Code: Select all

! Undefined control sequence.
<recently read> \toprule 
                         
l.23   \toprule
and

Code: Select all

! LaTeX Error: \begin{longtable} on input line 20 ended by \end{lontable}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.42 \end{lontable}
After fixing these two errors I cannot reproduce your problem. The 2nd column is actually left-aligned.
Post Reply