summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/generic/babel/babel.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/generic/babel/babel.dtx')
-rw-r--r--Master/texmf-dist/source/generic/babel/babel.dtx89
1 files changed, 74 insertions, 15 deletions
diff --git a/Master/texmf-dist/source/generic/babel/babel.dtx b/Master/texmf-dist/source/generic/babel/babel.dtx
index 1c00fd2b3f4..29358b853c0 100644
--- a/Master/texmf-dist/source/generic/babel/babel.dtx
+++ b/Master/texmf-dist/source/generic/babel/babel.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 1989-2005 Johannes L. Braams and any individual authors
+% Copyright 1989-2008 Johannes L. Braams and any individual authors
% listed elsewhere in this file. All rights reserved.
%
% This file is part of the Babel system.
@@ -26,7 +26,7 @@
% and covered by LPPL is defined by the unpacking scripts (with
% extension .ins) which are part of the distribution.
% \fi
-% \CheckSum{3821}
+% \CheckSum{3858}
%%
% \def\filename{babel.dtx}
% \let\thisfilename\filename
@@ -37,23 +37,23 @@
% \changes{babel~3.6k}{1999/03/18}{We need at least \LaTeX\ from
% June 1998}
% \begin{macrocode}
-%<+package>\NeedsTeXFormat{LaTeX2e}[1998/06/01]
+%<+package>\NeedsTeXFormat{LaTeX2e}[2005/12/01]
% \end{macrocode}
%
%% File 'babel.dtx'
%\fi
-%%\ProvidesFile{babel.dtx}[2005/11/23 v3.8h The Babel package]
+%%\ProvidesFile{babel.dtx}[2008/03/16 v3.8j The Babel package]
%\iffalse
%
% Babel DOCUMENT-STYLE option for LaTeX version 2.09 or plain TeX;
%% Babel package for LaTeX2e.
%
-%% Copyright (C) 1989 -- 2005 by Johannes Braams,
+%% Copyright (C) 1989 -- 2008 by Johannes Braams,
%% TeXniek
%% all rights reserved.
%
%% Please report errors to: J.L. Braams
-%% babel at braams.cistron.nl
+%% babel at braams.xs4all.nl
%<*filedriver>
\documentclass{ltxdoc}
\usepackage{supertabular}
@@ -155,7 +155,7 @@
% Kersengaarde 33\\
% 2723 BP Zoetermeer\\
% The Netherlands\\
-% \texttt{babel@braams.cistron.nl}}
+% \texttt{babel\char64 braams.xs4all.nl}}
%
% \date{Printed \today}
%
@@ -293,7 +293,8 @@
% \tabletail{\hline}
% \begin{supertabular}{l p{8cm}}
% Afrikaans & afrikaans\\
-% Bahasa & bahasa\\
+% Bahasa & bahasa, indonesian, indon, bahasai,
+% bahasam, malay, meyalu\\
% Basque & basque\\
% Breton & breton\\
% Bulgarian & bulgarian\\
@@ -982,7 +983,7 @@
%<+kernel&!patterns>\ProvidesFile{switch.def}
%<+driver&!user>\ProvidesFile{babel.drv}
%<+driver&user>\ProvidesFile{user.drv}
- [2005/11/23 v3.8h %
+ [2008/03/16 v3.8j %
%<+package> The Babel package]
%<+core> Babel common definitions]
%<+kernel> Babel language switching mechanism]
@@ -2016,6 +2017,8 @@
% \emph{just} the hyphenation rules. This environment does
% \emph{not} change |\languagename| and when the hyphenation rules
% specified were not loaded it has no effect.
+% \changes{babel~3.8j}{2008/03/16}{Also set the hyphenmin paramters to
+% the correct value (PR3997)}
% \begin{macrocode}
\def\hyphenrules#1{%
\expandafter\ifx\csname l@#1\endcsname\@undefined
@@ -2023,6 +2026,12 @@
\else
\language=\csname l@#1\endcsname\relax
\languageshorthands{none}%
+ \expandafter\ifx\csname #1hyphenmins\endcsname\relax
+ \set@hyphenmins\tw@\thr@@\relax
+ \else
+ \expandafter\expandafter\expandafter\set@hyphenmins
+ \csname #1hyphenmins\endcsname\relax
+ \fi
\fi
}
\def\endhyphenrules{}
@@ -2850,7 +2859,7 @@
% to make its argument a shorthand character. The real work is
% performed once for each character.
% \changes{babel~3.7c}{1999/04/30}{Only execute
-% \cs{initiate@active@char} for each character}
+% \cs{initiate@active@char} once for each character}
% \begin{macrocode}
\def\initiate@active@char#1{%
\expandafter\ifx\csname active@char\string##1\endcsname\relax
@@ -2906,7 +2915,7 @@
% \changes{babel~3.5a}{1995/03/10}{Added a check for right quote and
% adapt \cs{pr@m@s} if necessary}
% \changes{babel~3.7f}{1999/12/18}{The redefinition needs to take
-% place on level higher, \cs{prim@s} needs to be redefined.}
+% place one level higher, \cs{prim@s} needs to be redefined.}
% \begin{macrocode}
\ifx##1'%
\let\prim@s\bbl@prim@s
@@ -3493,13 +3502,16 @@
% work out as expected. And to keep things local that need to
% remain local a group is opened, which is closed as soon as |\x|
% gets executed.
+% \changes{babel~3.8j}{2008/03/21}{Added a group in order to protect
+% the current lowercase code of the tilde (PR 3851)}
% \begin{macrocode}
\begingroup
\catcode`\~\active
\def\x{\endgroup
\def\bbl@switch@sh@on##1{%
+ \begingroup
\lccode`~=`##1%
- \lowercase{%
+ \lowercase{\endgroup
\catcode`~\active
}%
}%
@@ -5166,7 +5178,6 @@
% \subsection{marks}
%
% \begin{macro}{\markright}
-% \begin{macro}{\markboth}
% \changes{babel~3.6i}{1997/03/15}{Added redefinition of \cs{mark...}
% commands}
% Because the output routine is asynchronous, we must
@@ -5228,8 +5239,17 @@
\bbl@tempa
}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\markboth}
+% \begin{macro}{\@mkboth}
% The definition of |\markboth| is equivalent to that of
-% |\markright|, except that we need two token registers.
+% |\markright|, except that we need two token registers. The
+% documentclasses \cls{report} and \cls{book} define and set the
+% headings for the page. While doing so they also store a copy of
+% |\markboth| in |\@mkboth|. Therefor we need to check whether
+% |\@mkboth| has already been set. If so we neeed to do that again
+% with the new definition of |\makrboth|.
% \changes{babel~3.7m}{2003/11/15}{added \cs{bbl@restore@actives} to
% the mark}
% \changes{babel~3.8c}{2004/05/26}{No need to add \emph{anything} to
@@ -5238,6 +5258,16 @@
% \changes{babel~3.8f}{2005/05/15}{Make the definition independent of
% the original definition; expand \cs{languagename} before passing
% it into the token registers}
+% \changes{babel~3.8j}{2008/03/21}{Added setting of \cs{@mkboth} (PR
+% 3826)}
+% \begin{macrocode}
+\ifx\@mkboth\markboth
+ \def\bbl@tempc{\let\@mkboth\markboth}
+\else
+ \def\bbl@tempc{}
+\fi
+% \end{macrocode}
+% Now we can start the new definition of |\markboth|
% \begin{macrocode}
\bbl@redefine\markboth#1#2{%
\edef\bbl@tempb{\noexpand\protect
@@ -5260,6 +5290,10 @@
\noexpand\org@markboth{\the\toks@}{\the\toks8}}%
\bbl@tempa
}
+% \end{macrocode}
+% and copy it to |\@mkboth| if necesary.
+% \begin{macrocode}
+\bbl@tempc
%</core|shorthands>
% \end{macrocode}
% \end{macro}
@@ -5436,7 +5470,32 @@
% \end{macrocode}
% \end{macro}
%
-% \subsubsection{General}
+% \subsubsection{\pkg{hyperref}}
+%
+% \begin{macro}{\pdfstringdefDisableCommands}
+% \changes{babel~3.8j}{2008/03/16}{Inform \pkg{hyperref} to use
+% shorthands at system level (PR4006)}
+% Although a number of interworking problems between \pkg{babel}
+% and \pkg{hyperref} are tackled by \pkg{hyperref} itself we need
+% to take care of correctly handling the shorthand characters.
+% When they get expanded inside a bookmark a warning will appear in
+% the log file which can be prevented. This is done by informing
+% \pkg{hyperref} that it should the shorthands as defined on the
+% system level rather than at the user level.
+%
+% \begin{macrocode}
+\AtBeginDocument{%
+ \@ifundefined{pdfstringdefDisableCommands}%
+ {}%
+ {\pdfstringdefDisableCommands{%
+ \languageshorthands{system}}%
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{General}
%
% \begin{macro}{\FOREIGNLANGUAGE}
% The package \pkg{fancyhdr} treats the running head and fout lines