2

I'm working on a chapter style: link (pdf)

I want to use a different image at different positions in each chapter, sometimes even hanging into the title line (after the text), but the title line should always stay at the same height on the page.

How to define a chapter style that can be controlled this way? For both the book and the memoir documentclass.

(The book I'm working on is in book class, but I'd like to use this in some other projects which are in the memoir kingdom.)

  • 1
    I cannot say anything for the book class, haven't useed it for a long time. I think you need to be a bit more specific. How your would you control this? I would make the design without the image, and then add the image positioed globally on each chapter frontpage using the eso-pic package and the \AddToShipoutPicture* command – daleif Mar 25 '11 at 10:04
2

Following up daleif's suggestion, using \AddToShipoutPicture* from the eso-pic package we don't need to tinker with the chapter styles at all:

\documentclass{book}

\usepackage{lipsum}
\usepackage[pdftex]{graphicx}
\graphicspath{{./src-images/}}
\usepackage{eso-pic}

\begin{document}

\chapter{Hello World}
\AddToShipoutPicture*{%
  % By default, eso-pic's zero coordinate is in the lower left corner
  \put(\LenToUnit{3.5in},\LenToUnit{5.5in}){%
    \includegraphics[height=25mm,keepaspectratio]{leaf.png}%
  }
}

\lipsum

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.