Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

How to add images at the top of the chapter title. A sample snapshot like this(here circles are images): enter image description here

The SWE is:

\documentclass[12pt]{book}
\usepackage{lipsum}
\usepackage[explicit]{titlesec}
\titleformat{\chapter}[display]
  {\bfseries\Large}
%  {\filright\MakeUppercase{\chaptertitlename}\Huge\thechapter}
  {}
  {1ex}
  {\titlerule\vspace{1ex}\filcenter #1}
  [\vspace{1ex}\titlerule]
\begin{document}
\chapter{A Chapter}
\lipsum[4]
\end{document}
share|improve this question

2 Answers 2

up vote 3 down vote accepted
\documentclass[12pt]{book}
\usepackage{lipsum}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage[explicit]{titlesec}
\titleformat{\chapter}[display]
  {\bfseries\Large}
%  {\filright\MakeUppercase{\chaptertitlename}\Huge\thechapter}
  {}
  {1ex}
  {\tikz[remember picture,overlay]\node[inner sep=0pt] at ($(current page.north) +
      (-0.75cm,-2.5in)$) {\includegraphics[width=4cm]{example-image-a}};
      \vspace{1ex}\titlerule\\\filcenter #1
  }
  [\vspace{1ex}\titlerule]
\begin{document}
\chapter{A Chapter}
\lipsum[4]
\end{document}

enter image description here

share|improve this answer

This attempt defines a macro called \mychapter where 3 pictures are added for each chapter. The location can be changed to suit one's need via \put(x,y) where the (0,0) is located at the lower left corner of a physical page. The current positions are manually set. \AddToShipoutPicture inserts the pictures onto the page when it is generated (i.e. at shipout.)

enter image description here

enter image description here

Code

\documentclass[12pt]{book}
\usepackage{lipsum}
\usepackage{wallpaper}  % Or \usepackage{eso-pic,graphicx}
\usepackage[explicit]{titlesec}
\titleformat{\chapter}[display]
  {\bfseries\Large}
%  {\filright\MakeUppercase{\chaptertitlename}\Huge\thechapter}
  {}
  {1ex}
  {\titlerule\vspace{1ex}\filcenter #1}
  [\vspace{1ex}\titlerule]

\newcommand{\mychapter}[1]{
\chapter{#1}
\AddToShipoutPicture*{%
\put(100,580){\includegraphics[scale=0.1]{example-image-a}}
\put(150,580){\includegraphics[scale=0.1]{example-image-b}}
\put(200,580){\includegraphics[scale=0.1]{example-image-c}}
}}


\begin{document}

\mychapter{A Chapter}
\lipsum[4]

\section{blah blah blah}

\mychapter{The Second Chapter}
\lipsum[4]

\section{blah blah blah}

\mychapter{The third Chapter}
\lipsum[4]

\section{blah blah blah}
\end{document}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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