8

Is there any package right similar to tufte-book?

Using \marginpar, the following (Default) could be produced, but I want to have the Target; i.e. to spread the page header over the margin.

enter image description here

Finally I want to produce the page header positioned like the following .

enter image description here

8
  • 3
    Could you explain in a little more detail in what way the tufte package does not fit your requirements?
    – Jake
    Dec 29, 2012 at 21:23
  • 5
    That edit is not really what I had in mind. Simply stating "I want to recreate the following layout" with a screenshot but without any attempt at getting started does usually not generate very helpful answers, since it doesn't show much effort on your side. This is especially true if the constraints aren't explained transparently ("personal reasons" is quite vague and pretty much makes this question a candidate for being closed as "too localized").
    – Jake
    Dec 29, 2012 at 22:38
  • 9
    Creating a complex layout from scratch is not a simple task and I don't think anybody here can undertake it. We can help in lifting some problems you may find; but just "write a format for me" is not a question for the site.
    – egreg
    Dec 29, 2012 at 23:22
  • 1
    @egreg I agree with your comment in general but I don't think the OP's intention was to ask a write-a-format-for-me question. I think the question is quite reasonable. In fact, many questions are of a similar nature: how do I get red text here and blue text there?; how do I changes the size of the section titles; .... Such questions usually get answered. This question just requires more time to answer.
    – user10274
    Dec 30, 2012 at 1:31
  • 1
    I can't see any reason why this question should be downvoted. Who ever did this should consider undoing it because it's not very friendly to new users. I usually don't vote but I decided to make an exception to undo the effect of the (currently only) downvote.
    – user10274
    Dec 30, 2012 at 1:43

1 Answer 1

12

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}
3
  • 1
    Nice and instructive answer!
    – Sveinung
    Dec 30, 2012 at 11:35
  • @godbyk Thank you so much. How can I insert a figure (at bottom of page) just like the attached file?
    – smh
    Dec 30, 2012 at 17:21
  • 1
    @smh: Since the figure cuts into the main text, you'll have to use something like the wrapfig package. For figures that fit neatly in the margin note area, you can just put them in a \marginpar. If you have more questions or need more details about this, I'd create a new question.
    – godbyk
    Dec 30, 2012 at 17:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .