From 38b4f2884dea31476f6b22cc433cb9b90da81f23 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 30 Jul 2015 21:58:08 +0200 Subject: [PATCH] Fix page number reset by abstract (reuse docbook.sty macros) --- myclass.cls | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/myclass.cls b/myclass.cls index 0e7f721..413530d 100644 --- a/myclass.cls +++ b/myclass.cls @@ -5,6 +5,22 @@ \LoadClassWithOptions{report} % report, book, memoir, scrreprt or scrbook ? +% Fix the page number reset done by abstract by redefining it +\def\nocount#1#2{} +\let\stdsetcounter\setcounter +\let\stdabstract=\abstract +\let\endstdabstract=\endabstract +\renewenvironment{abstract}{% + \let\setcounter\nocount% + \begin{stdabstract}% + \noindent% + \setlength\parskip{\medskipamount}% + \setlength\parindent{0pt}% +}{ + \end{stdabstract} + \let\setcounter\stdsetcounter +} + % Put the index in the TOC \makeatletter \let\stdindex=\theindex -- 2.47.2