1

I'm using this format for my chapters

\usepackage{xcolor}
\usepackage{pstcol}
\makeatletter
\def\LigneVerticale{\vrule height 1.5cm depth 0.9cm\hspace{0.1cm}\relax}
\def\LignesVerticales{%
  \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
\def\GrosCarreAvecUnChiffre#1{%
  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
  \rlap{\hbox to 1cm{\hss\mbox{\white #1}\hss}}%
  \vrule height 0pt width 1cm depth 0pt}
\def\GrosCarreAvecUnChiffres#1{{%
  \color{white}%
  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
  %\rlap{\hbox to 1cm{\hss\mbox{\color{black}#1}\hss}}%
  %\vrule height 0pt width 1cm depth 0pt}}
  \hspace{-0.65cm}
  }}
\def\@makechapterhead#1{
    \vspace*{-20pt}
    \hbox{%
    \huge\bfseries
    \LignesVerticales
    \hspace{-0.62cm}%
    \GrosCarreAvecUnChiffre{\thechapter}
    \hspace{0.2cm}\hbox{#1}%
    }\par\vskip 0.5cm}
    \def\@makeschapterhead#1{
         \vspace*{-20pt}
    \hbox{%
    \huge\bfseries
    \LignesVerticales
    \hspace{-0.62cm}%
    \GrosCarreAvecUnChiffres{\thechapter}
    \hspace{0.2cm}\hbox{#1}%
    }\par\vskip 0.5cm}
\makeatother

The contents is always on a new page, but i would like to have it under the title on the first page. Anyone knows how to make it?

6
  • I suspect something like \let\cleardoublepage\relax etc. just before \tableofcontents
    – user31729
    Commented Oct 14, 2014 at 15:13
  • @ChristianHupfer Answer? :-p
    – Johannes_B
    Commented Feb 11, 2015 at 22:42
  • @ChristianHupfer or something else?
    – Johannes_B
    Commented May 9, 2016 at 8:03
  • @Johannes_B: I'll think about it later on
    – user31729
    Commented May 9, 2016 at 10:59
  • 4
    Possible duplicate of ToC on the title page in a report
    – GiuTeX
    Commented Sep 2, 2017 at 10:46

1 Answer 1

4

This is a guess only (since no MWE was given): Using the book class and patching \tableofcontents and \@maketitle slightly to remove the \newpage or \cleardoublepage usage.

\documentclass[notitlepage]{book}

\usepackage{xcolor}
\usepackage{pstricks}
\usepackage{xpatch}
\usepackage{auto-pst-pdf}

\makeatletter
\AtBeginDocument{%
\xpretocmd{\tableofcontents}{%
  \begingroup\let\cleardoublepage\relax
}{}{}

\xapptocmd{\tableofcontents}{%
  \endgroup%
}{}{}

\xpatchcmd{\@maketitle}{\newpage\null}{}{}{}
}
\makeatother

\title{Theory of Brontosaurs}
\author{Ann Elk}
\date{\today}

\makeatletter
\def\LigneVerticale{\vrule height 1.5cm depth 0.9cm\hspace{0.1cm}\relax}
\def\LignesVerticales{%
  \let\LV\LigneVerticale\LV\LV\LV\LV\LV\LV\LV\LV\LV\LV}
\def\GrosCarreAvecUnChiffre#1{%
  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
  \rlap{\hbox to 1cm{\hss\mbox{\white #1}\hss}}%
  \vrule height 0pt width 1cm depth 0pt}
\def\GrosCarreAvecUnChiffres#1{{%
  \color{white}%
  \rlap{\vrule height 0.8cm width 1cm depth 0.2cm}%
  %\rlap{\hbox to 1cm{\hss\mbox{\color{black}#1}\hss}}%
  %\vrule height 0pt width 1cm depth 0pt}}
  \hspace{-0.65cm}
  }}
\def\@makechapterhead#1{
    \vspace*{-20pt}
    \hbox{%
    \huge\bfseries
    \LignesVerticales
    \hspace{-0.62cm}%
    \GrosCarreAvecUnChiffre{\thechapter}
    \hspace{0.2cm}\hbox{#1}%
    }\par\vskip 0.5cm}
    \def\@makeschapterhead#1{
         \vspace*{-20pt}
    \hbox{%
    \huge\bfseries
    \LignesVerticales
    \hspace{-0.62cm}%
    \GrosCarreAvecUnChiffres{\thechapter}
    \hspace{0.2cm}\hbox{#1}%
    }\par\vskip 0.5cm}
\makeatother



\begin{document}
\maketitle
\tableofcontents


\chapter{First chapter}
\end{document}

enter image description here

0

You must log in to answer this question.

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