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 use ltablex package for creating tables. How can i change the caption name for the continuation of the table, as in the picture?

enter image description here

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

ltablex combines longtable and tabularx. longtable provides commands to define a first and a general header as well as a general and a last footer. These commands are actually used in the (admittedly brief) ltablex documentation, but a continued caption, which would be used in the general header (or footer), is not part of the example. The header/footer commands are described in the longtable documentation.

The code given below shows their use with ltablex. The continued caption is defined in the general header. I've also added an example using longtabu from the more recent tabu package, which offers a convenient way to define flexible X columns.

enter image description here

\documentclass{article}
\usepackage{lipsum}
\usepackage{booktabs}

\usepackage{ltablex}
%if longtabu is used, longtable needs to be loaded (which ltablex already does in this document)
%\usepackage{longtable} 
\usepackage{tabu}

\textheight4in                      %to force a page break after a few rows
\renewcommand{\arraystretch}{1.5}   %improve spacing

\begin{document}

\begin{tabularx}{\textwidth}{XX}     
        \caption{A Table}\\
        \toprule
        First Header &  \\
        \toprule
    \endfirsthead
        \caption{A Table (continued)}\\
        \toprule        
        Header & \\
        \toprule
    \endhead
        \bottomrule
        Footer &  \\
        \bottomrule
    \endfoot
        \bottomrule
        Last Footer &  \\
        \bottomrule    
    \endlastfoot     

    Text & \lipsum[75]\\
    Text & \lipsum[75]\\
    Text & \lipsum[75]\\
\end{tabularx}

\begin{longtabu} to \textwidth {X[1,l]      %aligned left
                                X[2,l]}     %twice as wide as first column
        \caption{A Table}\\
        \toprule
        First Header &  \\
        \toprule
    \endfirsthead
        \caption{A Table (continued)}\\
        \toprule        
        Header & \\
        \toprule
    \endhead
        \bottomrule
        Footer &  \\
        \bottomrule
    \endfoot
        \bottomrule
        Last Footer &  \\
        \bottomrule    
    \endlastfoot
    Text & \lipsum[75]\\
    Text & \lipsum[75]\\
    Text & \lipsum[75]\\
\end{longtabu}

\end{document}
share|improve this answer
add comment

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.