summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/latex-tds/tex/babel.tex
blob: 7bde973472c3ac9fb919c8e44f5c4eabb6bb008b (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
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{babel.tex}%
  [2006/06/02 v1.0 Driver file for babel.drv (HO)]
%
% Copyright 2006 Heiko Oberdiek
%
% This file is part of project `latex-tds'.
%
% It 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.3c or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%
% This work has the LPPL maintenance status `maintained'.
%
% The Current Maintainer of this work is Heiko Oberdiek.
%
% See `readme.txt' for a list of all files belonging to the
% project `latex-tds' and additional information.
%
\makeatletter

% There are a lot of unnumbered sections `References'
% among numbered sections. That looks too poor.
\PassOptionsToPackage{numbered}{hypdoc}

% The first environment `thebibliography' belongs to babel.dtx,
% but the following are part of the other language definition files.
% Thus we must move the \section to the \subsection level here.
\newif\if@FirstBib
\@FirstBibtrue
\AtBeginDocument{%
  \let\Saved@TheBibliography\thebibliography
  \let\thebibliography\New@TheBibliography
  \renewcommand*{\l@subsection}{%
    % \@dottedtocline{2}{1.5em}{2.3em}% article.cls, 10pt
    \@dottedtocline{2}{1.5em}{2.8em}%
  }%
  \renewcommand*{\l@subsubsection}{%
    % \@dottedtocline{3}{3.8em}{3.2em}% article.cls, 10pt
    \@dottedtocline{3}{4.3em}{3.7em}%
  }%
  \renewcommand*{\@pnumwidth}{2.05em}% 1.55em, article.cls, 10pt
  \addtocontents{toc}{\protect\sloppy}%
  \let\saved@multicols\multicols
  \def\multicols#1{%
    \ifnum#1=2 %
      \let\endmulticols\relax
      \expandafter\@gobble
    \else
      \expandafter\@firstofone
    \fi
    {%
      \saved@multicols{#1}%
    }%
  }%
}
\def\New@TheBibliography{%
  \if@FirstBib
    \global\@FirstBibfalse
  \else
    \def\section{\subsection}%
  \fi
  \Saved@TheBibliography
}

% Add bookmark for `Change History'
\AtBeginDocument{%
  \let\Saved@TheGlossary\theglossary
  \let\theglossary\New@TheGlossary
}
\def\New@TheGlossary{%
  \clearpage
  \pdfbookmark[1]{Change History}{gloss}%
  \Saved@TheGlossary
}

% Index not numbered
\AtBeginDocument{%
  \let\Saved@TheIndex\theindex
  \let\theindex\New@TheIndex
}
\def\New@TheIndex{%
  \csname HD@numberedfalse\endcsname
  \Saved@TheIndex
}
\makeatother

\input{babel.drv}
\endinput