4

I would like to extend the chapter title and the rule above it to the left, so it is -0.75 in past the text block.

MWE:

\documentclass[oneside,12pt]{memoir}

\usepackage{graphicx}

\begin{document}

\chapterstyle{madsen}

\frontmatter

\tableofcontents

\mainmatter

\chapter{First chapter}

Text

\chapter{Second chapter}

More text

\end{document}
1
  • Extend them to the left? Didn't you mean to the right? Let me see if I understand; you want the title and the rule to protrude 0.75in from the outer (right) margin? Apr 8, 2013 at 23:55

1 Answer 1

4

In the following example I defined a mymadsen chapter style with the required specifications:

\documentclass{memoir}
\usepackage{graphicx}
\usepackage{lipsum}

\makechapterstyle{mymadsen}{%
  \chapterstyle{default}
  \renewcommand*{\chapnamefont}{%
    \normalfont\large\scshape\raggedleft}
  \renewcommand*{\chaptitlefont}{%
    \normalfont\Huge\bfseries\sffamily\raggedleft}
  \renewcommand*{\chapternamenum}{}
  \setlength{\chapindent}{0.75in}
  \renewcommand*{\printchapternum}{%
    \makebox[0pt][l]{\hspace{0.4em}%
      \resizebox{!}{4ex}{%
        \chapnamefont\bfseries\sffamily\thechapter}%
    }%
  }%
  \renewcommand*{\printchapternonum}{%
    \chapnamefont \phantom{\printchaptername \chapternamenum%
      \makebox[0pt][l]{\hspace{0.4em}%
        \resizebox{!}{4ex}{%
          \chapnamefont\bfseries\sffamily 10}%
      }%
    }%
  }%
  \setlength\midchapskip{1ex}
  \renewcommand*{\printchaptertitle}[1]{%
    \begin{adjustwidth}{-\chapindent}{}
      \par\hrulefill\vskip\midchapskip
      \raggedleft \chaptitlefont ##1\par\nobreak
    \end{adjustwidth}}
}

\chapterstyle{mymadsen}

\begin{document}

\chapter*{Test unnumbered chapter and some textv}
\lipsum[4]
\chapter{Test numbered chapter and some textviiii}
\lipsum[4]

\end{document}

An image for an unnumbered chapter:

enter image description here

and one for a numbered chapter:

enter image description here

6
  • This works, but I do need it to the left. Also, I need to keep the chapter name right aligned. Apr 9, 2013 at 0:32
  • @RileyCooper What should exactly go to the left? with chapter name you mean the whole string "Chapter 1"? Excuse me but I am confused, so if you could explain in detail what should go where, I'd be thankful. Apr 9, 2013 at 0:36
  • I do need the rule to be outdented on the left. The chapter name needs to retain its right alignment, but the width should be as long as the outdented rule. Also, in the image above the chapter number character needs to retain its placement off the right margin. Apr 9, 2013 at 0:40
  • I'm going to use the whitespace under the outdented left rule for two levels of headings. Apr 9, 2013 at 0:45
  • @RileyCooper please see my updated answer. Something like that? Apr 9, 2013 at 0:54

You must log in to answer this question.

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