How do I manually set page headers? In my example below, all the page headers are the same as the last instance of \rhead{7}. Is there any way to renew the page header to the first instance of \rhead{#} on that specific page?
As an example, say I typeset a bible and after compilation a page happens to contain a bit of overflow from Genesis 1, the whole of Genesis 2, and the first bit of Genesis 3 and say I respectively evoked \rhead{Genesis 1}, \rhead{Genesis 2}, and \rhead{Genesis 3} after the chapter definitions in the source, I would want the header of the page to then be Genesis 1.
As a bonus, it would be even nicer if the header contains the accumulation of chapters on the page so that the header is Genesis 1, 2, 3, but I am not sure if that is easily achievable.
This process also don't have to be fully automatic; my document is the output of a python script and I can iteratively inject complex latex code anywhere in the document as my heart pleases.
\documentclass[afrikaans, english, oneside,openany,a4paper]{book}
\usepackage{parcolumns}
\setlength{\parindent}{0.0em}
\setlength{\parskip}{0.0em}
\usepackage{xunicode}
\usepackage[T1]{fontenc}
\usepackage[margin=1.0in]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
0
\\ \\
\vspace{100 mm}
\\ \\
\vspace{100 mm}
\\ \\
\vspace{100 mm}
\\ \\
1\rhead{1}
\vspace{100 mm}
\\ \\
2\rhead{2}
\\ \\
3\rhead{3}
\\ \\
4\rhead{4}
\\ \\
\vspace{100 mm}
\\ \\
\vspace{100 mm}
\\ \\
\vspace{100 mm}
\\ \\
\vspace{100 mm}
\\ \\
5\rhead{5}
\\ \\
\vspace{100 mm}
\\ \\
\vspace{100 mm}
\\ \\
\vspace{100 mm}
\\ \\
\vspace{100 mm}
\\ \\
6\rhead{6}
\\ \\
7\rhead{7}
\end{document}

\rhead{\rightmark}in the preambel and\markright{whatever}in the document. – Ulrike Fischer Oct 07 '14 at 12:17Genesis 2, which is better thanGenesis 3(the last chapter on the page), but still notGenesis 1as I desired (the overflowed text from the previous page's last chapter). Any-case, this might actually be a better and more standard solution than what I initially wanted. – Simon Streicher Oct 07 '14 at 12:57