3

I'm using the memoir class.

I would like the \chapter{xxx} command to place the chapter heading in the margin instead of above the text. Like this:

Chapter heading in margin

This question is somewhat similar, but in that question the person wanted the chapter title in the margin of every page. My request is simpler (I hope). I want the chapter title in the margin of the first page instead of above the text.

Do I need to use a similar complex mechanism, or is there a simpler way to achieve what I want?

oz1cz
  • 1,556

1 Answers1

2

Here is something that might be used as a building block so see it as a proof of concept.

\documentclass[a4paper]{memoir}
\usepackage{kantlipsum,graphicx}

% picture syntax with std units
\usepackage{picture,calc,xcolor}

\usepackage{eso-pic}


\makeatletter

\makechapterstyle{hmm}{%
  \renewcommand\chapterheadstart{}
  \renewcommand\printchaptername{}
  \renewcommand\printchapternum{}
  \renewcommand\afterchapternum{}
  \renewcommand\printchapternonum{}
  \renewcommand\chaptitlefont{\normalfont\Large\bfseries\sffamily}
  \renewcommand\printchaptertitle[1]{%
    \begingroup%
    \AddToShipoutPicture*{%
      \put(\paperwidth-\foremargin+15mm,
      \paperheight-\textheight-\uppermargin
      ){\rotatebox{90}{\parbox[t]{\textheight}{%
            \makebox[\textheight-\topsep][l]{\hfill 
              \chaptitlefont
              \@chapapp~\thechapter\ --
              ##1}
          }%
        }%
      }%
    }%
    \endgroup%
  }
  \renewcommand\afterchaptertitle{}
}
\chapterstyle{hmm}
\makeatother

\begin{document}

\chapter{Lorem Ipsum}

\kant

\end{document}
daleif
  • 54,450
  • That looks very promising, @daleif. I can probably get this to work with my document. (I'll just wait a few hours before I acknowledge this as an answer.) – oz1cz Jun 18 '14 at 14:37
  • I successfully got this to work with my document. Wonderful. Thank you very much. – oz1cz Jun 18 '14 at 15:43