1

I want to extend the length of the headers using the margin space, in memoir class. For this I use

\documentclass[oneside,11pt]{memoir}
\usepackage{lipsum}

\setlength{\headwidth}{\dimexpr\textwidth+\marginparsep+\marginparwidth\relax}

\makepagestyle{test}
\makerunningwidth{test}{\headwidth}
\makeoddhead{test}{Left}{Center}{Right}
\pagestyle{test}

\begin{document}
\lipsum[1-2]
\end{document}

However, the left side of the margin was also extended enter image description here

Is there any way to extend the header only to the right? That is, so that "Left" is aligned with the text block.

1 Answer 1

1

I don't think there's a way to make the header asymmetric, but you could add some horizontal space to the left part to make it align with the left margin.

\documentclass[oneside,11pt]{memoir}
\usepackage{lipsum}
\newlength{\leftspace}
\setlength{\leftspace}{\dimexpr\parindent+2\marginparsep\relax}
\setlength{\headwidth}{\dimexpr\textwidth+\marginparsep+\marginparwidth\relax}

\makepagestyle{test}
\makerunningwidth{test}{\headwidth}
\makeoddhead{test}{\hspace*{\leftspace}Left}{Center}{Right}
\pagestyle{test}

\begin{document}
\lipsum[1-2]
\end{document}

partial output of code

3
  • In my header and yours the word "Right" seems to be in the same position. So, I should make \headwith bigger to make it appear to be the right size, right? Oct 2, 2023 at 22:22
  • I’m not really sure what you mean. I assumed you were happy with the position of the right side. Have I misunderstood your question?
    – Alan Munn
    Oct 2, 2023 at 23:18
  • Sorry, is not something really important and, as you said, I'm happy with your result Oct 3, 2023 at 20:42

You must log in to answer this question.

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