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.

I use classic-thesis, and I would like to do the following: each chapter should begin on an odd page (right on a dual-page view), and on the left page should be displayed a picture I choose.

would that be possible?

thank you

EDIT:

with classicthesis, this will put title pages on the right pages instead of the left :

\documentclass[10pt, a4paper,twoside,openright,titlepage]{scrreprt}

\makeatletter
\newcommand\ChapImage{\huge image page -- should be on the left!}
\newcommand*\Invcleardoublepage{
\clearpage\if@twoside
  \ifodd\c@page \null\newpage\if@twocolumn\null%
  \newpage\fi\fi\fi
}
\renewcommand\chapter{%
  \if@openright
    \ifodd\c@page{\clearpage}\else{\Invcleardoublepage}\fi
    {
    \pagestyle{empty}
    \ChapImage
    \clearpage
    }
  \else
    \clearpage
  \fi
  \thispagestyle{\chapterpagestyle}%
  \global\@topnum\z@
  \@afterindentfalse
  \secdef\@chapter\@schapter
}
\makeatother

\usepackage[T1]{fontenc}                  % la codifica dei font
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{changepage,calc}                % per impostare i margini del frontespizio
\usepackage{lipsum}                       % genera testo fittizio

\usepackage{classicthesis-ldpkg}          % carica molti pacchetti utili a ClassicThesis

\usepackage[eulerchapternumbers,%         % numeri dei capitoli in Euler
            subfig,%                      % compatibilità con subfig
            beramono,%                    % Bera Mono come font a spaziatura fissa
            eulermath,%                   % AMS Euler come font per la matematica
            pdfspacing%                   % migliora il riempimento di riga con PDFLaTeX
            ]{classicthesis}              % lo stile ClassicThesis

%\usepackage[english]{arsclassica}         % modifica alcuni aspetti di ClassicThesis

\begin{document}
\pagestyle{plain}
\begin{titlepage}
\changetext{}{}{}{((\paperwidth  - \textwidth) / 2) - \oddsidemargin - \hoffset - 1in}{}
\null\vfill
\large
\sffamily

{Title page}

\vfill
\end{titlepage}

\pagenumbering{roman}
\pagestyle{scrheadings} 

\clearpage
\lipsum[1-4]

\clearpage
\setcounter{tocdepth}{2}
\thispagestyle{empty}
\tableofcontents
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}} 

\pagenumbering{arabic}
\chapter{First chapter}
\lipsum[1-10]
\chapter{Second chapter}
\lipsum[1-8]
\chapter{Third chapter}
\lipsum[1-10]
\chapter{Fourth chapter}
\lipsum[1-8]

\end{document}
share|improve this question
    
maybe you could try to redefine \chapter to, instead of doing a \cleardoublepage, do a \clearpage\thispagestyle{empty}\includegraphics[<options>]{path/to/image}, but this is just a long shot –  henrique Jun 15 '11 at 1:00
2  
There is a problem: if the previous chapter ends in an even page there's no place for the picture! In this case one should add a blank page, the picture and finally the chapter! –  Spike Jun 15 '11 at 7:17
    
I think there's a confusion here: what exactly do you mean with odd page? I assumed you meant an odd-numbered page. –  Gonzalo Medina Jun 16 '11 at 20:41
add comment

2 Answers

up vote 9 down vote accepted

The basic idea is to redefine \chapter as defined in the corresponding .cls file. I used scrbook.cls, but the modifications needed are clear mutatis mutandis for other classes). To guarantee that all chapters will begin in an odd numbered page and that the images get included in the (even numbered) page before the beginning of the chapter, I used an auxiliary command \Invcleardoublepage that acts as an "inverse" to \cleardoublepage: it flushes all material and starts a new page, but starts in a new even numbered page.

Finally, with the help of the xparse package I defined a \MyChapter command with one optional arguments (the entry for the ToC) and two mandatory arguments (the title of the chapter, and the name of the image to be used).

\documentclass[11pt,a5paper,footinclude=true,headinclude=true]{scrbook}
\usepackage{xparse}
\usepackage{lipsum}
\usepackage[linedheaders]{classicthesis}
\usepackage{graphicx}

\newcommand\ChapImage{}

\makeatletter
% A command that acts as an "inverse" cleardoublepage:
% flush all material and start a new page, start new even numbered page
\newcommand*\Invcleardoublepage{\clearpage\if@twoside
  \ifodd\c@page \null\newpage\if@twocolumn\null%
  \newpage\fi\fi\fi
}
\renewcommand\chapter{%
  \if@openright
    \ifodd\c@page\clearpage\else\Invcleardoublepage\fi% NEW
    \thispagestyle{empty}\ChapImage\clearpage
  \else\clearpage
  \fi
  \thispagestyle{\chapterpagestyle}%
  \global\@topnum\z@
  \@afterindentfalse
  \secdef\@chapter\@schapter
}
\makeatother
\DeclareDocumentCommand\MyChapter{omm}{%
  \renewcommand\ChapImage{\includegraphics[width=.95\textwidth,height=.95\textheight]{#3}}
  \IfNoValueTF{#1}
    {\chapter{#2}}{\chapter[#1]{#2}}
}

\begin{document}

\tableofcontents

\MyChapter[Entry in ToC]{Test Chapter with an Image}{image1}
\lipsum[1-3]

\MyChapter{Another Test Chapter with another Image}{image3}
\lipsum[1-3]

\end{document}

I used the demo option for graphicx to make my example compilable for everyone, do not use that option in your actual code.

If the document uses \part, then the following redefinition (or a similar one if the class is not scrbook) should also be added to the preamble:

\renewcommand\part{%
  \if@openright
    \ifodd\c@page\clearpage\else\Invcleardoublepage\fi% NEW
  \else\clearpage
  \fi
  \thispagestyle{\partpagestyle}%
  \if@twocolumn
    \onecolumn
    \@tempswatrue
  \else
    \@tempswafalse
  \fi
  \partheadstartvskip
  \vbox to\z@{\vss\use@preamble{part@o}\strut\par}%
  \vskip-\baselineskip\nobreak%
  \secdef\@part\@spart
}
share|improve this answer
    
Thank you! But when I do this with classic thesis, it does not work properly: if ChapImage is not defined, it correctly displays a blank page at the left and the chapter page at the right, but if I define ChapImage, it shows a blank page at the left, the image at the right, then it starts the chapter on the next left page (perhaps because the chapter command has been redefined in classic-thesis). Do you have some idea what the problem might be? –  oulipo Jun 15 '11 at 6:51
    
And why was the redefinition of part needed? (I don't use parts in my manuscript) –  oulipo Jun 15 '11 at 9:04
    
@oulipo: Please add to your question a minimal version of your document showing that my solution doesn't work as expected: as you can see, my example code do works and it uses the classicthesis package. And I redefined \part because I couldn't possible know if you would use it or not. –  Gonzalo Medina Jun 15 '11 at 11:36
    
@oulipo: I improved the code. There's no need to redefine commands anymore, and the new definition is more flexible. –  Gonzalo Medina Jun 16 '11 at 20:12
    
Thank you! –  oulipo Jun 17 '11 at 8:34
show 6 more comments

I would define a command that would call both the image as well as the chapter,

\documentclass[oneside]{book}
\usepackage[demo]{graphicx}
\usepackage{lipsum}
\pagestyle{empty}
\makeatletter
\def\chapter{\clearpage\thispagestyle{plain}\global\@topnum
   \z@\@afterindentfalse
   \secdef\@chapter\@schapter
}
\makeatother
\title{My Picture Chapters}
\begin{document}
\maketitle
\newcommand{\chapterwithpic}[3][]{%
  \includegraphics[width=1.2\textwidth]{./graphics/#3}
  \chapter[#1]{#2}
}

\chapterwithpic[option]{Amato}{pic}
\lipsum
\end{document}

enter image description here enter image description here enter image description here

share|improve this answer
    
+1 but I think it is better to make the optional argument as #1 as in \newcommand{\MyChapterPic}[3][]{...}. –  xport Jun 15 '11 at 3:21
    
@xport ... agreed, won't you please edit my answer? I am off to work. –  Yiannis Lazarides Jun 15 '11 at 3:47
    
@Yiannis: well done. –  xport Jun 15 '11 at 4:13
    
Thank you, but actually this won't show the picture on the left page and the chapter on the right page since the chapter command will do a cleardoublepage before –  oulipo Jun 15 '11 at 6:42
2  
@Yiannis: but, using your code, there's no guarantee that every chapter will begin in an odd-numbered page. –  Gonzalo Medina Jun 16 '11 at 19:32
show 3 more comments

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.