I'm setting a table of logarithms. I'm using longtable, and it works well. Every line of the table has a markboth reference, like so:
\textbf{1.03}\markboth{1.03}{1.03} & .01284 & .01326 & ...
\textbf{1.04}\markboth{1.04}{1.04} & .01703 & .01745 & ...
\textbf{1.05}\markboth{1.05}{1.05} & .02119 & .02160 & ...
My headings are generated using:
\makeatletter
\def\@oddhead{\thepage\qquad\textsc{Decimal Logarithms}\hfill
\rightmark{} -- \leftmark}
\def\@evenhead{\rightmark{} -- \leftmark \hfill
\textsc{Decimal Logarithms}\qquad\thepage}
\makeatother
The text in the running head is correct for most of the table: 1.00 – 1.47, 1.48 – 1.96, ... except the last page, which just displays 9.99 – 9.99, when it should be 9.81 – 9.99. The last page isn't quite filled by the table.
I've tried the methods suggested in Indexing an interval of words on top of every page, which only results in the last page having a single header of 9.99. My TeX is a bit rusty; haven't used it seriously in over a decade. Any assistance appreciated.
Update: Here's a test case just long enough to generate a page throw:
\documentclass{article}
\usepackage{longtable}
\pagestyle{headings}
\begin{document}
% page headings
\makeatletter
\def\@oddhead{\thepage{} \hfill \rightmark{} -- \leftmark{}}
\def\@evenhead{\rightmark{} -- \leftmark{} \hfill \thepage{}}
\makeatother
\begin{longtable}{|*{4}{c|}}
& 0 & 1 & 2 \\ \hline \endhead
\hline \endfoot
1.00\markboth{1.00}{1.00} & .00000 & .00043 & .00087 \\
1.01\markboth{1.01}{1.01} & .00432 & .00475 & .00518 \\
1.02\markboth{1.02}{1.02} & .00860 & .00903 & .00945 \\
1.03\markboth{1.03}{1.03} & .01284 & .01326 & .01368 \\
1.04\markboth{1.04}{1.04} & .01703 & .01745 & .01787 \\
1.05\markboth{1.05}{1.05} & .02119 & .02160 & .02202 \\
1.06\markboth{1.06}{1.06} & .02531 & .02572 & .02612 \\
1.07\markboth{1.07}{1.07} & .02938 & .02979 & .03019 \\
1.08\markboth{1.08}{1.08} & .03342 & .03383 & .03423 \\
1.09\markboth{1.09}{1.09} & .03743 & .03782 & .03822 \\
1.10\markboth{1.10}{1.10} & .04139 & .04179 & .04218 \\
1.11\markboth{1.11}{1.11} & .04532 & .04571 & .04610 \\
1.12\markboth{1.12}{1.12} & .04922 & .04961 & .04999 \\
1.13\markboth{1.13}{1.13} & .05308 & .05346 & .05385 \\
1.14\markboth{1.14}{1.14} & .05690 & .05729 & .05767 \\
1.15\markboth{1.15}{1.15} & .06070 & .06108 & .06145 \\
1.16\markboth{1.16}{1.16} & .06446 & .06483 & .06521 \\
1.17\markboth{1.17}{1.17} & .06819 & .06856 & .06893 \\
1.18\markboth{1.18}{1.18} & .07188 & .07225 & .07262 \\
1.19\markboth{1.19}{1.19} & .07555 & .07591 & .07628 \\
1.20\markboth{1.20}{1.20} & .07918 & .07954 & .07990 \\
1.21\markboth{1.21}{1.21} & .08279 & .08314 & .08350 \\
1.22\markboth{1.22}{1.22} & .08636 & .08672 & .08707 \\
1.23\markboth{1.23}{1.23} & .08991 & .09026 & .09061 \\
1.24\markboth{1.24}{1.24} & .09342 & .09377 & .09412 \\
1.25\markboth{1.25}{1.25} & .09691 & .09726 & .09760 \\
1.26\markboth{1.26}{1.26} & .10037 & .10072 & .10106 \\
1.27\markboth{1.27}{1.27} & .10380 & .10415 & .10449 \\
1.28\markboth{1.28}{1.28} & .10721 & .10755 & .10789 \\
1.29\markboth{1.29}{1.29} & .11059 & .11093 & .11126 \\
1.30\markboth{1.30}{1.30} & .11394 & .11428 & .11461 \\
1.31\markboth{1.31}{1.31} & .11727 & .11760 & .11793 \\
1.32\markboth{1.32}{1.32} & .12057 & .12090 & .12123 \\
1.33\markboth{1.33}{1.33} & .12385 & .12418 & .12450 \\
1.34\markboth{1.34}{1.34} & .12710 & .12743 & .12775 \\
1.35\markboth{1.35}{1.35} & .13033 & .13066 & .13098 \\
1.36\markboth{1.36}{1.36} & .13354 & .13386 & .13418 \\
1.37\markboth{1.37}{1.37} & .13672 & .13704 & .13735 \\
1.38\markboth{1.38}{1.38} & .13988 & .14019 & .14051 \\
1.39\markboth{1.39}{1.39} & .14301 & .14333 & .14364 \\
1.40\markboth{1.40}{1.40} & .14613 & .14644 & .14675 \\
1.41\markboth{1.41}{1.41} & .14922 & .14953 & .14983 \\
1.42\markboth{1.42}{1.42} & .15229 & .15259 & .15290 \\
1.43\markboth{1.43}{1.43} & .15534 & .15564 & .15594 \\
1.44\markboth{1.44}{1.44} & .15836 & .15866 & .15897 \\
1.45\markboth{1.45}{1.45} & .16137 & .16167 & .16197 \\
1.46\markboth{1.46}{1.46} & .16435 & .16465 & .16495 \\
1.47\markboth{1.47}{1.47} & .16732 & .16761 & .16791 \\
1.48\markboth{1.48}{1.48} & .17026 & .17056 & .17085 \\
1.49\markboth{1.49}{1.49} & .17319 & .17348 & .17377 \\
1.50\markboth{1.50}{1.50} & .17609 & .17638 & .17667 \\
1.51\markboth{1.51}{1.51} & .17898 & .17926 & .17955 \\
1.52\markboth{1.52}{1.52} & .18184 & .18213 & .18241 \\
1.53\markboth{1.53}{1.53} & .18469 & .18498 & .18526 \\
1.54\markboth{1.54}{1.54} & .18752 & .18780 & .18808 \\
1.55\markboth{1.55}{1.55} & .19033 & .19061 & .19089 \\
1.56\markboth{1.56}{1.56} & .19312 & .19340 & .19368 \\
1.57\markboth{1.57}{1.57} & .19590 & .19618 & .19645 \\
1.58\markboth{1.58}{1.58} & .19866 & .19893 & .19921 \\
1.59\markboth{1.59}{1.59} & .20140 & .20167 & .20194 \\
\end{longtable}
\end{document}