Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get (my)headings with title and chapter title on the outsides

153 views
Skip to first unread message

Pander

unread,
Jun 21, 2011, 8:20:00 AM6/21/11
to
Hi all,

How to get the the following header with (my)headings:

For the even headers, \hfill as seen below, is doing too much. What is
the proper macro to shift the title to the left (inside) of the even
page?

\makeevenhead{myheadings}{\footnotesize\thepage}{\footnotesize
\MakeUppercase Title\hfill}{}

For the odd headers, I wouls like to have the actual chapter name, not
the chapter number as is shown below. How to change this?

\makeoddhead{myheadings}{}{\footnotesize\hfill\MakeUppercase
\thechapter}{\footnotesize\thepage}
\pagestyle{myheadings}

Also the title in the odd headers needs to be shifted to the right
(outside) of the odd page.

Thanks,

Pander

Lars Madsen

unread,
Jun 21, 2011, 8:33:44 AM6/21/11
to

first of all please specify that it is memoir you are asking about.

what exactly are you trying to do, I do not quite follow what toy are
trying to do with

\makeevenhead{myheadings}{\footnotesize\thepage}{\footnotesize
\MakeUppercase Title\hfill}{}

The chapter information comes from \leftmark and \rightmark and should
not be set directly

You mind want to read

http://www.tug.org/pracjourn/2008-2/madsen/


--

/daleif (remove RTFSIGNATURE from email address)

Memoir and mh bundle maintainer
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.minimalbeispiel.de/mini-en.html

Pander

unread,
Jun 21, 2011, 9:02:07 AM6/21/11
to
On Jun 21, 2:33 pm, Lars Madsen <dal...@RTFMSIGNATUREimf.au.dk> wrote:
> Pander wrote, On 2011-06-21 14:20:
>
>
>
> > Hi all,
>
> > How to get the the following header with (my)headings:
>
> > For the even headers, \hfill as seen below, is doing too much. What is
> > the proper macro to shift the title to the left (inside) of the even
> > page?
>
> > \makeevenhead{myheadings}{\footnotesize\thepage}{\footnotesize
> > \MakeUppercase Title\hfill}{}
>
> > For the odd headers, I wouls like to have the actual chapter name, not
> > the chapter number as is shown below. How to change this?
>
> > \makeoddhead{myheadings}{}{\footnotesize\hfill\MakeUppercase
> > \thechapter}{\footnotesize\thepage}
> > \pagestyle{myheadings}
>
> > Also the title in the odd headers needs to be shifted to the right
> > (outside) of the odd page.
>
> > Thanks,
>
> > Pander
>
> first of all please specify that it is memoir you are asking about.
>
> what exactly are you trying to do, I do not quite follow what toy are
> trying to do with
>
> \makeevenhead{myheadings}{\footnotesize\thepage}{\footnotesize
> \MakeUppercase Title\hfill}{}

header left page (underscore is whitespace):

23___TITLE___________________

header right page: (underscore is whitespace)

____________INTRODUCTION___24

> The chapter information comes from \leftmark and \rightmark and should
> not be set directly
>
> You mind want to read
>
> http://www.tug.org/pracjourn/2008-2/madsen/

Got a bit worried about:
"How on earth would any novice (or even experienced) user be able to
figure this
out?"

At the moment I have:
\makeevenhead{myheadings}{\footnotesize\thepage~~~\MakeUppercase Title}
{}{}
\makeoddhead{myheadings}{}{}{\footnotesize\MakeUppercase
Introduction~~~\thepage}
Only Introduction needs to be replaced by a macro that magically puts
the actual chapter name in there. How do I go about it?

I understand that the beginning of a chapter has to place a mark, but
I have no idea how to do that for this case.

Thanks,

Pander

Lars Madsen

unread,
Jun 21, 2011, 10:00:28 AM6/21/11
to

Something like below. Notice the use of \makebox to make sure that the
page number area always have a fixed with

\documentclass[a4paper]{memoir}

\newcommand\MyTitle{Some static title}

\makepagestyle{pander}
\makeoddhead{pander}{}{}{\footnotesize\rightmark\quad\makebox[2em][r]{\thepage}}
\makeevenhead{pander}{\footnotesize\makebox[2em][l]{\thepage}\quad\MakeUppercase\MyTitle}{}{}

% specify the markes for this style
\makepsmarks{pander}{%
\createmark{chapter}{right}{nonumber}{}{} % nonumnber and nothing
% before or after the 'missing' chapter number
\clearmark{section} % section writes nothing
\clearmark{subsection} % same
\clearmark{subsubsection} %same
% for toc and friends
\createplainmark{toc}{both}{\contentsname}
\createplainmark{lof}{both}{\listfigurename}
\createplainmark{lot}{both}{\listtablename}
\createplainmark{bib}{both}{\bibname}
\createplainmark{index}{both}{\indexname}
\createplainmark{glossary}{both}{\glossaryname}
}

\pagestyle{pander}

\usepackage{lipsum}

\begin{document}

\chapter{My title}

\lipsum[1-15]

\chapter{My other title}

\lipsum[1-15]


\end{document}

0 new messages