summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/kotex-oblivoir/memhangul-ucs/ob-toclof.sty
blob: 5ef56b463fb68470954495c1a915c1ce9381fc5c (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
%% File `ob-toclof.sty`
%%
%% Copyright (c) 2007-2013 Kangsoo Kim <karnes at ktug org>
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% 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.3c or later is part of all distributions of LaTeX
%% version 2006/05/20 or later.
%%
%%  oblivoir substyle. part of oblivoir, 
%% 
%% \newlistof{listoffigures}{lof}{\listfigurename}
%%  \kill@lastcounter{lofdepth}
%% \newlistentry[section]{figure}{lof}{0}
%%  \cftsetindents{figure}{0em}{2.3em}
%%
\if@toclofentry\else
\renewcommand{\put@bsintoc}{%
  \ifadd@bstotoc
    \ifnumber@bs\else
      \phantomsection
      \addcontentsline{toc}{section}{\abstractname}
    \fi
  \fi}

\def\addappheadtotoc{\addcontentsline{toc}{section}{\appendixtocname}}

\renewcommand{\newlistof}[3]{%
  \@namedef{ext@#2}{#2}
  \@ifundefined{c@#2depth}{\newcounter{#2depth}}{}
  \setcounter{#2depth}{1}
  \@namedef{#2mark}{\markboth{#3}{#3}}
  \@namedef{#1}{\@ifstar{\@nameuse{@star#2}}{\@nameuse{@plain#2}}}
  \@namedef{@star#2}{%
    \ensureonecol
    \par
    \begingroup
%%%      \parindent\z@ \parskip\cftparskip
      \@nameuse{@#2maketitle}
      \@starttoc{#2}%
    \endgroup
    \restorefromonecol}
  \@namedef{@plain#2}{%
    \ensureonecol
    \par
    \begingroup
%%%      \parindent\z@ \parskip\cftparskip
      \@nameuse{@#2maketitle}
      \phantomsection
      \addcontentsline{toc}{section}{#3}
      \@starttoc{#2}%
    \endgroup
    \restorefromonecol}
  \@namedef{@#2maketitle}{%
    \@nameuse{#2headstart}
   {\parindent\z@ \parskip\cftparskip
    \interlinepenalty\@M
    \@nameuse{print#2nonum}%
    \@nameuse{print#2title}{#3}%
    \@nameuse{#2mark}%
    \thispagestyle{chapter}%
    \@nameuse{after#2title}
   }
    \@afterheading}
%  \@namedef{#2headstart}{\chapterheadstart}
%  \@namedef{after#2title}{\afterchaptertitle}
%  \@namedef{print#2nonum}{\printchapternonum}
%  \@namedef{print#2title}##1{\printchaptertitle{##1}}
} % end \newlistof

\def\@chapter[#1]#2{%
  \ifx\ch@pt@c\m@m@empty % no optional args
    \def\f@rtoc{#1}%
    \def\f@rhdr{#1}%
  \else                  % at least one opt arg
    \def\f@rtoc{\ch@pt@c}%
    \nametest{#1}{#2}%
    \ifsamename          % one opt arg
      \def\f@rhdr{\ch@pt@c}%
    \else                % two opt args
      \def\f@rhdr{#1}%
    \fi
  \fi 
  \m@m@Andfalse
  \ifnum \c@secnumdepth >\m@ne
    \if@mainmatter
      \m@m@Andtrue
    \fi
  \fi
  \ifm@m@And
   \ifanappendix
    \refstepcounter{APPchapter}%
   \else
    \refstepcounter{chapter}%
   \fi
  \fi
  \chaptermark{\f@rhdr}
  \ifartopt
    \@makechapterhead{#2}%
    \@afterheading
  \else
    \insertchapterspace
    \if@twocolumn
      \@topnewpage[\@makechapterhead{#2}]%
    \else
      \@makechapterhead{#2}%
    \fi
    \@afterheading
  \fi
  \ifm@m@And
    \ifanappendix
      \addcontentsline{toc}{appendix}{%
       \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}%
       \memappchapinfo{\thechapter}{\f@rtoc}{\f@rhdr}{#2}%
    \else
      \addcontentsline{toc}{section}{%
        \protect\chapternumberline{\hchaptertitlehead}\f@rtoc}%
       \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}%
    \fi
  \else
    \addcontentsline{toc}{section}{\f@rtoc}%
    \ifanappendix
      \memappchapinfo{}{\f@rtoc}{\f@rhdr}{#2}%
    \else
      \memchapinfo{\hchaptertitlehead}{\f@rtoc}{\f@rhdr}{#2}%
    \fi
  \fi
  \ifheadnameref\M@gettitle{\f@rhdr}\else\M@gettitle{\f@rtoc}\fi
%%% for chapter
  \ifanappendix
     \protected@edef\@currentlabel{\thechapter}%
  \fi
}

\newlistof{tableofcontents}{toc}{\contentsname}
\newlistof{listoffigures}{lof}{\listfigurename}
\newlistof{listoftables}{lot}{\listtablename}

\fi % of \if@toclofentry

\endinput