If I understand your question correctly, you're looking for some code to create running heads that are similar to those in the Tufte-LaTeX document classes. The running heads display the page numbers and chapter/section heading. In the Tufte-LaTeX document classes, the running heads extend beyond the main text block into the margin notes area.
The following code is based on the Tufte-LaTeX code and will achieve the same effect using the regular LaTeX document classes (e.g., book
and article
). It may or may not work with other document classes such as memoir
. (If it doesn't, it's likely that you'll just need to adjust the names of the lengths to match those used by your document class. The logic should remain similar.)
\documentclass{book}% or article
% The geometry package isn't required; it's just here to set the margins for
% this demonstration.
\usepackage{geometry}
\geometry{%showframe,% draws lines to show margins
%asymmetric,% if you want the margin notes to always appear on the right side of the page
% the following are the margins used by the Tufte-LaTeX document classes
letterpaper,
left=1in,
top=1in,
headsep=2\baselineskip,
textwidth=26pc,
marginparsep=2pc,
marginparwidth=12pc,
textheight=44\baselineskip,
headheight=\baselineskip
}
\usepackage{ifthen}% for the \ifthenelse macro
% The Tufte-style running heads are defined similarly to the macros below.
% These macros avoid using Tufte-specific code, but may still be overkill for a
% particular document class. (For example, they detect if you're in twoside
% mode and use different running heads based on that.
\usepackage{fancyhdr}
\pagestyle{fancy}
\makeatletter% so we can use macros with @ in their names
% Set the header/footer width to be the body text block plus the margin
% note area.
\newlength{\overhanglength}
\AtBeginDocument{%
% Calculate the amount to extend the running heads
\setlength{\overhanglength}{\marginparwidth}
\addtolength{\overhanglength}{\marginparsep}
% Set the running head offsets to the overhang length calculated above
\ifthenelse{\NOT\boolean{@mparswitch}\AND\boolean{@twoside}}
{\fancyhfoffset[RE,RO]{\overhanglength}}% asymmetric
{\fancyhfoffset[LE,RO]{\overhanglength}}% symmetric
}
% The running heads/feet don't have rules
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
\fancyhf{} % clear any existing header and footer fields
% adjust the formatting code to suit your tastes here
\ifthenelse{\boolean{@twoside}}{%
\fancyhead[LE]{\thepage\quad\leftmark}%
\fancyhead[RO]{\rightmark\quad\thepage}%
}{%
\fancyhead[RE,RO]{\rightmark\quad\thepage}%
}
\makeatother% restore the original meaning of @
\usepackage{blindtext}% provides filler text
\begin{document}
\Blinddocument% filler text
\end{document}
tufte
package does not fit your requirements?