From 16058f3be384f90abe0277d516f6c1626427de1b Mon Sep 17 00:00:00 2001
From: schinz <schinz@epfl.ch>
Date: Wed, 27 Aug 2003 11:08:22 +0000
Subject: - only redefine \chaptermark if it is really de...

- only redefine \chaptermark if it is really defined
---
 support/latex/scaladoc.sty | 45 +++++++++++++++++++++++----------------------
 1 file changed, 23 insertions(+), 22 deletions(-)

(limited to 'support/latex/scaladoc.sty')

diff --git a/support/latex/scaladoc.sty b/support/latex/scaladoc.sty
index 4d5e1a27fc..0112ef2094 100644
--- a/support/latex/scaladoc.sty
+++ b/support/latex/scaladoc.sty
@@ -29,27 +29,27 @@
 \newcommand{\mytitlerule}{\titlerule[.5pt]}
 \newcommand{\mychaptername}{Chapter}
 \newcommand{\setupBookStyle}{%
-	\titleformat{name=\part}%
-   		[block]%
-   		{\thispagestyle{empty}\centering\scshape\huge}%
-   		{\Roman{part}}%
-   		{1ex}%
-   		{}%
-   		[\vspace*{0.5\textheight}]%
-	\titleformat{name=\chapter}%
-   		[display]%
-   		{\sffamily\bfseries\huge}%
-   		{\textnormal{\sffamily\LARGE\mychaptername{} \thechapter}}%
-   		{0pt}%
-   		{\vspace*{2.5mm}}%
-   		[\vspace*{8mm}]%
-	\titleformat{name=\chapter,numberless}%
-   		[display]%
-   		{\vspace*{-30mm}\sffamily\bfseries\huge}%
-   		{}%
-   		{0pt}%
-   		{}%
-   		[\vspace*{2mm}]%
+        \titleformat{name=\part}%
+                [block]%
+                {\thispagestyle{empty}\centering\scshape\huge}%
+                {\Roman{part}}%
+                {1ex}%
+                {}%
+                [\vspace*{0.5\textheight}]%
+        \titleformat{name=\chapter}%
+                [display]%
+                {\sffamily\bfseries\huge}%
+                {\textnormal{\sffamily\LARGE\mychaptername{} \thechapter}}%
+                {0pt}%
+                {\vspace*{2.5mm}}%
+                [\vspace*{8mm}]%
+        \titleformat{name=\chapter,numberless}%
+                [display]%
+                {\vspace*{-30mm}\sffamily\bfseries\huge}%
+                {}%
+                {0pt}%
+                {}%
+                [\vspace*{2mm}]%
 }
 \@ifundefined{part}{}{\setupBookStyle}
 \titleformat{name=\section}
@@ -94,7 +94,8 @@
 \fancypagestyle{plain}{\fancyhf{}%
    \renewcommand{\headrulewidth}{0pt}%
    \renewcommand{\footrulewidth}{0pt}}
-\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
+\@ifundefined{chaptermark}{}{%
+  \renewcommand{\chaptermark}[1]{\markboth{#1}{}}}
 \renewcommand{\sectionmark}[1]{\markright{\thesection\ \ #1}}
 \fancyhf{}
 \fancyhead[LE,RO]{\sffamily\footnotesize\thepage}
-- 
cgit v1.2.3

