I'm trying to get LaTeX to print at the foot of each page the range of paragraph numbers contained in that page: e.g. 1-5, 6-13, and so on until the end. To do this, the explanation given in the fancyhdr manual (p. 11) on how to make dictionary headings has helped me a lot, and it feels like I'm almost there -- but not quite. The paragraph numbers, for which I created a new counter, still don't come out right.
Here's a minimal code example. Would you mind taking a look at it? I think the main problem may be in the line
Code: Select all
\markboth{\value{parnum} #1}{\value{parnum} #1}},
Thank you for your help,
LJM
Code: Select all
\documentclass[12pt,twoside]{article}
%DEFINE NEW COUNTER
\newcounter{parnum}
\newcommand{\N}{%
\noindent\refstepcounter{parnum}
\makebox[\parindent][l]{\arabic{parnum}}}
\setlength{\parindent}{2em}
%SETTING UP NEW PAGE FOOT
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\renewcommand{\headrulewidth}{0pt} %no rule
\renewcommand{\sectionmark}[1]{} %empty sectionmark
\renewcommand{\subsectionmark}[1]{} %empty subsectionmark
\markboth{\value{parnum} #1}{\value{parnum} #1}}
\fancyhf{}
\newcommand{\mymarks}
{
\ifthenelse{\equal{\leftmark}{\rightmark}}
{\rightmark}
{\rightmark--\leftmark}
}
\fancyfoot[LE,RO]{\thepage}
\fancyfoot[RE,LO]{\mymarks}
\begin{document}
\N This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
\N This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
\N This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph. This is a paragraph.
.
.
.
\end{document}