# scrheadings and longtable alignment problems [closed]

I'm using classicthesis for my work and have a few large tables in the work. I like the option of having the chapter and section name at the top of the page so I use the \pagestyle{scrheadings} option. However, whenever I use scrheadings, the alignment in the longtable becomes erratic. It can be bad as shown in the figure below

or slightly better than that but the alignment definitely changes a bit by one or two characters.

Currently, I have it as shown in the second picture. Is there any way I can rectify this problem? I would appreciate any help a lot.

EDIT: Thanks for the very quick responses! I figured out that this problem was associated with \pagestyle{scrheadings} in my post from some time ago (Longtable column problem: column alignment changes). Basically, the code is similar to:

\documentclass[twoside,openright,titlepage,fleqn,numbers=noenddot,headinclude,%1headlines,% letterpaper a4paper
11pt,a4paper,BCOR5mm,footinclude=true,cleardoublepage=empty,abstractoff % <--- obsolete, remove (todo)
]{scrreprt}
\usepackage{lscape}
\usepackage{longtable}
\begin{landscape}
\begin{small}
\begin{longtable}{cccccccccccccccc}
\caption[HTML Test Table]{Table shows the problem that I am facing with the correct alignment of all columns. I do not know hat is going on and I have been working on this for quite a while now, but with no success...}\label{c0B:tab:6kvis_full}\\
\hline
\multicolumn{1}{c}{HTM Name}&
\multicolumn{1}{c}{Northing}&
\multicolumn{1}{c}{Easting}&
\multicolumn{1}{c}{Val1}&
\multicolumn{1}{c}{Val1.1}&
\multicolumn{1}{c}{Val4.8}&
\multicolumn{1}{c}{Val5.6}&
\multicolumn{1}{c}{Val9.8}&
\multicolumn{1}{c}{A}&
\multicolumn{1}{c}{B}&
\multicolumn{1}{c}{C}&
\multicolumn{1}{c}{D}&
\multicolumn{1}{c}{E}&
\multicolumn{1}{c}{F}&
\multicolumn{1}{c}{Num1}&
\multicolumn{1}{c}{Num2}\\
\cline{4 - 8}
%NextLine
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{(Northing)}&
\multicolumn{1}{c}{(Easting)}&
\multicolumn{5}{c}{(NanoSec)}&
\multicolumn{0}{c}{}&
\multicolumn{0}{c}{}&
\multicolumn{0}{c}{}&
\multicolumn{0}{c}{}&
\multicolumn{0}{c}{}&
\multicolumn{0}{c}{}&
\multicolumn{0}{c}{}&
\multicolumn{0}{c}{}\\*
\hline
\multicolumn{16}{c}{Continued Table}\\
\hline
\multicolumn{1}{c}{HTM Name}&
\multicolumn{1}{c}{Northing}&
\multicolumn{1}{c}{Easting}&
\multicolumn{1}{c}{Val1}&
\multicolumn{1}{c}{Val1.1}&
\multicolumn{1}{c}{Val4.8}&
\multicolumn{1}{c}{Val5.6}&
\multicolumn{1}{c}{Val9.8}&
\multicolumn{1}{c}{A}&
\multicolumn{1}{c}{B}&
\multicolumn{1}{c}{C}&
\multicolumn{1}{c}{D}&
\multicolumn{1}{c}{E}&
\multicolumn{1}{c}{F}&
\multicolumn{1}{c}{Num1}&
\multicolumn{1}{c}{Num2}\\
\cline{4 - 8}
%NextLine
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{(Northing)}&
\multicolumn{1}{c}{(Easting)}&
\multicolumn{5}{c}{(NanoSec)}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}\\*
\hline
\hline
\multicolumn{16}{c}{Continued on next page \dots}
\endfoot
\hline
\endlastfoot
%Data starts here

HTM20 M000012233919&00:00:12.78&-23:39:19.96&98&63&63&&104&-0.29&-0.22&-0.02&0.00&0.31&0.53&0.94&0.99\\
HTM20 M000020-322101&00:00:20.38&-32:21:01.23&118&315&515&521&322&-0.01&-0.28&-0.56&-0.84&-1.03&-1.17&0.97&1.06\\
HTM20 M000105-155107&00:01:05.42&-15:51:07.20&297&295&257&348&-&-0.24&-0.21&-0.06&0.23&0.10&0.01&0.93&0.97\\
HTM20 M000106-174126&00:01:06.31&-17:41:26.21&73&-&-&447&-&-&-&-0.69&-&-&-&0.85&1.14\\
HTM20 M000118-074626&00:01:18.04&-07:46:26.86&177&-&-&208&-&-&-&-0.06&-&-&-&0.91&0.99\\
HTM20 M000124-043759&00:01:24.50&-04:37:59.61&50&-&-&632&-&-&-&-0.96&-&-&-&0.42&0.56\\
HTM20 M000713-402337&00:07:13.41&-40:23:37.43&69&89&97&-&98&-0.01&-0.04&-0.11&-0.15&-0.24&-0.30&0.9&1.02\\
HTM20 M000720-611306&00:07:20.56&-61:13:06.73&150&138&134&-&86&0.26&0.20&0.18&0.05&0.08&0.10&0.97&0.98**\\
HTM20 M000800-233918&00:08:00.42&-23:39:18.04&154&-&-&374&-&-&-&-0.34&-&-&-&0.94&0.97\\
HTM20 M000801-524339&00:08:01.71&-52:43:39.90&124&127&101&-&256&-0.53&-0.30&-0.23&0.39&0.14&-0.03&0.98&1.05\\
HTM20 M000821-394522&00:08:21.18&-39:45:22.9&146&169&188&150&134&0.18&0.07&-0.01&-0.18&-0.18&-0.17&--&--\\
HTM20 M000826-255911&00:08:26.27&-25:59:11.29&120&259&360&468&-&-0.21&-0.33&-0.52&-0.56&-0.77&-0.92&0.92&0.95\\
HTM20 M000828-132930&00:08:28.02&-13:29:30.32&161&-&-&192&-&-&-&-0.07&-&-&-&0.96&--\\
HTM20 M000829-055845&00:08:29.33&-05:58:45.27&66&-&-&1322&-&-&-&-1.14&-&-&-&0.66&0.68\\
HTM20 M000831-141959&00:08:31.08&-14:19:59.93&53&-&-&604&-&-&-&-0.92&-&-&-&0.79&--\\
HTM20 M000837-461940&00:08:37.53&-46:19:40.85&75&98&95&-&114&-0.10&-0.06&-0.13&0.05&-0.17&-0.32&1.0&1.0\\
HTM20 M002122-513011&00:21:22.06&-51:30:11.9&49&59&56&-&45&0.12&0.12&0.03&0.21&-0.21&-0.22&1.11&--\\
HTM20 M002127-161028&00:21:27.55&-16:10:28.82&69&92&61&55&-&0.08&0.28&0.21&0.70&0.21&-0.34&0.95&1.01\\
HTM20 M002135-321637&00:21:35.67&-32:16:37.39&221&275&313&388&559&-0.17&-0.19&-0.21&-0.22&-0.24&-0.26&0.79&--\\
\hline
\end{longtable}
\end{small}
\end{landscape}


In the first figure:

1. The table heading does not span the whole table.
2. Alignment changes some way into the table. I've now realized that this happens close to where either the section name or chapter name is located at the top of the table.

Currently, the first problem has been solved (at least it is spanning the whole table) but the alignment does change as shown in Figure 2.

-

## closed as unclear what you're asking by Joseph Wright♦Aug 13 '13 at 5:50

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

Please tell us something about the numbers in your first picture, at least no. 1. –  Speravir May 4 '13 at 23:32
Please compose a minimal working example allowing us to reproduce the problem mentioned. –  Gonzalo Medina May 4 '13 at 23:51
the images look like standard longtable behaviour on initial runs before all column widths have been determined. Does not running latex again resolve the issue? –  David Carlisle Aug 12 '13 at 23:45