summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/minitoc/mtcpatchmem.sty
blob: f1ab012bb690513b585eafb3bb2746858bbb0fa2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
%%
%% This is file `mtcpatchmem.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% minitoc.dtx  (with options: `mtcpatchmem')
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2005 by:
%% Jean-Pierre F. Drucbert
%% <jean-pierre.drucbert@onera.fr>
%% 
%% This file may be distributed and/or modified under the conditions of
%% the LaTeX Project Public License, either version 1.3 of this license
%% or (at your option) any later version.  The latest version of this
%% license is in:
%% 
%%    http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3 or later is part of all distributions of LaTeX version
%% 2003/12/01 or later.
%% 
%% This work has the LPPL maintenance status "author-maintained".
%% 
%% This Current Maintainer of this work is Jean-Pierre F. Drucbert.
%% 
%% This work consists of all the files listed in the file `minitoc.l'
%% distributed with it.
%% 
\NeedsTeXFormat{LaTeX2e}[1996/06/01]%
\ProvidesPackage{mtcpatchmem}%
   [2005/09/16 v43 Package mtcpatchmem]
\PackageInfo{mtcpatchmem}%
   {*** mtcpatchmem package to patch the memoir class ***\@gobble}
\renewcommand{\@m@mchapter}[1][]{%
  \def\ch@pt@c{#1}% capture first optional arg
   \@ifnextchar[{\@chapter}{\@chapter[]}%
}
\def\@chapter[#1]#2{%
   \ifx\ch@pt@c\@empty
     \def\f@rtoc{#2}%
     \def\f@rhdr{#2}%
   \else
     \let\f@rtoc\ch@pt@c
     \ifx\@empty#1\@empty
       \let\f@rhdr\ch@pt@c
     \else
       \def\f@rhdr{#1}%
     \fi
   \fi
   \ifnum \c@secnumdepth >\m@ne
     \if@mainmatter
       \refstepcounter{chapter}%
     \fi
   \fi
   \chaptermark{\f@rhdr}%
   \ifartopt
     \@makechapterhead{#2}%
     \@afterheading
   \else
     \insertchapterspace
     \if@twocolumn
       \@topnewpage[\@makechapterhead{#2}]%
     \else
       \@makechapterhead{#2}%
     \fi
     \@afterheading
   \fi
   \ifnum \c@secnumdepth >\m@ne
     \if@mainmatter
       \ifanappendix
         \addcontentsline{toc}{appendix}{%
           \protect\chapternumberline{\thechapter}\f@rtoc}%
       \else
         \addcontentsline{toc}{chapter}{%
           \protect\chapternumberline{\thechapter}\f@rtoc}%
       \fi
     \else
       \addcontentsline{toc}{chapter}{\f@rtoc}%
     \fi
   \else
     \addcontentsline{toc}{chapter}{\f@rtoc}%
   \fi
   \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi
}
\endinput
%%
%% End of file `mtcpatchmem.sty'.