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

Memoir: Index header positioned too high

28 views
Skip to first unread message

Pander

unread,
Feb 28, 2011, 9:46:38 AM2/28/11
to
Hi all,

The header of index in memoir is positioned too high compared to all
other headers of type chapter. All chapters, appendices, toc, etc.
start at the same vertical offset from the top of the page except the
index.

Can other please confirm this. Is this a bug? What is a temporary work
around?

Regards,

Pander

Lars Madsen

unread,
Feb 28, 2011, 9:48:06 AM2/28/11
to

minimal exaple please

--

/daleif (remove RTFSIGNATURE from email address)

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.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html

Pander

unread,
Feb 28, 2011, 10:06:25 AM2/28/11
to
On Feb 28, 3:48 pm, Lars Madsen <dal...@RTFMSIGNATUREimf.au.dk> wrote:
> Pander wrote:
> > Hi all,
>
> > The header of index in memoir is positioned too high compared to all
> > other headers of type chapter. All chapters, appendices, toc, etc.
> > start at the same vertical offset from the top of the page except the
> > index.
>
> > Can other please confirm this. Is this a bug? What is a temporary work
> > around?
>
> > Regards,
>
> > Pander
>
> minimal exaple please

\documentclass{memoir}
\setstocksize{10in}{8in}
\settrimmedsize{10in}{8in}{*}
\setlrmarginsandblock{.75in}{.5in}{*}
\newlength{\FootSkip}
\setlength{\FootSkip}{.5in}
\addtolength{\FootSkip}{2\onelineskip}
\setulmarginsandblock{.5in}{\FootSkip}{*}
\setheadfoot{0in}{2\onelineskip}
\setheaderspaces{*}{0in}{*}
\setmarginnotes{0in}{0in}{0in}
\checkandfixthelayout
\makeindex
\renewcommand{\chapnamefont}{\Huge\bfseries}
\renewcommand{\chapnumfont}{\Huge\bfseries}
\renewcommand{\chaptitlefont}{\Huge\bfseries}

\begin{document}
\tableofcontents
\setlength{\parindent}{0pt}
\setlength{\parskip}{\baselineskip}
\chapter{asdfasdfas}
\index{bla bla}
\printindex

\end{document}

In my document, also Table of Contents is lower as Index.

Lars Madsen

unread,
Feb 28, 2011, 10:14:46 AM2/28/11
to

interesting, it is the \parskip (which I never play with as I think it
destroys communication)

the toc and index headers are typeset using what is essentially \chapter*

but currently I have no idea, where that extra space comes from when
\parskip is non-zero


--

/daleif (remove RTFSIGNATURE from email address)

Pander

unread,
Feb 28, 2011, 11:09:27 AM2/28/11
to

OK, I will set parskip to zero and only use it as non-zero in the
parts where I need it without it running over headers like \chapter

Small related question, if I temporarily set parindent to 0pt, how can
I restore it later on to the default/original value? I do not set that
value explicitely in the beginning of the document, I just use the
default setting.

Donald Arseneau

unread,
Feb 28, 2011, 3:48:16 PM2/28/11
to
Pander <pan...@users.sourceforge.net> writes:

Do you mean the chapter heading or the page header?

The positioning of chapter heads/titles is different for twocolumn and
onecolumn formatting in LaTeX (reported ages ago).


--
Donald Arseneau as...@triumf.ca

Geoffrey Jones

unread,
Feb 28, 2011, 5:17:50 PM2/28/11
to
> Donald Arseneau                          a...@triumf.ca

This phenomenon drove me mad for ages. You'll find the same problem
with other index-using classes, e.g., book. It seems to have had an
airing on c.t.t sometime ago. According to the "theindex" entry
description in the tocbibind package documentation:

> In an earlier version of this package, for reasons that I didn't understand, I had to
> add/remove some vertical space around the Index heading to make its height match
> other chapter/section headings. In an unrelated thread on the comp.text.tex
> newsgroup, Donald Arseneau pointed out that that this eff ect was a known fea-
> ture of the standard classes and recorded as latex bug 3126, and was caused by
> misplaced topskips. The following removes this feature for all except the doc class. ...

While including tocbibind (seemingly) solves "bug 3126", I haven't
found it all that reliable in practice. On the other hand, including
Thomas Titz's idxlayout works solidly for me (it also solves other
index heading issues, e.g., the poor hyperref anchor placement
problem). Dropping

\usepackage[unbalanced,totoc]{idxlayout}

into your MWE solves the problem there.

--
Geoffrey Jones

Robin Fairbairns

unread,
Feb 28, 2011, 7:06:46 PM2/28/11
to
Lars Madsen <dal...@RTFMSIGNATUREimf.au.dk> writes:

\parskip gets into all sorts of nooks and crannies; that's why there's
parskip.sty (it would be a pointless package if the sort of hacks in
pander's example "just worked"). parskip.sty produces almost-reasonable
results with article.cls (i actually used it with latex 2.09 article.sty
some time back in the late '80s, for documentation at my then work).

somehwere in the faq, i've written something along the lines of "if you
really want it looking good, get a document class that does it". the
only class i can recall that offers it is one of the ntgclass collection
(i don't recall which ... there may even be another in the collection).
--
Robin Fairbairns, Cambridge
my address is @cl.cam.ac.uk, regardless of the header. sorry about that.

Lars Madsen

unread,
Mar 1, 2011, 4:15:36 AM3/1/11
to

I'll see if I can work around it (e.g. setting \parskip to zero inside
chapters

Interestingly the title for the index is not effected, but it is typeset
inside a \twocolumn[...], so I have to have a look at that.

As for restoreing, something like this might work

\newlength\oldparindent

\setlength\oldparindent{\parindent}

--

/daleif (remove RTFSIGNATURE from email address)

Lars Madsen

unread,
Mar 1, 2011, 4:30:16 AM3/1/11
to

That seems to work rather well, I will implement that for the next
memoir release

(I have some other issues as well)

For now it seems, that this can be a temp fix, I've added a horizontal
line to illustrate that they are on the same level

\documentclass[oneside]{memoir}


\setstocksize{10in}{8in}
\settrimmedsize{10in}{8in}{*}
\setlrmarginsandblock{.75in}{.5in}{*}
\newlength{\FootSkip}
\setlength{\FootSkip}{.5in}
\addtolength{\FootSkip}{2\onelineskip}

\setulmarginsandblock{.5in}{5em}{*}
\setheadfoot{0pt}{4em}


\setheaderspaces{*}{0in}{*}
\setmarginnotes{0in}{0in}{0in}
\checkandfixthelayout

\makeheadfootstrut{plain}{}{\strut}
\makeheadfootstrut{chapter}{}{\strut}
\makeheadfootstrut{index}{}{\strut}

\pagestyle{plain}

\makeindex
\renewcommand{\chapnamefont}{\Huge\bfseries}
\renewcommand{\chapnumfont}{\Huge\bfseries}
\renewcommand{\chaptitlefont}{\Huge\bfseries}


\usepackage{eso-pic}
\AddToShipoutPicture{
\put(0,601){\rule{\paperwidth}{0.4pt}}
}

\makeatletter

\def\@makechapterhead#1{%
\chapterheadstart% \vspace*{50\p@}%
{%\parindent \z@ \raggedright \normalfont
\parskip\z@% <--- added
\parindent \z@ \memRTLraggedright \normalfont
\ifm@m@And%
\printchaptername \chapternamenum \printchapternum
\afterchapternum % \par\nobreak \vskip 20\p@
\else%
\printchapternonum
\fi%
\interlinepenalty\@M%
\typeout{\the\topskip}%
\printchaptertitle{#1}% \Huge \bfseries #1
\afterchaptertitle% \par\nobreak \vskip 40\p@
}}

\def\@makeschapterhead#1{%
\chapterheadstart%
{%\parindent \z@ \raggedright \normalfont
\parskip\z@% <--- added
\parindent \z@ \memRTLraggedright \normalfont
\printchapternonum
\interlinepenalty\@M
\printchaptertitle{#1}%
\afterchaptertitle}%
}

% as for the toc, this is build into the constructor for the
% \tableofcontents macro, so a bit harder to fix

\renewcommand\@tocmaketitle{%
\@nameuse{tocheadstart}
{\parindent\z@%
\parskip\z@% <--- added
%%%% \parskip\cftparskip
\interlinepenalty\@M
\@nameuse{printtocnonum}%
\@nameuse{printtoctitle}{\contentsname}%
\@nameuse{tocmark}%
\thispagestyle{chapter}%
\@nameuse{aftertoctitle}
}
\@afterheading}


\makeatother


\setlength{\parskip}{\onelineskip}


\begin{document}


\tableofcontents

\chapter{Normal chapter}

\chapter*{Starred chapter}

X\index{bla bla}

\printindex

\end{document}

--

0 new messages