|
10 | 10 | % .sty file is distributed with Python, so you should not need to disable |
11 | 11 | % it. You'd also end up with a mixed page style; uglier than stock LaTeX! |
12 | 12 | % |
13 | | -\RequirePackage[Bjarne]{fncychap}\typeout{Using nice chapter headings.} |
| 13 | +\RequirePackage[Bjarne]{fncychap}\typeout{Using fancy chapter headings.} |
14 | 14 |
|
15 | 15 |
|
16 | 16 | % for PDF output, use maximal compression |
|
121 | 121 | % Redefine \cleardoublepage so that the blank page between chapters |
122 | 122 | % gets the plain style and not the fancy style. This is described |
123 | 123 | % in the documentation for the fancyhdr package by Piet von Oostrum. |
124 | | - \renewcommand{\cleardoublepage}{ |
125 | | - \clearpage\if@openright \ifodd\c@page\else |
126 | | - \hbox{} |
127 | | - \thispagestyle{plain} |
128 | | - \newpage |
129 | | - \if@twocolumn\hbox{}\newpage\fi\fi\fi} |
| 124 | + \@ifundefined{chapter}{}{ |
| 125 | + \renewcommand{\cleardoublepage}{ |
| 126 | + \clearpage\if@openright \ifodd\c@page\else |
| 127 | + \hbox{} |
| 128 | + \thispagestyle{plain} |
| 129 | + \newpage |
| 130 | + \if@twocolumn\hbox{}\newpage\fi\fi\fi |
| 131 | + } |
| 132 | + } |
130 | 133 | } |
131 | 134 |
|
132 | 135 | % old code font selections: |
|
523 | 526 | \OldEndAbstract |
524 | 527 | } |
525 | 528 |
|
526 | | -% This wraps the \tableofcontents macro with all the magic to get the |
527 | | -% spacing right and have the right number of pages if the 'openright' |
528 | | -% option has been used. This eliminates a fair amount of crud in the |
529 | | -% individual document files. |
530 | | -% |
531 | | -\let\OldTableofcontents=\tableofcontents |
532 | | -\renewcommand{\tableofcontents}[0]{% |
533 | | - \setcounter{page}{1}% |
534 | | - \pagebreak% |
535 | | - \pagestyle{plain}% |
536 | | - {% |
537 | | - \parskip = 0mm% |
538 | | - \OldTableofcontents% |
539 | | - \if@openright% |
540 | | - \ifodd\value{page}% |
541 | | - \typeout{Adding blank page after the table of contents.}% |
542 | | - \pagebreak\hspace{0pt}% |
543 | | - \fi% |
544 | | - \fi% |
545 | | - }% |
546 | | - \cleardoublepage% |
547 | | - \pagenumbering{arabic}% |
548 | | - \@ifundefined{fancyhf}{}{\pagestyle{normal}}% |
549 | | -} |
550 | | - |
551 | 529 | % Allow the release number to be specified independently of the |
552 | 530 | % \date{}. This allows the date to reflect the document's date and |
553 | 531 | % release to specify the Python release that is documented. |
|
566 | 544 | \newcommand{\@authoraddress}{} |
567 | 545 | \newcommand{\authoraddress}[1]{\renewcommand{\@authoraddress}{#1}} |
568 | 546 |
|
569 | | -% Change the title page to look a bit better, and fit in with the |
570 | | -% fncychap ``Bjarne'' style a bit better. |
571 | | -% |
572 | | -\renewcommand{\maketitle}{% |
573 | | - \begin{titlepage}% |
574 | | - \let\footnotesize\small |
575 | | - \let\footnoterule\relax |
576 | | - \@ifundefined{ChTitleVar}{}{% |
577 | | - \mghrulefill{\RW}}% |
578 | | - \@ifundefined{pdfinfo}{}{ |
579 | | - \pdfinfo |
580 | | - author {\@author} |
581 | | - title {\@title} |
582 | | - } |
583 | | - \begin{flushright}% |
584 | | - {\rm\Huge\HeaderFamily \@title \par}% |
585 | | - {\em\LARGE\HeaderFamily \@release \par} |
586 | | - \vfill |
587 | | - {\LARGE\HeaderFamily \@author \par} |
588 | | - \vfill\vfill |
589 | | - {\large |
590 | | - \@date \par |
591 | | - \vskip 3em |
592 | | - \@authoraddress \par |
593 | | - }% |
594 | | - \end{flushright}%\par |
595 | | - \@thanks |
596 | | - \end{titlepage}% |
597 | | - \setcounter{footnote}{0}% |
598 | | - \let\thanks\relax\let\maketitle\relax |
599 | | - \gdef\@thanks{}\gdef\@author{}\gdef\@title{} |
600 | | -} |
601 | | - |
602 | 547 | % This sets up the fancy chapter headings that make the documents look |
603 | 548 | % at least a little better than the usual LaTeX output. |
604 | 549 | % |
|
616 | 561 | \DOTI{#1} |
617 | 562 | } |
618 | 563 | } |
619 | | - \typeout{Using fancy chapter headings.} |
620 | 564 | } |
621 | 565 |
|
622 | 566 | % Tell TeX about pathological hyphenation cases: |
|
0 commit comments