summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-09-05 22:54:44 +0000
committerKarl Berry <karl@freefriends.org>2009-09-05 22:54:44 +0000
commit253f2f4b6317007af9c26d77d07169e9e3c3e12d (patch)
tree12d0306081dae344b69605f4173fa0bca739eef2 /Master/texmf-dist/doc/latex
parent874ece84a0d160db419570dff359a6e4c3c44063 (diff)
magyar.ldf update (5sep09)
git-svn-id: svn://tug.org/texlive/trunk@15146 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/magyar/magyar.ldf117
1 files changed, 111 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/magyar/magyar.ldf b/Master/texmf-dist/doc/latex/magyar/magyar.ldf
index 0ae6a7c3d3b..0056f93f79e 100644
--- a/Master/texmf-dist/doc/latex/magyar/magyar.ldf
+++ b/Master/texmf-dist/doc/latex/magyar/magyar.ldf
@@ -1605,7 +1605,9 @@
\magyar@opt@@amsuppercasefix
\expandafter\ifx\csname altucnm\endcsname\relax\else 1\fi
\space\else\@@magyar@skiplong\fi
- \AtEndOfPackage{\RequirePackage{textcase}}
+ % textcase.sty is not available by default (Ubuntu 8.04 TeX Live), and
+ % newer amsart.cls doesn't have this bug (\'\i gets capitalized properly)
+ \AtEndOfPackage{\IfFileExists{textcase.sty}{\RequirePackage{textcase}}{}}
\@gobble
{^}%
@@ -2200,15 +2202,49 @@
\def\@@magyar@amstocnumskip@defs{%
\ifx\tocsubsection\@undefined\else
\ifx\tocsubsection\tocparagraph
- %** Overrides amsart.cls etc. Only for Hungarian \section{}s. Changes \quad to
- %** \magyar@opt@@amstocnumskip in the definition.
+ %** Overrides amsart.cls, amsbook.cls etc.
+ %** Only for Hungarian \section{}s. Changes \quad to
+ %** \magyar@opt@@amstocnumskip in the definition. Also changes
+ %** ``fejezet 1'' to ``1. fejezet'' for \chapter
+ %** (We have \def\tocchapter{\tocsection} by default.)
\def\tocsection##1##2##3{%
%%\typeout{--##3--}%
- \indentlabel{\@ifnotempty{##2}{\ignorespaces##1 ##2.\magyar@opt@@amstocnumskip}}##3%
- }%
+ \indentlabel{%
+ \def\reserved@a{##1}%
+ \def\reserved@b{##2}%
+ \ifx\reserved@b\empty
+ \else\ifx\reserved@a\chaptername
+ % * Sometimes (but not in \tableofcontents) #1 is
+ % `\csname chaptername\endcsname'. Why?
+ % * \tocappendix is called instead of \tocsection for the
+ % appendix.
+ \ifnum\magyar@opt@@chapternumber=1 \@huordinal{##2}~%
+ \else\ifnum\magyar@opt@@chapternumber=2 \@Huordinal{##2}~%
+ \else##2.~%
+ \fi\fi
+ ##1.\magyar@opt@@amstocnumskip
+ \else\ifx\reserved@a\partname
+ \ifnum\magyar@opt@@partnumber=1 \@huordinal{##2}~%
+ \else\ifnum\magyar@opt@@partnumber=2 \@Huordinal{##2}~%
+ \else##2.~%
+ \fi\fi
+ ##1.\magyar@opt@@amstocnumskip
+ \else
+ \ignorespaces##1 ##2.\magyar@opt@@amstocnumskip
+ \fi\fi\fi}%
+ ##3}%
%** Overrides amsart.cls etc. Only for Hungarian \section{}s. Changes \quad to
%** \magyar@opt@@amstocnumskip in the definition.
- \def\tocappendix##1##2##3{\indentlabel{##1\@ifnotempty{##2}{ ##2}.\magyar@opt@@amstocnumskip}##3}%
+ \def\tocappendix##1##2##3{%
+ \indentlabel{%
+ \def\reserved@a{##1}%
+ \ifx\reserved@a\appendixname
+ ##2\ifx\@@magyar@appendixname\@empty.\fi~##1%
+ \else
+ ##1\@ifnotempty{##2}{ ##2}%
+ \fi
+ .\magyar@opt@@amstocnumskip}%
+ ##3}%
\fi
\fi
}%
@@ -4792,6 +4828,75 @@
\ifx\reserved@a\magyar@opt@@classmod #2\fi
}
\fi
+
+\@@magyar@ifclassloaded{amsbook}{%
+ \let\magyar@hunumbers@errmsg\@empty
+ \let\@@magyar@orig@makechapterhead\@makechapterhead
+ \def\@makechapterhead#1{%
+ \begingroup
+ \let\@@magyar@orig@centerline\centerline
+ \def\centerline##1{%
+ \@@magyar@orig@centerline{%
+ \normalsize\mdseries
+ \ifx\chaptername\appendixname
+ \ifx\@@magyar@appendixname\@empty
+ % print a dot in the appendix only if appendixdot=yes
+ \thechapter.~
+ \else
+ \thechapter\enspace
+ \fi
+ \else\ifnum\magyar@opt@@chapternumber=1
+ \uppercase\@xp{\@huordinal\c@chapter}~%
+ \else\ifnum\magyar@opt@@chapternumber=2
+ \uppercase\@xp{\@Huordinal\c@chapter}~%
+ \else\thechapter.~%
+ \fi\fi\fi
+ \uppercase\@xp{\chaptername}%
+ }%
+ }%
+ \@@magyar@orig@makechapterhead{#1}%
+ \endgroup
+ }%
+ \let\@@magyar@orig@chapter\@chapter
+ \def\@chapter{%
+ \let\@@magyar@orig@chapter@typeout\typeout
+ \def\typeout##1{%
+ % Original: \typeout{\chaptername\space\@secnumber}
+ \@@magyar@orig@chapter@typeout{%
+ \ifnum\c@secnumdepth<\z@
+ \chaptername\space
+ \else
+ \thechapter\ifx\chaptername\appendixname\else.\fi
+ \space\chaptername
+ \fi
+ }%
+ \let\typeout\@@magyar@orig@chapter@typeout
+ }%
+ \@@magyar@orig@chapter
+ }%
+ % Just to be sure, no need for this in amsbook.cls 2004/08/06
+ \@ifundefined{tocpart}{\let\tocpart\tocsection}{}
+ % TODO(pts): Override only parts of \@part
+ \def\@part[#1]#2{%
+ \ifnum \c@secnumdepth >-2\relax \refstepcounter{part}%
+ % TODO(pts): What does \tocpart do for a non-hungarian \tableofcontents?
+ \addcontentsline{toc}{part}{\protect\tocpart{\partname}{\thepart}%
+ {#1}}%
+ \else
+ \addcontentsline{toc}{part}{#1}\fi
+ \begingroup\centering
+ \ifnum \c@secnumdepth >-2\relax
+ {\fontsize{\@xviipt}{22}\bfseries
+ \ifnum\magyar@opt@@partnumber=1 \@huordinal\c@part~%
+ \else\ifnum\magyar@opt@@partnumber=2 \@Huordinal\c@part~%
+ \else\thechapter.~%
+ \fi\fi
+ \partname
+ } \vskip 20\p@ \fi
+ \fontsize{\@xxpt}{25}\bfseries
+ #1\vfil\vfil\endgroup \newpage\thispagestyle{empty}}
+}{}
+
\@@magyar@ifclassloaded{book}{%
\let\magyar@hunumbers@errmsg\@empty
% Headings: inserting dots, changing orders