I've been using the longtable
package in order to create a multiple page table. However, I want all of my column names to be different and am having a hard time getting it to work properly. While I've found examples that show how to vary the column names across two pages, I haven't been able to get three pages (or more) to show the proper column names. The first set of names shows up on the first page, but then the third set is at the top of the remainder of pages. I have 43 columns, so trying to force them all onto 2 pages would probably render them illegible. Any advice or suggestions?
\begin{longtable}{lcccccccccccr}
\textbf{HIP}& \textbf{(X,Y,Z)}& \textbf{[Li/H]}& \textbf{[C/H]}& \textbf{[N/H]}& \textbf{[O/H]}& \textbf{[Na/H]}& \textbf{[Mg/H]} & \textbf{[Al/H]}& \textbf{[Si/H]}& \textbf{[S/H]} & \textbf{[K/H]}& \textbf{[Ca/H]} \\
\hline
\endfirsthead
\multicolumn{13}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
\textbf{HIP} & \textbf{[CaII/H]} & \textbf{[Sc/H]}& \textbf{[ScII/H]}& \textbf{[Ti/H]}& \textbf{[TiII/H]}& \textbf{[V/H]}& \textbf{[VII/H]}& \textbf{[Cr/H]} & \textbf{[CrII/H]} & \textbf{[Mn/H]} & \textbf{[Fe/H]}& \textbf{[FeII/H]} \\
\endhead
\hline \multicolumn{13}{c}{\textit{Continued on next page}} \\
\endfoot
\multicolumn{13}{c}%
{\tablename\ \thetable\ -- \textit{Continued from previous page}} \\
\hline
\textbf{HIP} & \textbf{[Co/H]} & \textbf{[Ni/H]}& \textbf{[Cu/H]}& \textbf{[Zn/H]}& \textbf{[Sr/H]}& \textbf{[Y/H]}& \textbf{[YII/H]}& \textbf{[Zr/H]} & \textbf{[ZrII/H]} & \textbf{[Mo/H]} & \textbf{[Ru/H]}& \textbf{[Ba/H]} \\
\endhead
\hline \multicolumn{13}{c}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
[data]
\end{longtable}
\endhead
commands and so the last one is overwriting the previous one. You can only have three different header specifications AFAIK: for the first, last and all other pages. You could add the header line as custom macro which changes its definition at every use. (Just an idea without actual solution to show, so I add it as comment, not as an answer)