*** empty log message ***
[m17n/m17n-docs.git] / data-usr / m17n-lib.sty
1 \ProvidesPackage{m17n-lib}
2 %% Don't leave the space for marginal notes.
3 \setlength{\textwidth}{\paperwidth}
4 \addtolength{\textwidth}{-2in}
5 \setlength{\textheight}{\paperheight}
6 \addtolength{\textheight}{-2in}
7 \addtolength{\textheight}{-\headheight}
8 \addtolength{\textheight}{-\headsep}
9 \setlength{\headwidth}{\textwidth}
10 \setlength{\topmargin}{0in}
11 \setlength{\oddsidemargin}{0in}
12 \setlength{\evensidemargin}{0in}
13 \setlength{\marginparsep}{0pt}
14 \setlength{\marginparwidth}{0pt}
15 \setlength{\footskip}{0pt}
16
17 %% Don't write footers.
18 \rfoot[]{}
19 \lfoot[]{}
20 \cfoot[]{}
21 \def\footrule{}
22
23 %% Use arabic numbers in the second level `enumerate' environment.
24 \renewcommand\theenumii{\@arabic\c@enumii}
25
26 %% Make each section start with a new page.
27 \let\origsection\section
28 \def\section{\cleardoublepage\origsection}
29
30 %% Hook function to print credit and add subsections to TOC.
31 \def\m17nhook{
32 \thispagestyle{empty}
33 \vspace*{\fill}
34 Copyright (C) 2003\\
35   National Institute of Advanced Industrial Science and Technology (AIST)\\
36   Registration Number H15PRO112
37
38 This file is part of the m17n library.
39
40 The m17n library is free software; you can redistribute it and/or
41 modify it under the terms of the GNU General Public License as
42 published by the Free Software Foundation; either version 2, or (at
43 your option) any later version.
44
45 The m17n library is distributed in the hope that it will be useful,
46 but WITHOUT ANY WARRANTY; without even the implied warranty of
47 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
48 GNU General Public License for more details.
49
50 You should have received a copy of the GNU General Public License
51 along with the m17n library; see the file COPYING.  If not, write to
52 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
53 Boston, MA 02111-1307, USA.
54 \newpage%
55 \setcounter{tocdepth}{2}%
56 \setcounter{page}{1}%
57 }
58
59 %% Run the above hook before printing TOC.
60 \let\origtableofcontents\tableofcontents
61 \def\tableofcontents{\m17nhook\origtableofcontents\clearpage}
62
63 %% Add Index section to the table of contents.
64 \let\origprintindex\printindex
65 \def\printindex{\addcontentsline{toc}{section}{Index}\origprintindex}