summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/minitoc/mtcpatchmem.sty
blob: 499a2c41d6bfb75f0872cfa16a5582c8efffa1aa (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
91
92
%%
%% 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.
%% 
%% 
%% 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 (JPFD).
%% 
%% This work consists of all the files listed in the file `minitoc.l'
%% distributed with it.
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000
%%           2001 2002 2003 2004 2005 2006 2007 2008
%% Jean-Pierre F. Drucbert
%% <jean-pierre.drucbert@onera.fr>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}[1996/06/01]%
\ProvidesPackage{mtcpatchmem}%
   [2008/06/26 v58 Package mtcpatchmem]
\RequirePackage{mtcmess}[2006/03/14]
\mtcPackageInfo[M0001]{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\relax
     \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\relax
     \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'.