Page LayoutChanging leading causes header to shift right (in memoir)

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
percep
Posts: 5
Joined: Fri Sep 25, 2009 6:10 pm

Changing leading causes header to shift right (in memoir)

Post by percep »

Hello

I've encountered a problem, which I think only occurs in the memoir class. If I define my own text size and leading as:

Code: Select all

\renewcommand{\normalsize}{%
\@setfontsize\normalsize{10pt}{12pt}....}
instead of

Code: Select all

\renewcommand{\normalsize\@xpt\@xiipt}{%
\@setfontsize\normalsize....}
(I want to use values other than 10pt/12pt, but this illustrates the problem), then the header moves to the right slightly so that the right-hand side crosses the margin. (This is quite noticeable in my page design, which has a rule at the bottom of the header.)

Minimal example:

Code: Select all

\documentclass{memoir}
\makeatletter
\renewcommand{\normalsize}{%
 \@setfontsize\normalsize\@xpt\@xiipt
%\@setfontsize\normalsize{10pt}{12pt}  
   \abovedisplayskip 3\p@
   \abovedisplayshortskip 1\p@
   \belowdisplayshortskip 1\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\makeatother
\begin{document}
kdjf skldfjs dklfjsdklfjsdklfjsdklsdklfsj dfklsjfd klsjd sijgioeio gf siodjg klfdjgklfdgj klgjklgjdklg jdfklgj dfkgj dfklgj dklgj dkl dfkjs klfsjdsjd klfsjdf klsdjfskldjfskldfjsdlfjsdklfjsdklfsjdkl fsjdfklsdjfkl
\end{document}

Code: Select all

\documentclass{memoir}
\makeatletter
\renewcommand{\normalsize}{%
% \@setfontsize\normalsize\@xpt\@xiipt
\@setfontsize\normalsize{10pt}{12pt}  
   \abovedisplayskip 3\p@
   \abovedisplayshortskip 1\p@
   \belowdisplayshortskip 1\p@
   \belowdisplayskip \abovedisplayskip
   \let\@listi\@listI}
\makeatother
\begin{document}
kdjf skldfjs dklfjsdklfjsdklfjsdklsdklfsj dfklsjfd klsjd sijgioeio gf siodjg klfdjgklfdgj klgjklgjdklg jdfklgj dfkgj dfklgj dklgj dkl dfkjs klfsjdsjd klfsjdf klsdjfskldjfskldfjsdlfjsdklfjsdklfsjdkl fsjdfklsdjfkl
\end{document}
Compare the horizontal positions of the page number in the first and second examples.

This doesn't occur if I use book instead of memoir. I'm probably doing something stupid - is there a better way of redefining the text size and leading?

Thanks

Jonathan

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

percep
Posts: 5
Joined: Fri Sep 25, 2009 6:10 pm

Changing leading causes header to shift right (in memoir)

Post by percep »

OK - solved..... I missed a % sign at the end of the line:
\@setfontsize\normalsize{10pt}{12pt}%
Post Reply