texlive[41435]

commits+preining at tug.org commits+preining at tug.org
Mon Jun 13 10:36:52 CEST 2016


Revision: 41435
          http://tug.org/svn/texlive?view=revision&revision=41435
Author:   preining
Date:     2016-06-13 10:36:52 +0200 (Mon, 13 Jun 2016)
Log Message:
-----------
add old magyar.ldf

Added Paths:
-----------
    trunk/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf

Added: trunk/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf	2016-06-13 08:36:52 UTC (rev 41435)
@@ -0,0 +1,5801 @@
+%
+% magyar.ldf -- LaTeX Language Definition for `magyar' (Hungarian), v1.5c
+% written and copyright (C) by P\'eter SZAB\'O <pts at fazekas.hu>
+% (version 1.5 -- Early October 2003 -- February 2004 --)
+%
+% The newest version of this magyar.ldf is part of MagyarLaTeX, available from
+% http://www.math.bme.hu/latex/ . The web page is in Hungarian language, but
+% it is easy to figure out how to download the newest magyar.ldf. Please
+% bookmark this link as the definitive source of the newest version.
+%
+% This program is free software. There is NO WARRANTY. Use at your own risk!
+% You can choose any of these licenses: GNU GPL, LaTeX's license,
+% Babel's license.
+%
+% When will magyar.ldf 1.5 be part of mainstream LaTeX / Babel? I have no
+% idea, ask the maintainer of Babel. magyar.ldf 1.5 has ptebeen converted to
+% magyar.dtx on June 27, 2004. That version has been submitted to the
+% maintainer of the Babel package. No reply from him since then.
+%
+% Should magyar.ldf 1.5 be part of tetex, or should it be available as a
+% supplementary package in TeX distributions? Yes, but this is the task of the
+% creators of those distributions. The Debian package ``magyarlatex'',
+% which supplements the teTeX shipped with Debian Woody, Sarge and Sid,
+% is available from http://www.math.bme.hu/latex/dl
+% (file magyarlatex-latest.deb).
+%
+% The author of magyar.ldf 1.5 has uploaded it to CTAN
+% (http://www.ctan.org), but he doesn't re-upload regularly, because he
+% doesn't have time to maintain it and re-upload it after each bugfix. If
+% you think that magyar.ldf 1.5 should be on CTAN, feel free to upload a
+% snapshot, since it is free software.
+%
+% magyar.ldf 1.5 is based on magyar.ldf 1.4. However, it has been totally
+% rewritten and extended (just compare the file sizes), and it doesn't share
+% code from the earlier versions anymore. However, its default configuration
+% tries to be compatible with older versions.
+%
+% Earlier versions of file `magyar.dtx' Babel package for LaTeX version 2e
+%   Copyright (C) 1989--2004 by Johannes Braams, TeXniek
+%   Copyright (C) 1989--2004 by
+%   \'Arp\'ad B\'IR\'O
+%   J\'ozsef B\'ERCES (version 1.4c -- 2001; contains a lot of work of him)
+%
+% To typeset text in Hungarian, please
+%
+% 1. Include `magyar huhyph.tex' in language.dat, re-run initex(1) (initex
+%    'latex.ini \dump') or pdfinitex(1), verify that running latex(1) displays
+%    the word `magyar' in the line containing `hyphenation patterns' in its
+%    console output.
+%
+% 2. In the document preamble, use
+%
+%      \def\magyarOptions{defaults=hu-min}
+%      \usepackage[magyar]{babel}
+%      \usepackage{t1enc}% for automatic hyphenation of accented chars
+%      \usepackage[latin2]{inputenc}% for typing chars
+%
+% This file is quite long, because it implements a lot of parametric features
+% related to typesetting Hungarian text with \LaTeX. Sorry.
+%
+% Motto: ``There is a lot to do in the future'' -- by Gy\xF6ngyi Bujdos\xF3 and
+% Ferenc Wettl in their conference proceedings article ``On the localization
+% of TeX in Hungary'', presented at EuroBachoTeX 2002.
+%
+% Most of the code and comments in this file are written by P\'eter Szab\'o.
+% The newest version is available from http://www.math.bme.hu/latex/
+%
+% The version of this file is 1.5, even when new releases come out. Please see
+% the \expandafter\ProvidesLanguage line for the release date.
+%
+
+\expandafter\ifx\csname CurrentOption\endcsname\relax
+  \def\CurrentOption{magyar}%
+\fi
+%** So `\input magyar.ldf' will work as well.
+\expandafter\ifx\csname ver at babel.sty\endcsname\relax
+  \csname fi\endcsname
+  \endinput \expandafter\RequirePackage\expandafter[\CurrentOption]{babel}
+\fi
+
+%\ProvidesFile{magyar.ldf}[1996/12/23 v1.3h Magyar support from the babel system]
+%\ProvidesLanguage{magyar}[2001/03/05 v1.4c Magyar support from the babel system]
+% vvv for Babel v3.7
+\expandafter\ProvidesLanguage\expandafter{\CurrentOption}[2015/11/24 v1.5c Magyar support from the babel v3.7 system]
+
+% Possibly do \endinput if .ldf already loaded
+\expandafter\LdfInit\expandafter{\CurrentOption}{captions\CurrentOption}%
+
+% Fix \catcodes{} possibly screwed up by other Babel languages.
+% Dat: \string`\string! could have been written as \string`!
+\edef\@@magyar at restcats{%
+  \catcode\string`\string`\the\catcode\string``\space\space
+  \catcode\string`\string!\the\catcode\string`!\space\space
+  \catcode\string`\string*\the\catcode\string`*\space\space
+  \catcode\string`\string+\the\catcode\string`+\space\space
+  \catcode\string`\string-\the\catcode\string`-\space\space
+  \catcode\string`\string=\the\catcode\string`=\space\space
+  \catcode\string`\string|\the\catcode\string`|\space\space
+  \catcode\string`\string;\the\catcode\string`;\space\space
+  \catcode\string`\string:\the\catcode\string`:\space\space
+  \catcode\string`\string'\the\catcode\string`'\space\space
+  \catcode\string`\string"\the\catcode\string`"\space\space
+  \catcode\string`\string?\the\catcode\string`?\space\space
+  \catcode\string`\string/\the\catcode\string`/\space\space
+  \let\noexpand\@@magyar at restcats\noexpand\@undefined
+}
+\catcode\string``12       \catcode`!12 \catcode`*12 \catcode`+12 \catcode`-12
+\catcode`=12 \catcode`|12 \catcode`;12 \catcode`:12 \catcode`'12 \catcode`"12
+\catcode`?12 \catcode`/12
+
+%** Expand \CurrentOption early.
+\edef\@@magyar at error#1{\noexpand\PackageError{\CurrentOption.ldf}{#1}\noexpand\@ehc}
+
+% --- Declare options.
+%
+% Dat: \languageattribute{magyar}{...} and \bbl at declare@ttribute{magyar}{foo}{...}
+% isn't enough for us, because it is processed
+% after \usepackage[magyar]{babel}, but we need the options information
+% earlier. And also it cannot contain `='.
+% 
+
+%** `\dMf foo-bar {...}' is `\def\foo-bar{...}' where `-' is a letter
+\def\dMf#1 {\expandafter\def\csname#1\endcsname}
+\def\magyar@@unchanged{unchanged}
+\def\magyar at enumarg#1#2{%
+  \expandafter\ifx\csname magyar at opt@#1@@#2\endcsname\relax
+    \@@magyar at error{Invalid arg for option: #1 = #2}%
+  \else
+    \csname magyar at opt@#1@@#2\endcsname
+  \fi
+}
+\def\@@magyar at argw@no  {0}%
+\def\@@magyar at argw@weak{1}%
+\def\@@magyar at argw@yes {2}%
+\def\magyar at yesweaknoarg#1#2{%
+  \expandafter\ifx\csname @@magyar at argw@#2\endcsname\relax
+    \@@magyar at error{Invalid arg for option: #1 = #2\MessageBreak Must be =no, =yes or =weak}%
+  \else
+    \expandafter\edef\csname magyar at opt@@#1\endcsname{\csname @@magyar at argw@#2\endcsname}%
+  \fi
+}
+
+% Declare defaults.
+
+%** These defaults load most of the new functionality, but try not to
+%** introduce visible typographical changes over magyar.ldf v1.4. These
+%** are the ovarall defaults of magyar.ldf v1.5, in case of
+%** \def\magyarOptions{} (or if is missing).
+%**
+%** These are the defaults: (over-1.4)
+%**   \def\magyarOptions{
+%**     accents=defaulthigh,       % or =high or =low
+%**     active=safe,               % or =problematic or =none or =onlycs
+%**     activeprefix=babelopt2,    % or =none or =babelopt3 or =grave or =acute or =quotedbl
+%**     activespace=none,          % or =safe or =problematic
+%**     afterindent=unchanged,     % or =force-no or =force-yes
+%**     amslevelfix=fix-ams,       % or =unchanged or =fix-all
+%**     amsuppercasefix=fix-ams,   % or =unchanged or =fix-all
+%**     amstocnumskip=\enskip,     % TeX code or --empty--
+%**     amstocnumlang=all,         % or =hu
+%**     amspostsectiondot=no,      % or =unchanged
+%**     appendixdot=yes,           % or =no % !! dokument\xE1lni
+%**     az=weak,                   % or =yes or =no
+%**     babelmarkfix=yes,          % or =unchanged
+%**     captionfix=yes,            % or =unchanged
+%**     captions=hu,               % or =unchanged
+%**     chapterhead=yes,           % or =unchanged(=no)
+%**     chapternumber=unchanged,   % see partnumber=
+%**     cjhebrewfix=yes,           % or =unchanged or =onlyouter
+%**     classmod=yes,              % or =unchanged(=no) or TeX class name
+%**     %defaults=over-1.4,        % or =compat-1.4 or =safest or =prettiest
+%**     dottedtocline=fix,         % or =unchanged
+%**     emitdate=weak,             % or =no or =yes
+%**     extras=yes,                % or =no
+%**     fancyhdr=hu,               % or =unchanged
+%**     figurecaptions=hu,         % or =us or =unchanged
+%**     frenchspacing=unchanged,   % or =no or =yes
+%**     hang=weak,                 % or =no or =yes
+%**     hunnewlabel=yes,           % or =no or =only-hu
+%**     hunumbers=yes,             % or =no
+%**     hutoday=yes,               % or =no
+%**     hyphenmins=22,             % or =unchanged or two chars: \lefthyphenmin\righthyphenmin
+%**     hyphenation=huhyph3,       % or =none or =composite or =phonetic or =huhyphn
+%**     hynumberline=unchanged,    % or =hu
+%**     labelenums=unchanged,      % or =hu-a or =hu-A or =hu-d
+%**     labelitems=unchanged,      % or =hu
+%**     longcaption=justified,     % or =centered or =centernewline or =none (=unchanged)
+%**     mathbrk=define,            % or =unchanged or =fix
+%**     mathhucomma=define,        % or =unchanged or =fix
+%**     mathfactorial=define,      % or =unchanged or =fix
+%**     mathmuskips=unchanged,     % or =latex or =hu
+%**     mathreal=weak,             % or =no or =yes
+%**     mond=weak,                 % or =no or =yes
+%**     ntheoremfix=yes,           % or =unchanged
+%**     openqq=maybedown,          % or =up or =down or =unchanged
+%**     partnumber=unchanged,      % or =huordinal or =Huordinal
+%**     postdescription=unchanged, % see postpara=
+%**     postpara=unchanged,        % or =bfdot or =dot or =quad or =diamond or =enskip or =quad or =em or =empty ... (\magyar at post@...)
+%**     postsubpara=unchanged,     % see postpara=
+%**     refstruc=weak,             % or =no or =yes
+%**     %safest=no,                % or =yes (safest=no has no effect, safest=yes is equivalent to defaults=safest)
+%**     sectiondot=safe,           % or =none or =problematic
+%**     shorthandcs=\shu,          % or =none or a csname or a \cs, e.g shorthandcs=\shu
+%**     shortrefcmds=yes,          % or =no
+%**     showfix=yes,               % or =unchanged
+%**     suggestions=yes,           % or =no
+%**     tablecaptions=hu,          % or =us or =unchanged
+%**     textqq=weak,               % or =no or =yes
+%**     theoremtitle=hu,           % or =unchanged
+%**     footnote=yes,              % or =unchanged or =huplain or =starplain
+%**     titles=\enskip,            % TeX code: =unchanged, =\quad or other
+%**     toclang=good,              % or =badfloat or =badall or =unchanged
+%**     told=weak,                 % or =no or =yes
+%**     varioref=hu,               % or =unchanged
+%**   }\usepackage[magyar]{babel}
+\dMf magyar at opt@defaults@@over-1.4 {%
+  \magyar at opt@accents@@defaulthigh
+  \magyar at opt@active@@safe
+  \magyar at opt@activeprefix{activeprefix}{babelopt2}%
+  \magyar at opt@activespace@@none
+  \magyar at opt@afterindent@@unchanged
+  \magyar at opt@amslevelfix{amslevelfix}{fix-ams}%
+  \magyar at opt@amsuppercasefix{amsuppercasefix}{fix-ams}%
+  \magyar at opt@amspostsectiondot@@no% change over 1.4
+  \magyar at opt@amstocnumlang@@all
+  \magyar at opt@amstocnumskip{amstocnumskip}{\enskip}% change over 1.4
+  \magyar at opt@appendixdot@@yes
+  \magyar at opt@babelmarkfix@@yes
+  \magyar at opt@az{az}{weak}%
+  \magyar at opt@captionfix@@yes
+  \magyar at opt@captions@@hu
+  \magyar at opt@chapternumber@@unchanged
+  \magyar at opt@classmod@@yes
+  \magyar at opt@dottedtocline@@fix
+  \magyar at opt@emitdate{emitdate}{weak}%
+  \magyar at opt@extras@@yes
+  \magyar at opt@chapterhead@@yes
+  \magyar at opt@fancyhdr@@hu% change over 1.4
+  \magyar at opt@figurecaptions@@hu
+  \magyar at opt@footnote@@yes
+  \magyar at opt@frenchspacing@@unchanged
+  \magyar at opt@hang{hang}{weak}%
+  \magyar at opt@hunnewlabel@@yes
+  \magyar at opt@hunumbers@@yes
+  \magyar at opt@hutoday@@yes
+  \magyar at opt@hyphenation{hyphenation}{huhyph3-or-any}%
+  \magyar at opt@hyphenmins{hyphenmins}{22}% change over 1.4 Dat: Default LaTeX is {23}
+  \magyar at opt@labelenums@@unchanged
+  \magyar at opt@labelitems@@unchanged
+  \magyar at opt@longcaption@@justified
+  \magyar at opt@mathbrk@@define
+  \magyar at opt@mathfactorial@@define
+  \magyar at opt@mathhucomma@@define
+  \magyar at opt@mathmuskips@@unchanged
+  \magyar at opt@hynumberline@@unchanged
+  \magyar at opt@mathreal{mathreal}{weak}%
+  \magyar at opt@mond{mond}{weak}%
+  \magyar at opt@ntheoremfix@@yes
+  \magyar at opt@openqq@@maybedown
+  \magyar at opt@partnumber@@unchanged
+  \magyar at opt@postpara{}{unchanged}%
+  \magyar at opt@postsubpara{}{unchanged}%
+  \magyar at opt@refstruc{refstruc}{weak}%
+  \magyar at opt@sectiondot@@safe
+  \magyar at opt@shorthandcs{shorthandcs}{\shu}%
+  \magyar at opt@shortrefcmds@@yes
+  \magyar at opt@showfix@@yes
+  \magyar at opt@suggestions@@yes
+  \magyar at opt@tablecaptions@@hu
+  \magyar at opt@textqq{textqq}{weak}%
+  \magyar at opt@theoremtitle@@hu
+  \magyar at opt@titles{}{\enskip}% change over 1.4
+  \magyar at opt@toclang@@good
+  \magyar at opt@told{told}{weak}%
+  \magyar at opt@varioref@@hu
+  \magyar at opt@cjhebrewfix@@yes
+}
+
+%** These defaults try to be compatible with magyar.ldf v1.4 as much as
+%** possible -- but avoids stupid, problematic, dangerous implementation
+%** mistakes that would make magyar.ldf incompatible with many LaTeX
+%** packages. The purpose of compat-1.4 is to make the document compilable:
+%** if a fix would produce better results, but documents are compilable
+%** without the fix, the fix will not be applied in compat-1.4.
+%** Some very useful fixes are not applied here -- please use
+%** defaults=over-1.4 to have them. Also some very nice features such
+%** as \emitdate and \told are not available here.
+\dMf magyar at opt@defaults@@compat-1.4 {%
+  \magyar at opt@accents@@defaulthigh% OK
+  \magyar at opt@active@@safe% we don't want =problematic
+  \magyar at opt@activeprefix@@grave% OK
+  \magyar at opt@activespace@@none% OK
+  \magyar at opt@afterindent@@unchanged% OK
+  \magyar at opt@amslevelfix@@unchanged% OK
+  \magyar at opt@amsuppercasefix@@unchanged% OK
+  \magyar at opt@amspostsectiondot@@unchanged% OK
+  \magyar at opt@amstocnumlang@@all% OK, irrelevant
+  \magyar at opt@amstocnumskip{amstocnumskip}{}% OK
+  \magyar at opt@appendixdot@@yes
+  \magyar at opt@babelmarkfix@@unchanged
+  \magyar at opt@az{az}{yes}% OK
+  \magyar at opt@captionfix@@unchanged
+  \magyar at opt@captions@@hu% OK
+  \magyar at opt@chapterhead@@yes% OK
+  \magyar at opt@chapternumber@@unchanged% OK
+  \magyar at opt@classmod@@yes% OK
+  \magyar at opt@dottedtocline@@unchanged% OK
+  \magyar at opt@emitdate{emitdate}{no}% OK
+  \magyar at opt@extras@@yes% OK
+  \magyar at opt@fancyhdr@@unchanged% OK
+  \magyar at opt@figurecaptions@@hu% OK
+  \magyar at opt@footnote@@unchanged% OK
+  \magyar at opt@frenchspacing@@unchanged% OK
+  \magyar at opt@hang{hang}{no}% OK
+  \magyar at opt@hunnewlabel@@yes% OK
+  \magyar at opt@hunumbers@@no% OK
+  \magyar at opt@hutoday@@yes% OK
+  \magyar at opt@hyphenation{hyphenation}{huhyph3-or-any}% OK
+  \magyar at opt@hyphenmins{hyphenmins}{unchanged}%
+  \magyar at opt@labelenums@@unchanged% OK
+  \magyar at opt@labelitems@@unchanged% OK
+  \magyar at opt@longcaption@@justified% OK
+  \magyar at opt@mathbrk@@unchanged% OK
+  \magyar at opt@mathhucomma@@unchanged% OK
+  \magyar at opt@mathfactorial@@unchanged% OK
+  \magyar at opt@mathmuskips@@unchanged% OK
+  \magyar at opt@hynumberline@@unchanged% OK
+  \magyar at opt@mathreal{mathreal}{no}%
+  \magyar at opt@mond{mond}{no}% OK
+  \magyar at opt@ntheoremfix@@yes% OK
+  \magyar at opt@openqq@@maybedown% OK
+  \magyar at opt@partnumber@@unchanged% OK
+  \magyar at opt@postpara{}{unchanged}% OK
+  \magyar at opt@postsubpara{}{unchanged}% OK
+  \magyar at opt@refstruc{refstruc}{no}% OK
+  \magyar at opt@sectiondot@@safe% we don't want =problematic
+  \magyar at opt@shorthandcs{shorthandcs}{none}% OK
+  \magyar at opt@shortrefcmds@@yes% OK
+  \magyar at opt@showfix@@yes% OK
+  \magyar at opt@suggestions@@no% OK -- user has explicity requested defaults=compat-1.4
+  \magyar at opt@tablecaptions@@hu% OK
+  \magyar at opt@textqq{textqq}{no}% OK
+  \magyar at opt@theoremtitle@@hu% OK
+  \magyar at opt@titles{}{\quad}% OK -- ugly, but compatible
+  \magyar at opt@toclang@@good% we don't want weird errors and mischosen languages (would be =badall)
+  \magyar at opt@told{told}{no}% OK
+  \magyar at opt@varioref@@hu% was =unchanged, but varioref.sty (2000) is buggy
+  \magyar at opt@cjhebrewfix@@yes
+}
+
+%** These defaults turn of most features -- the effect is similar to as if
+%** magyar.ldf hasn't been loaded at all. Useful for debugging purposes.
+\def\magyar at opt@defaults@@safest{%
+  \magyar at opt@accents@@defaulthigh
+  \magyar at opt@active@@none
+  \magyar at opt@activeprefix@@none
+  \magyar at opt@activespace@@none
+  \magyar at opt@afterindent@@unchanged
+  \magyar at opt@amslevelfix@@unchanged
+  \magyar at opt@amsuppercasefix{amsuppercasefix}{fix-ams}%
+  \magyar at opt@amspostsectiondot@@unchanged
+  \magyar at opt@amstocnumlang@@all% OK, irrelevant
+  \magyar at opt@amstocnumskip{amstocnumskip}{}%
+  \magyar at opt@appendixdot@@yes
+  \magyar at opt@az{az}{no}%
+  \magyar at opt@babelmarkfix@@yes
+  \magyar at opt@captionfix@@yes
+  \magyar at opt@captions@@unchanged
+  \magyar at opt@chapternumber@@unchanged
+  \magyar at opt@classmod@@unchanged
+  \magyar at opt@dottedtocline@@unchanged
+  \magyar at opt@emitdate{emitdate}{no}%
+  \magyar at opt@extras@@no
+  \magyar at opt@chapterhead@@no
+  \magyar at opt@fancyhdr@@unchanged
+  \magyar at opt@figurecaptions@@unchanged
+  \magyar at opt@footnote@@unchanged
+  \magyar at opt@frenchspacing@@unchanged
+  \magyar at opt@hang{hang}{no}%
+  \magyar at opt@hunnewlabel@@no
+  \magyar at opt@hunumbers@@no
+  \magyar at opt@hutoday@@no
+  \magyar at opt@hyphenation{hyphenation}{huhyph3-or-any}%
+  \magyar at opt@hyphenmins{hyphenmins}{unchanged}%
+  \magyar at opt@labelenums@@unchanged
+  \magyar at opt@labelitems@@unchanged
+  \magyar at opt@longcaption@@unchanged
+  \magyar at opt@mathbrk@@unchanged
+  \magyar at opt@mathhucomma@@unchanged
+  \magyar at opt@mathfactorial@@unchanged
+  \magyar at opt@mathmuskips@@unchanged
+  \magyar at opt@hynumberline@@unchanged
+  \magyar at opt@mathreal{mathreal}{no}%
+  \magyar at opt@mond{mond}{no}%
+  \magyar at opt@ntheoremfix@@unchanged
+  \magyar at opt@openqq@@unchanged
+  \magyar at opt@partnumber@@unchanged
+  \magyar at opt@postpara{}{unchanged}%
+  \magyar at opt@postsubpara{}{unchanged}%
+  \magyar at opt@refstruc{refstruc}{no}%
+  \magyar at opt@sectiondot@@none
+  \magyar at opt@shorthandcs{shorthandcs}{none}%
+  \magyar at opt@shortrefcmds@@no
+  \magyar at opt@showfix@@unchanged
+  \magyar at opt@suggestions@@yes
+  \magyar at opt@tablecaptions@@unchanged
+  \magyar at opt@textqq{textqq}{no}%
+  \magyar at opt@theoremtitle@@unchanged
+  \magyar at opt@titles{}{unchanged}%
+  \magyar at opt@toclang@@unchanged
+  \magyar at opt@told{told}{no}%
+  \magyar at opt@varioref@@unchanged
+  \magyar at opt@cjhebrewfix@@unchanged
+}
+
+%** These defaults load almost all features, and try to do their best to make
+%** the document comply to the Hungarian typography standards. Full compliance
+%** is not achieved yet, and as new features are implemented, they will be
+%** added to these defaults.
+\def\magyar at opt@defaults@@prettiest{%
+  \magyar at opt@accents@@defaulthigh% {low} would have no effect with \usepackage{t1enc}
+  \magyar at opt@active@@safe
+  \magyar at opt@activeprefix{activeprefix}{babelopt2}%
+  \magyar at opt@activespace@@safe
+  \magyar at opt@afterindent@@unchanged% keep =force-no
+  \magyar at opt@amslevelfix{amslevelfix}{fix-ams}%
+  \magyar at opt@amsuppercasefix{amsuppercasefix}{fix-ams}%
+  \magyar at opt@amspostsectiondot@@no
+  \magyar at opt@amstocnumlang@@all
+  \magyar at opt@amstocnumskip{amstocnumskip}{\enskip}%
+  \magyar at opt@appendixdot@@no
+  \magyar at opt@az{az}{yes}%
+  \magyar at opt@babelmarkfix@@yes
+  \magyar at opt@captionfix@@yes
+  \magyar at opt@captions@@hu
+  \magyar at opt@chapternumber@@unchanged
+  \magyar at opt@classmod@@yes
+  \magyar at opt@dottedtocline@@fix
+  \magyar at opt@emitdate{emitdate}{yes}%
+  \magyar at opt@extras@@yes
+  \magyar at opt@chapterhead@@yes
+  \magyar at opt@fancyhdr@@hu
+  \magyar at opt@figurecaptions@@hu
+  \magyar at opt@footnote@@yes
+  \magyar at opt@frenchspacing@@yes
+  \magyar at opt@hang{hang}{yes}%
+  \magyar at opt@hunnewlabel@@yes
+  \magyar at opt@hunumbers@@yes
+  \magyar at opt@hutoday@@yes
+  \magyar at opt@hyphenation{hyphenation}{composite-or-any}%
+  \magyar at opt@hyphenmins{hyphenmins}{22}% Dat: Default LaTeX is {23}
+  \magyar at opt@labelenums{labelenums}{hu-a}%
+  \magyar at opt@labelitems@@hu
+  \magyar at opt@longcaption@@centered
+  \magyar at opt@mathbrk@@fix
+  \magyar at opt@mathhucomma@@fix
+  \magyar at opt@mathfactorial@@fix
+  \magyar at opt@mathmuskips@@hu
+  \magyar at opt@hynumberline@@hu
+  \magyar at opt@mathreal{mathreal}{yes}%
+  \magyar at opt@mond{mond}{yes}%
+  \magyar at opt@ntheoremfix@@yes
+  \magyar at opt@openqq@@maybedown
+  \magyar at opt@partnumber@@Huordinal
+  \magyar at opt@postdescription{}{dot}%
+  \magyar at opt@postpara{}{diamond}%
+  \magyar at opt@postsubpara{}{star}%
+  \magyar at opt@refstruc{refstruc}{yes}%
+  \magyar at opt@sectiondot@@safe
+  \magyar at opt@shorthandcs{shorthandcs}{\shu}%
+  \magyar at opt@shortrefcmds@@no
+  \magyar at opt@showfix@@yes
+  \magyar at opt@suggestions@@yes
+  \magyar at opt@tablecaptions@@hu
+  \magyar at opt@textqq{textqq}{yes}%
+  \magyar at opt@theoremtitle@@hu
+  \magyar at opt@titles{}{\enskip}%
+  \magyar at opt@toclang@@good
+  \magyar at opt@told{told}{yes}%
+  \magyar at opt@varioref@@hu
+  \magyar at opt@cjhebrewfix@@yes
+}
+
+%** Expands to the \magyarOptions changes defaults=hu-min makes over
+%** defaults=safest.
+\def\magyar@@humin at options{%
+  active=safe,
+  activeprefix=babelopt2,
+  activespace=safe,
+  amslevelfix=fix-ams,
+  amspostsectiondot=no,
+  amstocnumlang=all,
+  amstocnumskip=\enskip,
+  appendixdot=no,
+  az=weak,
+  captions=hu,
+  chapterhead=yes,
+  cjhebrewfix=yes,
+  classmod=yes,
+  classmod=yes,
+  dottedtocline=fix,
+  emitdate=weak,
+  extras=yes,
+  fancyhdr=hu,
+  figurecaptions=hu,
+  footnote=huplain,
+  frenchspacing=yes,
+  hang=weak,
+  hunnewlabel=yes,
+  hunumbers=yes,
+  hutoday=yes,
+  hynumberline=hu,
+  hyphenmins=22,
+  labelenums=hu-d,
+  labelitems=hu,
+  longcaption=centered,
+  mathbrk=define,
+  mathbrk=fix,
+  mathfactorial=define,
+  mathhucomma=fix,
+  mathreal=weak,
+  mond=weak,
+  ntheoremfix=yes,
+  openqq=maybedown,
+  postdescription=dot,
+  postpara=diamond,
+  postsubpara=star,
+  refstruc=weak,
+  sectiondot=safe,
+  shorthandcs=\shu,
+  shortrefcmds=yes,
+  showfix=yes,
+  tablecaptions=hu,
+  textqq=weak,
+  theoremtitle=hu,
+  titles=\enskip,
+  toclang=good,
+  told=weak,
+  varioref=hu,
+}
+
+%** Matches Hungarian typographic rules most closely -- and most
+%** simplistically (minimally).
+\dMf magyar at opt@defaults@@hu-min {%
+  %\csname magyar at opt@defaults@@over-1.4\endcsname
+  \csname magyar at opt@defaults@@safest\endcsname
+  % Dat: no openqq=unchanged (!)
+  \expandafter\magyar at doopt\magyar@@humin at options\hfuzz,%
+}
+
+\def\magyarDumpHuMin{%
+  \begingroup
+  \typeout{}
+  \typeout{\expandafter\@gobble\string\% for defaults=hu-min}%
+  \typeout{\string\def\string\magyarOptions\expandafter\@gobble\string\{}%
+  \typeout{ \space defaults=safest,}%
+  \typeout{ \space\expandafter\@gobble\string\%}%
+  \def\magyar at applyopt##1##2{%
+    \def\reserved at a{##1=##2,}%
+    \typeout{ \space\expandafter\strip at prefix\meaning\reserved at a}%
+  }%
+  \expandafter\magyar at doopt\magyar@@humin at options\hfuzz,%
+  \typeout{\expandafter\@gobble\string\}}%
+  \typeout{\string\usepackage[magyar]{babel}}%
+  \typeout{}%
+  \endgroup
+}
+
+\let\magyar at opt@defaults\magyar at enumarg
+\def\magyar at opt@safest@@yes{\magyar at opt@defaults@@safest}
+\def\magyar at opt@safest@@no{}
+\let\magyar at opt@safest\magyar at enumarg
+
+% Declare normal options.
+
+\def\magyar at opt@titles#1#2{\def\magyar at opt@@titleskip{#2}}
+\def\@@magyar at twodigitcheck#1#2#3\hfuzz#4#5{%
+  \csname if\ifnum0<0\string#1 \ifnum0<0\string#2 false\else true\fi\else true\fi\endcsname
+    \@@magyar at error{Option #4 needs [1-9][1-9], got #1#2}%
+  \fi
+}
+\def\magyar at opt@hyphenmins#1#2{%
+  \def\reserved at a{#2}%
+  \ifx\reserved at a\magyar@@unchanged
+    \let\magyar at opt@@hyphenmins\@empty
+  \else
+    \@@magyar at twodigitcheck#2..\hfuzz{#1}{#2}%
+    \def\magyar at opt@@hyphenmins{#2}%
+  \fi
+}
+
+\def\magyar at opt@amstocnumskip#1#2{\def\magyar at opt@@amstocnumskip{#2}}
+\def\magyar at opt@amstocnumlang@@all{\def\magyar at opt@@amstocnumlang{2}}
+\def\magyar at opt@amstocnumlang@@hu {\def\magyar at opt@@amstocnumlang{1}}
+\let\magyar at opt@amstocnumlang\magyar at enumarg
+\def\magyar at opt@active@@none{\def\magyar at opt@@active{0}}
+\def\magyar at opt@active@@onlycs{\def\magyar at opt@@active{1}}
+\def\magyar at opt@active@@safe{\def\magyar at opt@@active{2}}
+\def\magyar at opt@active@@problematic{\def\magyar at opt@@active{3}}
+\let\magyar at opt@active\magyar at enumarg
+\def\magyar at opt@activeprefix@@none    {\let\magyar at opt@@activeprefix\relax}
+\def\magyar at opt@activeprefix@@acute   {\def\magyar at opt@@activeprefix{'}}
+\def\magyar at opt@activeprefix@@grave   {\def\magyar at opt@@activeprefix{`}}
+\def\magyar at opt@activeprefix@@quotedbl{\def\magyar at opt@@activeprefix{"}}
+\dMf magyar at opt@activeprefix@@babelopt2 {%
+  \@ifpackagewith{babel}{activeacute}% Dat: not expandable
+    {\def\magyar at opt@@activeprefix{'}}%
+    {\def\magyar at opt@@activeprefix{`}}%
+}
+\dMf magyar at opt@activeprefix@@babelopt3 {%
+  \@ifpackagewith{babel}{activeacute}%
+    {\def\magyar at opt@@activeprefix{'}}%
+ {\@ifpackagewith{babel}{activegrave}%
+    {\def\magyar at opt@@activeprefix{`}}%
+    {\def\magyar at opt@@activeprefix{"}}}%
+}
+\let\magyar at opt@activeprefix\magyar at enumarg
+\def\magyar at opt@activespace@@none{\def\magyar at opt@@activespace{0}}
+\def\magyar at opt@activespace@@safe{\def\magyar at opt@@activespace{2}}
+\def\magyar at opt@activespace@@problematic{\def\magyar at opt@@activespace{3}}
+\let\magyar at opt@activespace\magyar at enumarg
+\def\magyar at opt@amspostsectiondot@@no       {\def\magyar at opt@@amspostsectiondot{1}}
+\def\magyar at opt@amspostsectiondot@@unchanged{\def\magyar at opt@@amspostsectiondot{0}}
+\let\magyar at opt@amspostsectiondot\magyar at enumarg
+\let\magyar at opt@hyphenation\magyar at enumarg
+\def\magyar at opt@hyphenation@@huhyphf  {\magyar at opt@hyphenation@@phonetic}
+\def\magyar at opt@hyphenation@@huhyphc  {\magyar at opt@hyphenation@@composite}
+\expandafter\ifx\csname @OFWO\endcsname\relax
+% Imp: fix --:hyphenation= reporting above
+\def\magyar at opt@hyphenation@@none              {\def\magyar at opt@@hyphenation{}}
+\dMf magyar at opt@hyphenation@@huhyph3           {\def\magyar at opt@@hyphenation{3rN}}
+\dMf magyar at opt@hyphenation@@huhyph3-or-any    {\def\magyar at opt@@hyphenation{3CmhwN}}
+\def\magyar at opt@hyphenation@@huhyphn           {\def\magyar at opt@@hyphenation{nrN}}
+\def\magyar at opt@hyphenation@@composite         {\def\magyar at opt@@hyphenation{crN}}
+\dMf magyar at opt@hyphenation@@composite-or-any  {\def\magyar at opt@@hyphenation{cCmhwN}}
+\def\magyar at opt@hyphenation@@any               {\def\magyar at opt@@hyphenation{CmhwN}}
+\def\magyar at opt@hyphenation@@phonetic          {\def\magyar at opt@@hyphenation{frN}}
+\else% report to lafmtgen.pl
+  \typeout{--:hyphenation-=\CurrentOption}
+  \def\magyar at opt@@hyphenation{}%
+  \def\magyar at opt@hyphenation@@none     {\def\magyar at opt@@hypr{}}
+  \dMf magyar at opt@hyphenation@@huhyph3  {\def\magyar at opt@@hypr{\typeout{--:hyphenation=magyar3}\typeout{--:hyphenation=magyar}}} % install both for safety
+  \def\magyar at opt@hyphenation@@huhyphn  {\def\magyar at opt@@hypr{\typeout{--:hyphenation=magyarn}\typeout{--:hyphenation=magyar}}}
+  \def\magyar at opt@hyphenation@@composite{\def\magyar at opt@@hypr{\typeout{--:hyphenation=magyarc}\typeout{--:hyphenation=magyar}}}
+  \def\magyar at opt@hyphenation@@phonetic {\def\magyar at opt@@hypr{\typeout{--:hyphenation=magyarf}}}
+\fi
+\def\magyar at opt@sectiondot@@none{\def\magyar at opt@@sectiondot{0}}
+\def\magyar at opt@sectiondot@@safe{\def\magyar at opt@@sectiondot{1}}
+\def\magyar at opt@sectiondot@@problematic{\def\magyar at opt@@sectiondot{2}}
+\let\magyar at opt@sectiondot\magyar at enumarg
+\def\magyar at opt@captions@@unchanged{\def\magyar at opt@@captions{0}}
+\def\magyar at opt@captions@@hu{\def\magyar at opt@@captions{1}}
+\let\magyar at opt@captions\magyar at enumarg
+\def\magyar at opt@varioref@@unchanged{\def\magyar at opt@@varioref{0}}
+\def\magyar at opt@varioref@@hu{\def\magyar at opt@@varioref{1}}
+\let\magyar at opt@varioref\magyar at enumarg
+\def\magyar at opt@cjhebrewfix@@unchanged{\def\magyar at opt@@cjhebrewfix{0}}
+\def\magyar at opt@cjhebrewfix@@onlyouter{\def\magyar at opt@@cjhebrewfix{1}}
+\def\magyar at opt@cjhebrewfix@@yes{\def\magyar at opt@@cjhebrewfix{2}}
+\let\magyar at opt@cjhebrewfix\magyar at enumarg
+\def\magyar at opt@fancyhdr@@unchanged{\def\magyar at opt@@fancyhdr{0}}
+\def\magyar at opt@fancyhdr@@hu{\def\magyar at opt@@fancyhdr{1}}
+\let\magyar at opt@fancyhdr\magyar at enumarg
+\def\magyar at opt@ntheoremfix@@unchanged{\def\magyar at opt@@ntheoremfix{0}}
+\def\magyar at opt@ntheoremfix@@yes{\def\magyar at opt@@ntheoremfix{1}}
+\let\magyar at opt@ntheoremfix\magyar at enumarg
+\def\magyar at opt@figurecaptions@@unchanged{\def\magyar at opt@@figurecaptions{0}}
+\def\magyar at opt@figurecaptions@@hu{\def\magyar at opt@@figurecaptions{1}}
+\def\magyar at opt@figurecaptions@@us{\def\magyar at opt@@figurecaptions{2}}
+\let\magyar at opt@figurecaptions\magyar at enumarg
+\def\magyar at opt@tablecaptions@@unchanged{\def\magyar at opt@@tablecaptions{0}}
+\def\magyar at opt@tablecaptions@@hu{\def\magyar at opt@@tablecaptions{1}}
+\def\magyar at opt@tablecaptions@@us{\def\magyar at opt@@tablecaptions{2}}
+\let\magyar at opt@tablecaptions\magyar at enumarg
+\def\magyar at opt@toclang@@unchanged{\def\magyar at opt@@toclang{0}}% same as =badall
+\def\magyar at opt@toclang@@badall{\def\magyar at opt@@toclang{0}}
+\def\magyar at opt@toclang@@badfloat{\def\magyar at opt@@toclang{1}}
+\def\magyar at opt@toclang@@good{\def\magyar at opt@@toclang{2}}
+\let\magyar at opt@toclang\magyar at enumarg
+\def\magyar at opt@mathbrk@@unchanged{\def\magyar at opt@@mathbrk{0}}
+\def\magyar at opt@mathbrk@@define{\def\magyar at opt@@mathbrk{1}}
+\def\magyar at opt@mathbrk@@fix{\def\magyar at opt@@mathbrk{2}}
+\let\magyar at opt@mathbrk\magyar at enumarg
+\def\magyar at opt@mathfactorial@@unchanged{\def\magyar at opt@@mathfactorial{0}}
+\def\magyar at opt@mathfactorial@@define{\def\magyar at opt@@mathfactorial{1}}
+\def\magyar at opt@mathfactorial@@fix{\def\magyar at opt@@mathfactorial{2}}
+\let\magyar at opt@mathfactorial\magyar at enumarg
+\def\magyar at opt@mathhucomma@@unchanged{\def\magyar at opt@@mathhucomma{0}}
+\def\magyar at opt@mathhucomma@@define{\def\magyar at opt@@mathhucomma{1}}
+\def\magyar at opt@mathhucomma@@fix{\def\magyar at opt@@mathhucomma{2}}
+\let\magyar at opt@mathhucomma\magyar at enumarg
+\def\magyar at opt@mathmuskips@@unchanged{\def\magyar at opt@@mathmuskips{0}}
+\def\magyar at opt@mathmuskips@@latex{\def\magyar at opt@@mathmuskips{1}}
+\def\magyar at opt@mathmuskips@@hu{\def\magyar at opt@@mathmuskips{2}}
+\let\magyar at opt@mathmuskips\magyar at enumarg
+\def\magyar at opt@hynumberline@@unchanged{\def\magyar at opt@@hynumberline{0}}
+\def\magyar at opt@hynumberline@@latex{\def\magyar at opt@@hynumberline{1}}
+\def\magyar at opt@hynumberline@@hu{\def\magyar at opt@@hynumberline{2}}
+\let\magyar at opt@hynumberline\magyar at enumarg
+\def\magyar at opt@hunnewlabel@@no {\def\magyar at opt@@hunnewlabel{0}}
+\dMf magyar at opt@hunnewlabel@@only-hu {\def\magyar at opt@@hunnewlabel{1}}
+\def\magyar at opt@hunnewlabel@@yes{\def\magyar at opt@@hunnewlabel{2}}
+\let\magyar at opt@hunnewlabel\magyar at enumarg
+\def\magyar at opt@partnumber@@unchanged{\def\magyar at opt@@partnumber{0}}
+\def\magyar at opt@partnumber@@huordinal{\def\magyar at opt@@partnumber{1}}
+\def\magyar at opt@partnumber@@Huordinal{\def\magyar at opt@@partnumber{2}}
+\let\magyar at opt@partnumber\magyar at enumarg
+\def\magyar at opt@chapternumber@@unchanged{\def\magyar at opt@@chapternumber{0}}
+\def\magyar at opt@chapternumber@@huordinal{\def\magyar at opt@@chapternumber{1}}
+\def\magyar at opt@chapternumber@@Huordinal{\def\magyar at opt@@chapternumber{2}}
+\let\magyar at opt@chapternumber\magyar at enumarg
+\def\magyar at opt@accents@@high{\def\magyar at opt@@umlaut{\umlauthigh}}
+\def\magyar at opt@accents@@low{\def\magyar at opt@@umlaut{\umlautlow\umlautelow}}
+\def\magyar at opt@accents@@defaulthigh{\let\magyar at opt@@umlaut\@empty}
+\let\magyar at opt@accents\magyar at enumarg
+\def\magyar at opt@longcaption@@centered{\def\magyar at caption@centering{\centering}\def\magyar at caption@newline{\ }}
+\def\magyar at opt@longcaption@@justified{\def\magyar at caption@centering{\relax}\def\magyar at caption@newline{\ }}
+\def\magyar at opt@longcaption@@centernewline{\def\magyar at caption@centering{\centering}\def\magyar at caption@newline{\\\relax}}
+\def\magyar at opt@longcaption@@none{\let\magyar at caption@centering\@empty}
+\def\magyar at opt@longcaption@@unchanged{\let\magyar at caption@centering\@empty}
+\let\magyar at opt@longcaption\magyar at enumarg
+\def\magyar at opt@suggestions@@no {\def\magyar at opt@@suggestions{0}}
+\def\magyar at opt@suggestions@@yes{\def\magyar at opt@@suggestions{1}}
+\let\magyar at opt@suggestions\magyar at enumarg
+\def\magyar at opt@appendixdot@@no {\def\@@magyar at appendixname{\appendixname}}
+\def\magyar at opt@appendixdot@@yes{\def\@@magyar at appendixname{}}
+\let\magyar at opt@appendixdot\magyar at enumarg
+\def\magyar at opt@extras@@no {\def\magyar at opt@@extras{0}}
+\def\magyar at opt@extras@@yes{\def\magyar at opt@@extras{1}}
+\let\magyar at opt@extras\magyar at enumarg
+\def\magyar at opt@chapterhead@@unchanged{\def\magyar at opt@@chapterhead{0}}
+\def\magyar at opt@chapterhead@@no{\def\magyar at opt@@chapterhead{0}}
+\def\magyar at opt@chapterhead@@yes{\def\magyar at opt@@chapterhead{1}}
+\let\magyar at opt@chapterhead\magyar at enumarg
+\def\magyar at opt@classmod@@no       {\let\magyar at opt@@classmod\relax}
+\def\magyar at opt@classmod@@unchanged{\let\magyar at opt@@classmod\relax}
+\def\magyar at opt@classmod@@yes      {\let\magyar at opt@@classmod\@empty}
+\def\magyar at opt@classmod#1#2{%
+  \expandafter\ifx\csname magyar at opt@#1@@#2\endcsname\relax
+    \@namedef{magyar at opt@@#1}{#2}%
+  \else
+    \csname magyar at opt@#1@@#2\endcsname
+  \fi
+}
+\def\magyar at opt@shorthandcs#1#2{%
+  \def\reserved at a{#2}%
+  \def\reserved at b{none}%
+  \ifx\reserved at a\reserved at b
+    \def\magyar at opt@@shorthandcs{0}% overridable
+  \else
+    \def\magyar at opt@@shorthandcs{1}%
+    \ifcat\hfuzz\noexpand#2\relax% #2 is \shu  \shu`tty is `tty
+      \def#2##1{\protect\@@magyar at shorthand}% Dat: ##1 is usually `_12
+    \else
+      \@namedef{#2}{\protect\@@magyar at shorthand}%
+    \fi
+  \fi
+}
+\def\magyar at opt@hunumbers@@no{\def\magyar at opt@@hunumbers{0}}
+\def\magyar at opt@hunumbers@@yes{\def\magyar at opt@@hunumbers{1}}
+\let\magyar at opt@hunumbers\magyar at enumarg
+\let\magyar at opt@az\magyar at yesweaknoarg
+\let\magyar at opt@told\magyar at yesweaknoarg
+\let\magyar at opt@textqq\magyar at yesweaknoarg
+\let\magyar at opt@emitdate\magyar at yesweaknoarg
+\let\magyar at opt@mathreal\magyar at yesweaknoarg
+\let\magyar at opt@refstruc\magyar at yesweaknoarg
+\let\magyar at opt@mond\magyar at yesweaknoarg
+\let\magyar at opt@hang\magyar at yesweaknoarg
+\def\magyar at opt@theoremtitle@@unchanged{\def\magyar at opt@@theoremtitle{0}}
+\def\magyar at opt@theoremtitle@@hu{\def\magyar at opt@@theoremtitle{1}}
+\let\magyar at opt@theoremtitle\magyar at enumarg
+\def\magyar at opt@footnote@@unchanged{\def\magyar at opt@@footnote{0}}
+\def\magyar at opt@footnote@@yes{\def\magyar at opt@@footnote{1}}
+\def\magyar at opt@footnote@@huplain{\def\magyar at opt@@footnote{2}}
+\def\magyar at opt@footnote@@starplain{\def\magyar at opt@@footnote{3}}
+\let\magyar at opt@footnote\magyar at enumarg
+\def\magyar at opt@hutoday@@no{\def\magyar at opt@@hutoday{0}}
+\def\magyar at opt@hutoday@@yes{\def\magyar at opt@@hutoday{1}}
+\let\magyar at opt@hutoday\magyar at enumarg
+\def\magyar at opt@shortrefcmds@@no{\def\magyar at opt@@shortrefcmds{0}}
+\def\magyar at opt@shortrefcmds@@yes{\def\magyar at opt@@shortrefcmds{1}}
+\let\magyar at opt@shortrefcmds\magyar at enumarg
+\def\magyar at opt@dottedtocline@@fix{\def\magyar at opt@@dottedtocline{1}}
+\def\magyar at opt@dottedtocline@@unchanged{\def\magyar at opt@@dottedtocline{0}}
+\let\magyar at opt@dottedtocline\magyar at enumarg
+\let\magyar at opt@amslevelfix\magyar at enumarg
+\def\magyar at opt@amslevelfix@@unchanged{\def\magyar at opt@@amslevelfix{0}}
+\dMf magyar at opt@amslevelfix@@fix-ams  {\def\magyar at opt@@amslevelfix{1}}
+\dMf magyar at opt@amslevelfix@@fix-all  {\def\magyar at opt@@amslevelfix{2}}
+\let\magyar at opt@amsuppercasefix\magyar at enumarg
+\def\magyar at opt@amsuppercasefix@@unchanged{\def\magyar at opt@@amsuppercasefix{0}}
+\dMf magyar at opt@amsuppercasefix@@fix-ams  {\def\magyar at opt@@amsuppercasefix{1}}
+\dMf magyar at opt@amsuppercasefix@@fix-all  {\def\magyar at opt@@amsuppercasefix{2}}
+\let\magyar at opt@captionfix\magyar at enumarg
+\def\magyar at opt@captionfix@@unchanged{\def\magyar at opt@@captionfix{0}}
+\def\magyar at opt@captionfix@@yes      {\def\magyar at opt@@captionfix{1}}
+\let\magyar at opt@babelmarkfix\magyar at enumarg
+\def\magyar at opt@babelmarkfix@@unchanged{\def\magyar at opt@@babelmarkfix{0}}
+\def\magyar at opt@babelmarkfix@@yes      {\def\magyar at opt@@babelmarkfix{1}}
+\let\magyar at opt@showfix\magyar at enumarg
+\def\magyar at opt@showfix@@unchanged{\def\magyar at opt@@showfix{0}}
+\def\magyar at opt@showfix@@yes      {\def\magyar at opt@@showfix{1}}
+\def\magyar at opt@labelenums@@unchanged{\def\magyar at opt@@labelenums{0}}
+\dMf magyar at opt@labelenums@@hu-a     {\def\magyar at opt@@labelenums{1}}
+\dMf magyar at opt@labelenums@@hu-A     {\def\magyar at opt@@labelenums{2}}
+\dMf magyar at opt@labelenums@@hu-d     {\def\magyar at opt@@labelenums{3}}
+\let\magyar at opt@labelenums\magyar at enumarg
+\def\magyar at opt@labelitems@@unchanged{\def\magyar at opt@@labelitems{0}}
+\def\magyar at opt@labelitems@@hu       {\def\magyar at opt@@labelitems{1}}
+\let\magyar at opt@labelitems\magyar at enumarg
+\def\magyar at opt@openqq@@unchanged{\def\magyar at opt@@openqq{0}}
+\def\magyar at opt@openqq@@up{\def\magyar at opt@@openqq{1}}
+\def\magyar at opt@openqq@@down{\def\magyar at opt@@openqq{2}}
+\def\magyar at opt@openqq@@maybedown{\def\magyar at opt@@openqq{3}}
+\let\magyar at opt@openqq\magyar at enumarg
+\def\magyar at opt@frenchspacing@@unchanged{\def\magyar at opt@@frenchspacing{0}}% same as =no
+\def\magyar at opt@frenchspacing@@no {\def\magyar at opt@@frenchspacing{1}}
+\def\magyar at opt@frenchspacing@@yes{\def\magyar at opt@@frenchspacing{2}}
+\let\magyar at opt@frenchspacing\magyar at enumarg
+\dMf magyar at opt@afterindent@@force-no {\def\magyar at opt@@afterindent{0}}
+\dMf magyar at opt@afterindent@@force-yes {\def\magyar at opt@@afterindent{1}}
+\dMf magyar at opt@afterindent@@unchanged {\def\magyar at opt@@afterindent{9}}
+\let\magyar at opt@afterindent\magyar at enumarg
+\def\magyar at opt@postpara#1#2{%
+  \def\reserved at a{#2}%
+  \ifx#2\magyar@@unchanged
+    \let\magyar at opt@@paragraphs\@undefined
+  \else
+    \expandafter\def\csname magyar at opt@@#1\endcsname{#2}%
+    \let\magyar at opt@@paragraphs\@empty
+  \fi
+}
+\let\magyar at opt@postsubpara\magyar at opt@postpara
+\let\magyar at opt@postdescription\magyar at opt@postpara
+
+% --- Option processing code of \magyarOptions
+%
+% Example: \def\magyarOptions{titles=\quad,active=safe} \usepackage[magyar]{babel}
+% Dat: Babel has \languageoptions, but it is quite weak and it's too late
+% Dat: this is a complete rewrite based on examplep.sty
+
+%** @param #1 to gobble a space token
+%** @usage \magyar at doopt foo=bar,foo2=bar2,\hfuzz,%
+\def\magyar at doopt#1,{%
+  \if,\noexpand#1,% ignore multiple commas (#1 is empty)
+    \expandafter\magyar at doopt
+  \else
+    \csname fi\endcsname% don't count as `\fi' when being skipped
+    \magyar at doopt@low#1,=,%
+  \fi
+}
+\@gobble\iftrue% \def\magyar at doopt@low contains `\fi'. Make it skippable.
+\def\magyar at applyopt#1#2{\csname magyar at opt@#1\endcsname{#1}{#2}}%
+%** @param #1 is here for gobbling space tokens
+\def\magyar at doopt@low#1#2=#3,#4\fi{%
+  % Dat: Normal case: #1#2 is key, #3 is value, #4 is `=,'
+  % Dat: MissingArg case: #1#2 is `key,', #3 is empty, #4 is empty
+  % Dat: Terminator case: #1#2 is `\hfuzz,', #3 is empty, #4 is empty
+  % Dat: OnlySpace case: #1 is `,', #2 is empty, #3 is empty, #4 is empty
+  \ifx\relax#4\relax% MissingArg or Terminator
+    \ifx#1\hfuzz% Terminator
+    \else
+      \if,\noexpand#1\else% OnlySpace case
+        \if=\noexpand#1\magyar at doopt@missingkey#2% #2 already contains comma at end
+        \else          \magyar at doopt@missingval#1#2\fi
+      \fi
+      \expandafter\expandafter\expandafter\magyar at doopt
+    \fi
+  \else% Normal
+    \expandafter\ifx\csname magyar at opt@#1#2\endcsname\relax
+      \@@magyar at error{Unknown option: #1#2 (= #3)}%
+    \else
+      \magyar at applyopt{#1#2}{#3}%
+    \fi
+    \expandafter\magyar at doopt
+  \fi
+}
+\def\magyar at doopt@missingkey#1,{%
+  \@@magyar at error{Key missing for value: #1}%
+}
+\def\magyar at doopt@missingval#1,{%
+  \@@magyar at error{Value (=) missing for option: #1}%
+}
+%** Dat: Spaces and newlines at end of #1 are not ignored, so please prefix
+%**      them with a comma, e.g \magyar at doopts{foo=bar, }
+%** @param #1 comma-separated optoinname=value pairs
+%\def\magyar at doopts#1{\magyar at doopt #1,\hfuzz,}%
+
+\def\magyar at dooptions{%
+  \expandafter\ifx\csname opt@\CurrentOption.ldf.sty\endcsname\relax\else
+    % Usage: \PassOptionsToPackage{foo=bar}{magyar.ldf}
+    \expandafter\expandafter\expandafter
+    \magyar at doopt\csname opt@\CurrentOption.ldf.sty\endcsname,\hfuzz,%
+   \expandafter\let\csname opt@\CurrentOption.ldf.sty\endcsname\relax
+  \fi
+  \expandafter\ifx\csname \CurrentOption Options\endcsname\relax\else% \magyarOptions
+    \expandafter\expandafter\expandafter
+    \magyar at doopt\csname\CurrentOption Options\endcsname,\hfuzz,%
+    \expandafter\let\csname \CurrentOption Options\endcsname\relax
+  \fi
+}
+\def\magyar at do@option at low#1#2=#3=,\vfuzz{%
+  \ifx#1\hfuzz\else
+    %%\typeout{(#1#2)=(#3)}%
+    % vvv wastes some heap (\csname), but never mind
+  \fi    
+}
+
+
+\magyar at opt@defaults{defaults}{over-1.4}  % defaults=over-1.4 by default
+\def\magyar at opt@@hdrtitleskip{\enskip}% !! option for that
+\magyar at dooptions% in \magyarOptions
+\ifnum\magyar at opt@@openqq=3 % =maybedown
+  \ifnum\magyar at opt@@active=0
+    \def\magyar at opt@@openqq{0}% =unchanged
+  \else
+    \def\magyar at opt@@openqq{2}% =down
+  \fi
+\fi
+\ifnum\magyar at opt@@partnumber   >0 \let\magyar at needopt@hunumbers\@empty \fi
+\ifnum\magyar at opt@@chapternumber>0 \let\magyar at needopt@hunumbers\@empty \fi
+\expandafter\ifx\csname magyar at needopt@hunumbers\endcsname\relax\else
+  \ifnum\magyar at opt@@hunumbers=0
+    \@@magyar at error{(chapter|part)number=... needs hunumbers=yes}%
+    \magyar at opt@@hunumbers1
+  \fi
+  \def\magyar at hunumbers@noclassmod{%
+    \@@magyar at error{unsupported \string\documentclass,\MessageBreak
+      hunumbers=yes,chapternumber=...,partnumber=... disabled}%
+  }%
+  % This may get redefined to \@empty later.
+  \def\magyar at hunumbers@errmsg{\magyar at hunumbers@noclassmod}%
+  \AtBeginDocument\magyar at hunumbers@errmsg
+\fi
+\if0\magyar at opt@@shorthandcs\else
+  \if\magyar at opt@@active0%
+    \@@magyar at error{active=none implies shorthandcs=none}%
+    \magyar at opt@@active2 % active=safe
+  \fi
+\fi
+% Imp: undef \magyar\@opt@* to save memory
+
+\@gobble\iftrue
+%** Usage: `\if...\else\@@magyar at skiplong\fi ... \@gobble{^}', where {^} is in
+%** its own line
+\def\@@magyar at skiplong#1{%
+  \fi
+  %\typeout{--skipfrom:\the\inputlineno}
+  \bgroup% so ^} would close it
+  \catcode\string`^13 \lccode\string`~=\string`^
+  \lowercase{\let~\fi}% \lowercase because catcode of ^ in \let^ would have been already assigned
+  %\lowercase{\def~{\typeout{--skipto:\inputlineno}\fi}}%
+  \catcode\string`\\14 % comment -- avoid using hash memory
+  \catcode\string`$14 % %$
+  \iffalse
+}
+\@gobble\fi
+
+\@namedef{extras\CurrentOption}{}%
+
+% --- hyphenation=
+
+\csname magyar at opt@@hypr\endcsname
+\let\magyar at sugg@pa\@gobble
+%\show\magyar at opt@@hyphenation
+\ifx\magyar at opt@@hyphenation\@empty
+  % Hungarian words won't be hyphenated automatically
+  \expandafter\chardef\csname l@\CurrentOption\endcsname255
+  \@@magyar at skiplong\fi
+% Define a warning, will be printed later.
+\def\@@magyar at suggpa@req at def{%
+  \def\magyar at sugg@pa##1{%
+  \PackageWarningNoLine{##1.ldf}{%
+    Requested Hungarian hyphenation= patterns missing.\MessageBreak
+    To make LaTeX hyphenate Hungarian words, please\MessageBreak
+    modify language.dat and rerun initex or texconfig}}}%
+% Define a warning, will be printed later.
+\def\@@magyar at suggpa@all at def{%
+  \def\magyar at sugg@pa##1{%
+  \PackageWarningNoLine{##1.ldf}{%
+    All Hungarian hyphenation= patterns missing.\MessageBreak
+    To make LaTeX hyphenate Hungarian words, please\MessageBreak
+    modify language.dat and rerun initex or texconfig}}}%
+\def\@@magyar at hyphenation@last#1\@@magyar at hyphenation@next#2\hfuzz{#1}%
+\def\@@magyar at hyphenation@defcs#1#2{\ifx#1#2\else\chardef#1#2\fi}% Dat: \chardef\foo\foo doesn't work
+\def\@@magyar at hyphenation@def#1{%
+  \expandafter\ifx\csname l@#1\endcsname\relax\else
+    \expandafter\expandafter\expandafter\@@magyar at hyphenation@defcs
+      \expandafter\expandafter\csname l@\CurrentOption\endcsname
+      \csname l@#1\endcsname
+    \@@magyar at hyphenation@last\fi}%
+\def\@@magyar at hyphenation@next#1{%
+  \ifx#1\hfuzz
+  \else\if#1N% none
+    % Turn of hyphenation.
+    \expandafter\chardef\csname l@\CurrentOption\endcsname255
+    \@@magyar at hyphenation@last
+  \else\if#1C% use l@\CurrentOption if defined
+    \expandafter\ifx\csname l@\CurrentOption\endcsname\relax\else
+      \@@magyar at hyphenation@last
+    \fi
+  \else\if#1w% print the all-missing-warning
+    \@@magyar at suggpa@all at def
+  \else\if#1r% print the req-missing-warning
+    \@@magyar at suggpa@req at def
+  \else\if#1h\@@magyar at hyphenation@def{hungarian}%
+  \else\if#1m\@@magyar at hyphenation@def{magyar}%
+  \else\if#13\@@magyar at hyphenation@def{magyar3}%
+  \else\if#1c\@@magyar at hyphenation@def{magyarc}%
+  \else\if#1f\@@magyar at hyphenation@def{magyarf}%
+  \else\if#1n\@@magyar at hyphenation@def{magyarn}%
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\@@magyar at hyphenation@next
+  % Dat: no \adddialect\l at magyar... - it's only a chardef
+}%
+
+%\tracingmacros1 \show\magyar at opt@@hyphenation
+\expandafter\@@magyar at hyphenation@next\magyar at opt@@hyphenation\hfuzz
+%\show\l at magyar
+%\tracingmacros0
+\expandafter\ifx\csname l@\CurrentOption\endcsname\relax
+  \expandafter\newcount\csname l@\CurrentOption\endcsname
+  % ^^^ BUGFIX at Tue Oct 12 14:13:54 CEST 2004
+\fi
+\let\@@magyar at suggpa@all at def\@undefined
+\let\@@magyar at suggpa@req at def\@undefined
+\@gobble
+{^}
+
+% --- accents=
+
+\ifx\magyar at opt@@umlaut\@empty\else% !! test this
+  % Dat: this only affects \"
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \babel at save\"\umlautlow \magyar at opt@@umlaut}
+\fi
+
+% --- theorem title number ordering and the dot; theoremtitle=
+%
+% Dat: \ref{mytheorem} never appends a dot
+%
+% If you want to define your own theorem style without using theorem.sty or
+% ntheorem.sty, then do a
+% \PassOptionsToPackage{theoremtitle=unchanged}{magyar.ldf} , and then
+% define a custom \@begintheorem, \@opargbegintheorem and \@endtheorem.
+
+\if0\magyar at opt@@theoremtitle \@@magyar at skiplong\fi
+% for theorem.sty and ntheorem.sty
+% Define your \newtheorem commands in the preamble, before \theoremstyle
+\def\magyar at th@magyar{%
+  \def\@begintheorem##1##2{%
+    \item[\hskip \labelsep{\theorem at headerfont ##2.\ ##1.}]}%
+  \def\@opargbegintheorem##1##2##3{%
+    \item[\hskip \labelsep{\theorem at headerfont ##2.\ ##1\ (##3).}]}%
+}
+
+% vvv Dat: theorem.sty needs \th at magyar-plain when \theoremstyle{...}
+%     is called, so we have to define it early (even if theorem.sty is not
+%     loaded).
+\expandafter\let\csname th@\CurrentOption-plain\endcsname\magyar at th@magyar% Dat: moved to earlier
+% !! now \usepackage{theorem}
+%        \usepackage[magyar]{babel}
+%        \theoremstyle{magyar-plain}% % Dat: must be put before \new
+%        \newtheorem{Def}{Defin\'{i}ci\'o}
+
+%** @param #1 magyar
+\def\@@magyar at setup@theoremstyle#1{%
+  \expandafter\ifx\csname theorem at headerfont\endcsname\relax
+    \let\magyar at th@magyar\@undefined
+  \else
+    %\expandafter\let\csname th@#1-plain\endcsname\magyar at th@magyar% Dat: moved to earlier
+    % vvv Dat: activate the Hungarian theorem style by default.
+    \def\theorem at headerfont{\bf}%
+    \edef\reserved at a{\the\theorem at style}%
+    \def\reserved at b{plain}%
+    \ifx\reserved at a\reserved at b
+      \expandafter\theorem at style\expandafter{#1-plain}%
+    \fi
+  \fi
+}
+
+% Do this quite late in case theorem.sty or ntheorem.sty is loaded late.
+\expandafter\AtBeginDocument\expandafter{\expandafter
+  \@@magyar at setup@theoremstyle\expandafter{\CurrentOption}}
+
+\expandafter\addto\csname extras\CurrentOption\endcsname{%
+  %%\show\theorem at headerfont
+  \expandafter\ifx\csname thm at swap\endcsname\relax
+    \expandafter\ifx\csname theorem at headerfont\endcsname\relax% no theorem.sty
+      \babel at save\@begintheorem
+      % Dat: amsart.cls: \def\@begintheorem#1#2[#3]{}%
+      \def\@begintheorem#1#2{\trivlist
+	\item[\hskip \labelsep{\bfseries #2.\ #1.}]\itshape}% old: \slshape
+      \babel at save\@opargbegintheorem
+      \def\@opargbegintheorem#1#2#3{\trivlist
+	\item[\hskip \labelsep{\bfseries #2.\ #1\ (#3).}]\itshape}% old: \slshape
+    \else% theorem.sty or ntheorem.sty
+      % Nothing -- style already set up in the preamble.
+    \fi
+  \else% amsthm.sty
+    \babel at save\thmhead
+    \babel at save\swappedhead
+    %** \swapnumbers. \newtheorem{...}{...} already inserts the trailing dot
+    % \def\thm at swap{S}% no effect :-(
+    %** overrides amsart.cls
+    \def\thmhead#1#2#3{%
+      \thmnumber{\@upn{#2}\@ifnotempty{#1}{.~}}%
+      \thmname{#1}%
+      \thmnote{ {\the\thm at notefont(#3)}}%
+    }%
+    \let\swappedhead\thmhead
+  \fi
+}%
+\@gobble
+{^}%
+
+% --- Quotation marks with \textqq
+%
+% Symbols of Hungarian quoting: unquoted ,,outer >>middle 'inner'<<''
+% Equivalent: unquoted \quotedblbase outer \guillemotright middle
+%   \textquoteright inner\textquoteright\guillemotleft\textquotedblright
+% With magyar.ldf: unquoted \textqq{outer \textqq{middle \textqq{inner}}}
+% Typing this with magyar.ldf works for outer: \textqq{foo}
+% Typing this works with T1 and OT1 for outer: \glqq foo''
+% Typing this works in T1, but not in OT1 for outer: ,,foo''
+%
+
+\if0\magyar at opt@@textqq \@@magyar at skiplong\fi
+\def\magyar at textqq@level{0}
+%** Provide a placeholder for language-unspecific \textqq
+\def\@@magyar at textqq@nolang#1{%
+  \ifcase\magyar at textqq@level
+    \def\magyar at textqq@level{1}%
+    \textquotedblleft#1\textquotedblright
+    \def\magyar at textqq@level{0}%
+  \or
+    \textquoteleft#1\textquoteright
+  \fi
+}
+\def\@@magyar at textqq@hu#1{\ifmmode\expandafter\mbox\fi{%
+  % Imp: \textqq{\textqq{foo}} -> \textqq{\textqq{foo}\,}
+  % Dat: \showhyphens{\textqq{hello bello}} --> hel-lo bel-lo
+  % Dat: \guillemotleft is provided by babel.def even for the OT1 encoding
+  \ifcase\magyar at textqq@level
+    \def\magyar at textqq@level{1}%
+    % Dat: \hskip instead of \kern to allow hyphenation
+    % \nobreak\hskip-.06em adds a non-breakable skip and allows hyphenation
+    % of the following word.
+    \quotedblbase\nobreak\hskip-.06em\relax#1\kern\z@\textquotedblright% skip OK for the CM and EC fonts
+    \def\magyar at textqq@level{0}%
+  \or
+    \def\magyar at textqq@level{2}%
+    \guillemotright\nobreak\hskip-.07em\relax#1\kern-0.05em\guillemotleft% skip OK for CM and EC fonts
+    \def\magyar at textqq@level{1}%
+  \or
+    \def\magyar at textqq@level{3}%
+    \textquoteright\nobreak\hskip\z@\relax#1\kern\z@\textquoteright
+    \def\magyar at textqq@level{2}%
+  \else
+    \quotedblbase\nobreak\hskip-.06em\relax#1\kern\z@\textquotedblright% skip OK for the CM and EC fonts
+  \fi
+}}%
+
+\catcode`\ =11\relax% make space a letter
+\ifnum\magyar at opt@@textqq\expandafter\ifx\csname\@gobble.textqq\endcsname\relax1\fi>1\relax% 21, 2, 11, 1
+\def\textqq{\protect\textqq }% \MakeRobust
+\def\@@magyar at textqq{\protect\textqq }%
+\let\textqq \@@magyar at textqq@nolang%
+\expandafter\addto\csname\@gobble.extras\CurrentOption\endcsname%
+{\babel at save\textqq \let\textqq \@@magyar at textqq@hu}%
+\else%
+\def\@@magyar at textqq{\protect\@@magyar at textqq }% \MakeRobust
+\let\@@magyar at textqq \@@magyar at textqq@nolang%
+\expandafter\addto\csname\@gobble.extras\CurrentOption\endcsname%
+{\babel at save\@@magyar at textqq \let\@@magyar at textqq \@@magyar at textqq@hu}%
+\fi%
+\catcode`\ =10\relax% back to space again
+\@gobble
+{^}%
+
+% --- Definite articles (\az, \pageref -> \apageref etc.)
+
+\if0\magyar at opt@@az \@@magyar at skiplong\fi
+
+\makeatletter
+
+%** modified by pts at Fri Oct  3 22:19:13 CEST 2003
+%** @param #1 tokens, will be \edef\vfuzz'ed
+\def\@@magyar at az@vfuzzedef#1{%
+  \begingroup
+  \@safe at activestrue% allow active `:' inside labels; 
+  \def\hyper@@link[##1]##2##3##4{##4}% Dat: \def\b at abook{\hyper@@link [cite]{}{cite.sokt}{2}}% with hyperref.sty
+  \let\romannumeral\number% by pts at fazekas.hu at Mon Oct 27 23:44:06 CET 2003
+  % Dat: deliberately no \autoref for hyperref.sty !! (why??)
+  \let\ref\@@magyar at zeroref \let\pageref\@@magyar at zeropageref
+  \let\cite\@@magyar at zerocite \let\eqref\@@magyar at zeroeqref
+  % ^^^ fix so \az{\ref{...}} works
+  \let\refstruc\@@magyar at zerorefplus
+  \let\refstrucparen\@@magyar at zerorefplus
+  \def\setbox ##1{}% to get rid of accents and special letters
+  \def\hbox ##1{}%
+  \def\accent ##1 ##2{##2}%
+  \def\add at accent ##1##2{##2}%
+  \def\@text at composite@x ##1##2{##2}%
+  \def\i{i}\def\j{j}%
+  \def\ae{a}\def\AE{A}\def\oe{o}\def\OE{O}%
+  \def\ss{s}\def\L{L}%
+  \def\d{}\def\b{}\def\c{}\def\t{}% Dat: no need to redefine \H and \.
+  % Dat: no need to remove \textsf or \mdseries, because they are
+  % handled properly by \protect == \string here.
+  \let\@safe at activestrue\@empty% babel puts these inside \b at ...: % Dat: \def\b at abook{\@safe at activesfalse 2}% (what is \@safe at actives??)
+  \let\@safe at activesfalse\@empty
+  \edef\vfuzz{\noexpand\def\noexpand\vfuzz{#1}}%
+  \expandafter\endgroup\vfuzz
+}
+
+%** Makes \az etc. not emit the definite article.
+%** Unused.
+\def\@@magyar at noaz{%
+  \def\@@magyar at az@lowt{\@ifstar\@gobble\@firstofone}%
+  \def\az{\@@magyar at az@lowt}%
+  \let\Az\az
+  \def\aref{\@ifstar\@gobble\@@magyar at az@lowa}%
+  \let\Aref\aref
+  \def\apageref{\@ifstar\@gobble\firstoftwo}%
+  \let\Apageref\apageref
+  \def\acite{\@ifstar\@gobble\cite}%
+  \let\Acite\acite
+}
+
+%** Usage: \az{alma} -> `az alma'; \Az*{alma} -> `az'
+%** Usage: \az+\ref{foo} is equivalent to \az{\ref{foo}}
+\def\@@magyar at az@lowt{\@ifstar{\@@magyar at az@lowy}{\@ifnextchar+\@@magyar at az@lowz\@@magyar at az@lowx}}
+\def\@@magyar at az@lowz#1#2#3{\@@magyar at az@lowy{#2{#3}}~#2{#3}}
+%** Used by new varioref.sty
+\def\@@magyar at az@lowxu{\unskip\@@magyar at az@lowx}%
+\def\@@magyar at az@lowx#1{\@@magyar at az@lowy{#1}~#1}
+\def\@@magyar at az@lowy#1{{%
+  \begingroup
+  %\def\protect{\noexpand\protect\noexpand}%
+  \set at display@protect% screws up \r
+  \@@magyar at az@vfuzzedef{#1}%
+  %%\show\vfuzz
+  \expandafter\endgroup\expandafter
+    \set at display@protect\expandafter% fixes \r; why??
+    \@@magyar at az@set\expandafter{\vfuzz}\hbox$%
+}}
+
+\def\@@magyar at firstarg#1#2\hbox${#1}%
+
+%** \Aref({e:foo}) -> `az~(5)'; \aref*{e:foo}: `az'
+\def\@@magyar at az@lowa{\@ifnextchar({\@@magyar at az@lowb}{\@@magyar at az@lowb\@empty}}
+\def\@@magyar at az@lowb#1#2{\@@magyar at az@ref\@firstoftwo{#2}~#1\ref{#2}}
+%** @param #1 \@firstoftwo (for \ref) or \@secondoftwo (for \pageref)
+%**           everything which is not \@secondoftwo is treated is \@firstoftwo
+%** @param #2 for \csname r@#2\endcsname
+\def\@@magyar at az@ref#1#2{%
+  \begingroup
+  % Dat: this works when turning on hyperref.sty for the 1st time (1st .aux file) -- but the original \ref doesn't work (\@fifthoffive)
+  % Dat: #2 might contain an active : ; ! ? in case
+  %      \def\magyarOptions{activespace=safe}
+  \begingroup\lccode`~`: \lowercase{\endgroup\edef~{\string~}}%
+  \begingroup\lccode`~`; \lowercase{\endgroup\edef~{\string~}}%
+  \begingroup\lccode`~`! \lowercase{\endgroup\edef~{\string~}}%
+  \begingroup\lccode`~`? \lowercase{\endgroup\edef~{\string~}}%
+  \@ifundefined{@@magyar at r@#2}{%
+    \@ifundefined{r@#2}{\let\reserved at a\@empty}{\expandafter\let\expandafter\reserved at a\csname r@#2\endcsname}%
+  }{\expandafter\let\expandafter\reserved at a\csname @@magyar at r@#2\endcsname}%
+  \ifx\reserved at a\@empty\endgroup\else% a speed boost
+    \ifx#1\@secondoftwo\relax % Dat: remove the 1st {...} arg inside \reserved at a
+      \expandafter\expandafter\expandafter\def\expandafter\expandafter
+        \expandafter\reserved at a\expandafter\expandafter\expandafter{%
+        \expandafter\expandafter\expandafter\@gobble\reserved at a{}}%
+    \fi
+    % vvv keep only the 1st arg (w/o braces) of \vbox, without expansion.
+    %     This is to have hyperref.sty with `\newlabel{tab}{{1}{2}{\texorpdfstring {\textit {bg}}{asd}\relax }{section.1}{}}'
+    %     right, and \texorpdfstring not expanded in the \edef below.
+    \expandafter\expandafter\expandafter\def\expandafter\expandafter
+      \expandafter\reserved at a\expandafter\expandafter\expandafter{%
+      \expandafter\expandafter\expandafter\@@magyar at firstarg\reserved at a{}\hbox$}%
+    \expandafter\@@magyar at az@vfuzzedef\expandafter{\reserved at a}%
+    \expandafter\endgroup\expandafter\@@magyar at az@set\expandafter{\vfuzz}\hbox$%
+  \fi
+}
+
+\def\@@magyar at az@lowd#1{\@@magyar at az@ref\@secondoftwo{#1}~\pageref{#1}}
+
+\def\@@magyar at acite@lowb{\@ifnextchar [{\@@magyar at acite@lowa}{\@@magyar at acite@lowa[]}}
+\def\@@magyar at acite@lowa[#1]#2{%
+  \@@magyar at acite@lowd{#2}~%
+  \ifx\vfuzz#1\vfuzz\cite{#2}\else\cite[#1]{#2}\fi
+}
+\def\@@magyar at acite@lowd#1{\@@magyar at acite@lowc#1,\hbox$}
+\def\@@magyar at acite@lowc#1,#2\hbox#3${%
+  \begingroup
+  \@ifundefined{@@magyar at b@#1}{%
+    \@ifundefined{b@#1}{\def\vfuzz{}}{%
+      \@@magyar at az@vfuzzedef{%
+        \expandafter\expandafter\expandafter\@@magyar at b@number
+        \expandafter\expandafter\expandafter{\csname b@#1\endcsname}}}%
+  }  {\@@magyar at az@vfuzzedef{\csname @@magyar at b@#1\endcsname}}%
+  \expandafter\endgroup\expandafter
+    \@@magyar at az@set\expandafter{\vfuzz}\hbox$%
+}
+
+% The original version of the \@az macros below were written by
+% David Carlisle, but they have been completely rewritten by pts.
+
+%** Adds definite article for a word #1#2#3 if #1 is in [A..Z]. Spaces
+%** between #1, #2 and #3 can be -- fortunately -- ignored.
+%** This is used to distinguish single-letter labels from text labels.
+%** Dat: by pts: `\Az{Sz} bet\xFB' emits `Az Sz bet\xFB'; `\az{sz\xF3lam}' is also OK
+%** @param #1#2#3 doesn't contain \hbox (but may contain space)
+%** @param #1 #2 #3 never lower case
+\def\@@magyar at azuc#1#2#3{%
+  \if\noexpand#1Az%
+  \else\if\noexpand#1Ez%
+  \else\if\noexpand#1F\ifnum11=\the\catcode\string`#2\else z\fi
+  \else\if\noexpand#1Iz%
+  \else\if\noexpand#1L\ifnum11=\the\catcode\if\noexpand#2Y\string`#3\else\string`#2\fi\else z\fi
+  \else\if\noexpand#1M\ifnum11=\the\catcode\string`#2\else z\fi
+  \else\if\noexpand#1N\ifnum11=\the\catcode\if\noexpand#2Y\string`#3\else\string`#2\fi\else z\fi
+  \else\if\noexpand#1Oz%
+  \else\if\noexpand#1S\ifnum11=\the\catcode\if\noexpand#2Z\string`#3\else\string`#2\fi\else z\fi
+  \else\if\noexpand#1R\ifnum11=\the\catcode\string`#2\else z\fi
+  \else\if\noexpand#1Uz%
+  \else\if\noexpand#1X\ifnum11=\the\catcode\string`#2\else z\fi
+  \else\if\noexpand#1Y\ifnum11=\the\catcode\string`#2\else z\fi
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+\def\@@magyar at azuc@pre#1#2#3#4\hbox${%
+  \uppercase{\@@magyar at azuc#1#2#3}% Dat: we map a..z -> A..Z
+}
+
+%** Also defined elsewhere.
+%** @param #2 \else...\else...\fi...\fi etc.
+\def\@@magyar at swaprelax#1#2\relax{#2#1}
+\def\@@magyar at ignorehbox@pre#1\hbox${}%
+%** Counts the number of digits until a nondigit is found, and insert `z' if
+%** appropriate (divisible by 3).
+%** We need this to properly handle \aref for eg. 1.3.12 (subsec number)
+%** or 3-45 (pagenumber preceeded by chapter number).
+\def\@@magyar at eatddd#1#2#3#4{%
+  % Wizardry: \@@magyar at eatddd throws away #1 (\@@magyar at ignorehbox@pre)
+  \ifnum9<1\string#2 \ifnum9<1\string#3 \ifnum9<1\string#4 % test for digits
+  \@@magyar at swaprelax\@@magyar at eatddd\fi\fi\else z\fi
+  \relax\@@magyar at ignorehbox@pre
+}
+
+% vvv Wizardry: ignore everything (second number?) after first space
+\def\@@magyar at eatddd@pre#1 #2\hbox${\@@magyar at eatddd.#1[][]\hbox$}%
+
+\@gobble\iftrue
+\def\@@magyar at azrb@stop#1#2\fi{#1}%
+%** Strips spaces and braces automatically
+%** @expands to `z' or nothing (last char of definite article)
+%** @example \message{R:\removebraces {{foo}{{}{b}{{{{a\fi}}}}r}}\hfuzz;}
+\def\@@magyar at azrb#1{%
+  \ifx\hfuzz#1\@@magyar at azrb@stop\fi
+  \expandafter\@@magyar at azrb\expandafter{%
+  \ifcat{\noexpand#1\hfuzz\iffalse}\fi\expandafter
+    \@@magyar at azrb\else\hfuzz}\@@magyar at azrb@nob{#1}\fi}
+\def\@@magyar at azrb@nob#1#2{#2% #2 is \fi
+  \ifx\hfuzz#1\hfuzz\expandafter\@firstoftwo
+    \expandafter\@@magyar at azrb\fi\@@magyar at azrb@nobone#1}
+\def\@@magyar at azrb@nobone#1{\noexpand#1\@@magyar at azrb}%
+
+\def\@@magyar at aznospace#1{%
+  \if\hfuzz\noexpand#1\expandafter\@@magyar at aznospace\else % a \cs, ignored -- may be \relax
+    \expandafter\@@magyar at aznospace@short\expandafter#1%
+  \fi
+}
+
+%** @param #1 might not be \cs -- and isn't empty
+\def\@@magyar at aznospace@short#1{%
+  \if5\noexpand#1z% Dat: emit `az 5'
+    \@@magyar at swaprelax\@@magyar at ignorehbox@pre
+  \else\if1\noexpand#1%
+    % Dat: properly handle `az 1001 \xE9jszaka', `az 1234567 \xE9ves bolyg\xF3'
+    \@@magyar at swaprelax\@@magyar at eatddd@pre
+  \else\ifnum1<1\noexpand#1 % a different digit, emit `a '
+    \@@magyar at swaprelax\@@magyar at ignorehbox@pre
+  \else\if-\noexpand#1% \az{-5} yields `a~-5'
+    \@@magyar at swaprelax\@@magyar at ignorehbox@pre
+  \else\ifcat\string*\noexpand#1% ignore non-digit (non-letter) `other' char
+    % Wizardary: (undocumented)
+    % This is a really smart way to ignore control sequence chars resulting
+    % from \string\textrm etc. Fortunately, most control sequences don't
+    % contain digits.
+    \@@magyar at swaprelax\@@magyar at aznospace
+  \else
+    \@@magyar at swaprelax{\@@magyar at azuc@pre#1}% safe to call, no \cs
+  \fi\fi\fi\fi\fi\relax
+}
+
+%** Typesets `z' or nothing (last char of definite article). Is _not_
+%** expandable.
+%** @param #1 may contain space(_10) tokens, but mustn't contain expandable
+%**   tokens.
+\def\@@magyar at az@set#1#2\hbox${% by pts
+  % ^^^ Dat: we have `$' instead of `!' because of catcode changes (shouldn't affect)
+  \edef\reserved at a{\@@magyar at azrb#1\hfuzz}%
+  \expandafter\@@magyar at aznospace\reserved at a[b][][] \hbox$%
+  % ^^^ Wizardry: [b][][] is a smart sentinel for \@@magyar at azuc and `b' for
+  %	\@@magyar at aznospace@short. First `[' is there for aesthetics. Space
+  %     is there for \@@magyar at eatddd@pre. \hbox$ is something that will not
+  %     occur in normal text.
+}
+
+\ifnum\magyar at opt@@az \expandafter\ifx\csname az\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\az{a\@@magyar at az@lowt}\fi
+\ifnum\magyar at opt@@az \expandafter\ifx\csname Az\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\Az{A\@@magyar at az@lowt}\fi
+\ifnum\magyar at opt@@az \expandafter\ifx\csname aref\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\aref{a\@ifstar{\@@magyar at az@ref\@firstoftwo}{\@@magyar at az@lowa}}\fi
+\ifnum\magyar at opt@@az \expandafter\ifx\csname Aref\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\Aref{A\@ifstar{\@@magyar at az@ref\@firstoftwo}{\@@magyar at az@lowa}}\fi
+\ifnum\magyar at opt@@az \expandafter\ifx\csname apageref\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\apageref{a\@ifstar{\@@magyar at az@ref\@secondoftwo}{\@@magyar at az@lowd}}\fi
+\ifnum\magyar at opt@@az \expandafter\ifx\csname Apageref\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\Apageref{A\@ifstar{\@@magyar at az@ref\@secondoftwo}{\@@magyar at az@lowd}}\fi
+\ifnum\magyar at opt@@az \expandafter\ifx\csname acite\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\acite{a\@ifstar{\@@magyar at acite@lowd}{\@@magyar at acite@lowb}}\fi
+\ifnum\magyar at opt@@az \expandafter\ifx\csname Acite\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\Acite{A\@ifstar{\@@magyar at acite@lowd}{\@@magyar at acite@lowb}}\fi
+
+\@gobble
+{^}
+
+% --- hunnewlabel=
+
+\if0\magyar at opt@@hunnewlabel
+  \let\hunnewlabel\@gobbletwo
+  % ^^^ with this the user would be able to switch from hunnewlabel=yes
+  %     to hunnewlabel=no without removing the .aux file. But now I have a
+  %     better solution to that. (??) !!
+  \@@magyar at skiplong\fi
+
+% [pts] Done properly by pts at fazekas.hu at Mon Mar  2 21:53:30 CET 2009
+%
+% \label will be redefined to write another line to .aux file:
+% \hunnewlabel{...}{...}: similar to \newlabel{sectionStructNr}{pageNr},
+% where the roman numerals are replaced by their arabic representations, so
+% \aref and \apageref will work (`a II. r\xE9sz'). The name \hunnewlabel is a
+% legacy.
+%
+% We have to redefine \refstepcounter, which defines \@currentlabel, so we
+% can define \magyar@@currentlabel at arabic, wich is the same as \@currentlabel,
+% but it contains the number in arabic instead of roman. Without
+% \magyar@@currentlabel at arabic, \label would have no clue that a roman number
+% was involved. hyperref.sty also redefines \refstepcounter, but we are
+% agnostic to that: it doesn't matter if we are first.
+
+\let\magyar@@orig at refstepcounter\refstepcounter
+% \relax, or {currentlabel}{pagenumber}
+\let\magyar@@currentlabel at intact\relax
+% \relax, or {currentlabel-in-arabic}{pagenumber-in-arabic}
+\let\magyar@@currentlabel at arabic\relax
+
+\def\@@magyar at setup@romantoarabic{%
+  \let\romannumeral\number
+  \let\@Roman\@roman  % avoid uppercasing
+}
+
+\def\refstepcounter#1{%
+  \magyar@@orig at refstepcounter{#1}%
+  \begingroup
+    % Imp: wait till \shipout before expanding \thepage, in case of
+    % \pagenumbering{roman}.
+    % \c at page might be wrong (it's correcy at \shipout only), se we fake it.
+    \c at page\@m
+    \edef\reserved at b{{\thepage}}%
+    \let\reserved at a\@currentlabel
+    % Wrap \reserved at a in {...}, and then append \reserved at b to \reserved at a.
+    \expandafter\expandafter\expandafter\def
+      \expandafter\expandafter\expandafter\reserved at a%
+      \expandafter\expandafter\expandafter{%
+      \expandafter\expandafter\expandafter{%
+      \expandafter\reserved at a\expandafter}\reserved at b}%
+    \expandafter\def\expandafter\reserved at b\expandafter{%
+      \expandafter\def\expandafter\magyar@@currentlabel at intact\expandafter{%
+	\reserved at a}}%
+  \expandafter\endgroup\reserved at b
+  \begingroup
+    \c at page\@m
+    \@@magyar at setup@romantoarabic
+    % This \protected at edef is from the \refstepcounter code.
+    \protected at edef\reserved at a{%
+      {\csname p@#1\endcsname\csname the#1\endcsname}{\thepage}}%
+    \let\reserved at b\@empty
+    \ifx\reserved at a\@currentlabel\else
+      \expandafter\def\expandafter\reserved at b\expandafter{%
+        \expandafter\def\expandafter\magyar@@currentlabel at arabic\expandafter{%
+	  \reserved at a}}%
+    \fi
+  \expandafter\endgroup\reserved at b
+}
+
+%** Make its expansion short so \ifx would be fast down in noextras...
+\def\@@magyar at labela{\@@magyar at labelb}%
+\def\@@magyar at labelb#1{%
+  \@@magyar at orig@label{#1}% output \newlabel to \@auxout
+  \begingroup
+    \c at page\@m
+    \edef\reserved at b{{\thepage}}%
+    \let\reserved at a\@currentlabel
+    % Wrap \reserved at a in {...}, and then append \reserved at b to \reserved at a.
+    \expandafter\expandafter\expandafter\def
+      \expandafter\expandafter\expandafter\reserved at a%
+      \expandafter\expandafter\expandafter{%
+      \expandafter\expandafter\expandafter{%
+      \expandafter\reserved at a\expandafter}\reserved at b}%
+    \ifx\reserved at a\magyar@@currentlabel at intact
+      % \@currentlabel created by our overridden \refstepcounter.
+      \ifx\magyar@@currentlabel at arabic\magyar@@currentlabel at intact\else
+	\expandafter\@@magyar at labelc\magyar@@currentlabel at arabic{#1}%
+      \fi
+    \else
+      % \@currentlabel from unknown origin.
+      % Emit \hunnewlabel if \thepage is roman.
+      \@@magyar at setup@romantoarabic
+      \edef\reserved at c{{\thepage}}%
+      \ifx\reserved at b\reserved at c\else % \thepage is roman
+        \@@magyar at labelc\@currentlabel{}{#1}%
+      \fi
+    \fi
+  \endgroup
+}
+% @param #1 \@currentlabel (maybe expanded) as roman converted to arabic
+% @param #2 any page number in any format; ignored
+% @param #3 name of the label
+\def\@@magyar at labelc#1#2#3{%
+  % We have \noexpand\number below to prevent the \edef in \protected at write
+  % from expanding the page number. It will be expanded at \shipout.
+  \protected at write\@auxout{}{%
+    \string\hunnewlabel{#3}{{#1}{\noexpand\number\c at page}}}%
+}
+
+\expandafter\addto\csname extras\CurrentOption\endcsname{%
+  %%\message{--EXTRAS--}\show\label
+  \ifx\label\@@magyar at labela\else
+    \let\@@magyar at orig@label\label
+    \let\label\@@magyar at labela
+  \fi
+}
+\expandafter\addto\csname noextras\CurrentOption\endcsname{%
+  %%\message{--NO--}%
+  \ifx\label\@@magyar at labela
+    % The trick here is not to restore the ``original'' label command if
+    % somebody has changed it since the previous save in \extrasmagyar. This
+    % adds compatibility with hyperref.sty, because it loads nameref.sty which
+    % changes \label after babel.sty and magyar.ldf has been loaded.
+    % 1. \usepackage[magyar]{babel}% \AtBeginDocument{\select at language{magyar}}
+    % 2. \usepackage{hyperref}% \AtBeginDocument{\RequirePackage{nameref}}
+    % 3. \begin{document}:
+    % 4. \input \jobname.aux
+    % 5. \AtBeginDocument hooks:
+    % 6. \select at language{magyar}
+    % 7. \extrasmagyar
+    % 8. \let\@@magyar at orig@label\label
+    % 9. \RequirePackage{nameref}:
+    % 10. \def\label#1{...}
+    \if1\magyar at opt@@hunnewlabel % only hunnewlabel=only-hu
+      \let\label\@@magyar at orig@label
+    \fi
+  \fi
+  % \let\@@magyar at orig@label\relax % Dat: commenting out this makes it possible to load magyar.ldf twice
+}
+\def\hunnewlabel#1#2{%
+  \def\reserved at a{#2}%
+  \expandafter\ifx\csname r@#1\endcsname\reserved at a% hun and normal labels are the same
+    \relax% \message{No need for def: #1}%
+  \else
+    \global\expandafter\let\csname @@magyar at r@#1\endcsname\reserved at a%
+  \fi
+}
+
+\@gobble
+{^}
+
+% --- captions=
+
+\if0\magyar at opt@@captions\@@magyar at skiplong\fi
+\@namedef{captions\CurrentOption}{%
+  % Dat: inputenc isn't known, so we just use the safe \'a for accented letters 
+  \def\prefacename{El\H osz\'o}%
+  \def\refname{Hivatkoz\'asok}%
+  \def\abstractname{Kivonat}%
+  \def\bibname{Irodalomjegyz\'ek}%
+  \def\appendixname{f\"uggel\'ek}% BUGFIX at Sun Feb 29 22:02:51 CET 2004
+  \def\contentsname{Tartalomjegyz\'ek}%
+  \def\listfigurename{\'Abr\'ak jegyz\'eke}%
+  \def\listtablename{T\'abl\'azatok jegyz\'eke}%
+  \def\indexname{T\'argymutat\'o}%
+  \def\enclname{Mell\'eklet}%
+  \def\ccname{K\"orlev\'el--c\'\i mzettek}% ??
+  \def\headtoname{C\'\i mzett}%
+  \def\proofname{Bizony\'\i t\'as}% AMS-\LaTeX
+  \def\glossaryname{Sz\'ojegyz\'ek}% glossz\xE1rium, (magyar\xE1zatos) sz\xF3jegyz\xE9k
+  % vvv All these are start with a small letter
+  \def\figurename{\'abra}%
+  \def\chaptername{fejezet}%
+  \def\tablename{t\'abl\'azat}%
+  \def\notesname{Jegyzetek}% endnotes.sty
+  \def\partname{r\'esz}%
+  \def\pagename{oldal}%
+  \def\seename{l\'asd}%
+  \def\alsoname{l\'asd m\'eg}%
+}
+\@gobble
+{^}
+
+% --- Changing the order of the table numbers; tablecaptions=
+
+\if0\magyar at opt@@tablecaptions\@@magyar at skiplong\fi
+  % Wee need `1. t\xE1bl\xE1zat' instead of `Table 1'
+  \if1\magyar at opt@@tablecaptions
+        \def\@@magyar at fnum@table{\thetable.~\tablename}%
+  \else \def\@@magyar at fnum@table{\tablename\nobreakspace\thetable}\fi
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \babel at save\fnum at table\let\fnum at table\@@magyar at fnum@table}
+  \@gobble
+{^}
+
+% --- Changing the order of the figure numbers; figurecaptions=
+
+\if0\magyar at opt@@figurecaptions\@@magyar at skiplong\fi
+  \if1\magyar at opt@@figurecaptions
+        \def\@@magyar at fnum@figure{\thefigure.~\figurename}%
+  \else \def\@@magyar at fnum@figure{\figurename\nobreakspace\thefigure}\fi
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \babel at save\fnum at figure\let\fnum at figure\@@magyar at fnum@figure}
+  \@gobble
+{^}
+
+% --- dottedtocline=
+
+\if0\magyar at opt@@dottedtocline\@@magyar at skiplong\fi
+  % Dat: It is quite safe to re-define \@dottedtocline, because it isn't
+  % redefined in standard packages of teTeX 1.
+  %** Overrides latex.ltx. Allows the page number extend beyond \@pnumwidth.
+  \def\@dottedtocline#1#2#3#4#5{%
+    \ifnum #1>\c at tocdepth \else
+      \vskip \z@ \@plus.2\p@
+      {\leftskip #2\relax \rightskip \@tocrmarg \parfillskip -\rightskip
+       \parindent #2\relax\@afterindenttrue
+       \interlinepenalty\@M
+       \leavevmode
+       \@tempdima #3\relax
+       \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
+       {#4}\nobreak
+       \leaders\hbox{\(\m at th
+          \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
+          mu\)}\hfill
+       \nobreak
+       \setbox\@tempboxa\hbox{\normalfont \normalcolor #5}% ****pts****
+       \ifdim\wd\@tempboxa<\@pnumwidth\setbox\@tempboxa\hb at xt@\@pnumwidth{\hfil\unhbox\@tempboxa}\fi
+       \box\@tempboxa
+       \par}%
+    \fi}
+  \@gobble
+{^}%
+
+% --- amslevelfix=
+
+% detect ams{ldoc,dtx,art,book,proc}.sty
+\ifnum1<0%
+  \magyar at opt@@amslevelfix
+  \expandafter\ifx\csname setTrue\endcsname\relax\else 1\fi
+  \expandafter\ifx\csname allowttyhyphens\endcsname\relax\else 1\fi
+\space\else\@@magyar at skiplong\fi
+  % Fix amsart.cls etc. so no Overfull \hbox occurs in the \listoffigures.
+  % Changes \@tocline{0}{3pt plus2pt}{0pt}{}{} to \@tocline{0}{3pt plus2pt}{0pt}{\parindent}{}
+  \def\magyar at amslevelfix#1#2#3#4#5#6#7\vfuzz{%
+    \def\reserved at a{#6}%
+    \ifx\@tocline#2\ifx\reserved at a\@empty%
+      \def#1{\@tocline{#3}{#4}{#5}{\parindent}{}}%
+    \fi\fi
+  }
+  \expandafter\magyar at amslevelfix\expandafter\l at table \l at table ,,,,,,,\vfuzz
+  \expandafter\magyar at amslevelfix\expandafter\l at figure\l at figure,,,,,,,\vfuzz
+  \@gobble
+{^}%
+
+% --- amsuppercasefix=
+
+% Fix for small \'\i in capitalized title (no fix needed for \'i and \xED):
+%   \documentlcass{amsart} % amsart.cls
+%   \usepackage{t1enc}
+%   \usepackage[latin2]{inputenc}
+%   \author{author Anal{\'\i}{\'i}zis}
+%   \title {title  Anal{\'\i}{\'i}zis}
+%   \begin{document} \maketitle a\newpage b\newpage c \end{document}
+% This bug is a general amsart.cls bug, not specific to magyar.ldf.
+\ifnum1<0%
+  \magyar at opt@@amsuppercasefix
+  \expandafter\ifx\csname altucnm\endcsname\relax\else 1\fi
+\space\else\@@magyar at skiplong\fi
+  % 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
+{^}%
+
+% --- babelmarkfix=
+
+% Fix the language name (\foreignlanguage{\languagename}}) appearing in
+% \@evenhead. Reason: both amsart.cls and babel.def 3.8 redefine \markboth.
+% (There is no problem in Babel 3.7.)
+%   This bug is a general Babel 3.8 + amsart.cls bug, not specific to
+% magyar.ldf.
+%
+% Dat: amsart.cls redefines \markboth defined in latex.ltx
+\ifnum0<0%
+  \magyar at opt@@babelmarkfix\relax
+\space\else\@@magyar at skiplong\fi
+  \begingroup
+  %\def\foreignlanguage{\fffffff} % Dat: not called here
+  % Dat: usually called: \mark{\the\@temptokena}
+  %\def\mark#1{\showthe\@temptokena{\toks@{B#1}\global\edef\@@magyar@@marktest{\the\toks@}}}
+  %\def\mark#1{\global\def\@@magyar@@marktest{#1}}
+  \def\mark#1{\global\edef\@@magyar@@marktest{#1}}
+  \let\if at nobreak\iffalse \@gobble\fi\@gobble\fi % Dat: \@gobble: make skippable
+  \def\@@magyar@@marktest at noexp{{\noexpand\@empty BA}{\noexpand\@empty BB}}
+  \expandafter\org at markboth\@@magyar@@marktest at noexp
+  % ^^^ Dat: since we call \org at markboth, the result doesn't depend on the Babel
+  %     version, i.e. how Babel redefines \markboth
+  % ^^^ Dat: call changes \@@magyar@@marktest
+  %     amsart.cls   -> {\noexpand \@empty BA}{\noexpand \@empty BB}
+  %     article.cls  -> {\@empty BA}{\@empty BB}
+  \ifx\@@magyar@@marktest\@@magyar@@marktest at noexp
+    % OK, now test for \markboth, as defined in Babel 3.8
+    \def\org at markboth#1#2{\global\def\@@magyar@@marktest{#1..#2}}%
+    \markboth{CA}{CB}%
+    % ^^^ Dat: call changes \@@magyar@@marktest
+    %     Babel 3.7 -> \foreignlanguage {magyar}{CA}..\foreignlanguage {magyar}{CB}
+    %     Babel 3.8 -> \noexpand \foreignlanguage {\languagename }{\noexpand \bbl at restore@actives CA}..\noexpand \foreignlanguage {\languagename }{\noexpand \bbl at restore@actives CB}
+    \def\reserved at a#1#2\hfuzz${#1}%
+    \expandafter\expandafter\expandafter\ifx
+      \expandafter\expandafter\expandafter\noexpand
+      \expandafter\reserved at a\@@magyar@@marktest\relax\hfuzz$%
+      % Dat: we reach this if \@@magyar@@marktest starts by \noexpand
+      % Dat: So now we have amsart.cls + \markboth of Babel 3.8.
+      %      The solution is to restore \markboth and \markright of Babel 3.7
+      %\let\reserved at a\@empty \zzzzzz
+      \def\reserved at a{%
+        \let\markright\org at markright
+        \bbl at redefine\markright##1{%
+          \toks@{##1}%
+          \edef\bbl at tempa{%
+            \noexpand\org at markright{%
+              \noexpand\foreignlanguage{\languagename}{\the\toks@}}}%
+          \bbl at tempa
+        }
+        \let\markboth\org at markboth
+        \bbl at redefine\markboth##1##2{%
+          \toks@{##1}\toks8{##2}%
+          \edef\bbl at tempa{%
+            \noexpand\org at markboth{%
+              \noexpand\foreignlanguage{\languagename}{\the\toks@}}{%
+              \noexpand\foreignlanguage{\languagename}{\the\toks8}}}%
+          \bbl at tempa
+        }%
+      }%
+    \else \let\reserved at a\@empty
+    \fi
+  \else \let\reserved at a\empty
+  \fi
+  %\show\reserved at a \let\reserved at a\@empty
+  \global\let\@@magyar@@marktest\@undefined
+  \global\let\@@magyar@@marktest at noexp\@undefined
+  \expandafter\endgroup\reserved at a
+  \@gobble
+{^}%
+
+% --- showfix=
+%
+% Fix stupid \def\show{...} in AtBeginDocument in ucsencs.def by restoring the original
+% definition.
+
+\ifnum0<0%
+  \magyar at opt@@showfix\relax
+\space\else\@@magyar at skiplong\fi
+  \def\magyar at stripcolon#1:#2\vfuzz{#2}%
+  \def\magyar at show@begin at fix{%
+    \edef\reserved at a{\expandafter\magyar at stripcolon\meaning\show:\vfuzz}%
+    \ifx\reserved at a\@empty\else % \show is a macro
+      \let\show\@@magyar at orig@show
+    \fi
+  }
+  \edef\reserved at a{\expandafter\magyar at stripcolon\meaning\show:\vfuzz}%
+  \ifx\reserved at a\@empty % \show is not a macro
+    \let\@@magyar at orig@show\show
+    \expandafter\gdef\expandafter\@preamblecmds\expandafter{%
+      \expandafter\magyar at show@begin at fix\@preamblecmds}%
+    %\show\@begindocumenthook
+    %\AtBeginDocument{\magyar at show@begin at fix}%
+  \fi
+  \@gobble
+{^}%
+
+% --- captionfix=
+%
+% Fix ``1. \xE1bra'' order in \caption defined by caption.sty 2004/07/16 v3.0c.
+%
+% The manual fix would be:
+%
+%  \DeclareCaptionLabelFormat{simpleMagyar}{#2.\bothIfSecond{\nobreakspace}{#1}}
+%  \let\caption at lfmt\caption at lfmt@simpleMagyar
+%
+
+\if0\magyar at opt@@captionfix\@@magyar at skiplong\fi
+  \def\@@magyar at captionfix{\@ifundefined{caption at lfmt}{}{%
+    % Dat: only in preamble:  \DeclareCaptionLabelFormat{simpleMagyar}{#2.\bothIfSecond{\nobreakspace}{#1}}
+    \def\caption at lfmt@simpleMagyar##1##2{##2.\bothIfSecond{\nobreakspace}{##1}}%
+  }}
+  \AtBeginDocument{\@@magyar at captionfix}
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \ifx\caption at lfmt\caption at lfmt@default % Imp: not if both undefined
+      \ifx\caption at lfmt@simpleMagyar\@undefined\else
+	\babel at save\caption at lfmt
+	\let\caption at lfmt\caption at lfmt@simpleMagyar
+      \fi
+    \fi}
+  \@gobble
+{^}%
+
+
+% --- shortrefcmds=
+
+\if0\magyar at opt@@shortrefcmds\@@magyar at skiplong\fi
+  \def\azr{\aref}% better than \let, because it won't keep old value
+  \def\Azr{\Aref}
+  \def\azp{\apageref}
+  \def\Azp{\Apageref}
+  \def\azc{\acite}
+  \def\Azc{\Acite}
+  \@gobble
+{^}%
+
+% --- longcaption=
+
+\ifx\magyar at caption@centering\@empty\@@magyar at skiplong\fi
+  \def\magyar at caption@hsizecheck{\hsize}
+  % We don't emit the two dots of `1. t\xE1bl\xE1zat.' here, because
+  % has already been emitted by \fnum at table etc.
+  % We apply some formatting depending on the longcaption= option.
+  % Dat: Gyurgy\xE1k, p95. says: `11. \xE1bra. Hajt\xE1si v\xE1ltozatok.'
+  \let\@@magyar at do@makecaption\relax% before .toc
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \@@magyar at do@makecaption}
+  \def\@@magyar at do@makecaption at captiontwo@yes{%
+    % Dat: caption2.sty or caption3.sty is loaded; do nothing.
+  }
+  \def\@@magyar at do@makecaption at captiontwo@no{%
+    %** @param #1 \fnum at table or \fnum at figure
+    \def\@makecaption##1##2{%
+      \vskip\abovecaptionskip
+      \sbox\@tempboxa{##1.\ ##2}% Dat: `: ' changed to `. ' to match Hungarian typography
+      \ifdim \wd\@tempboxa>\magyar at caption@hsizecheck\relax
+        {\magyar at caption@centering ##1.\magyar at caption@newline ##2\csname par\endcsname}%
+      \else
+        \global \@minipagefalse
+        \hb at xt@\hsize{\hfil\box\@tempboxa\hfil}%
+      \fi
+      \vskip\belowcaptionskip}}
+  \AtBeginDocument{%
+    \expandafter\ifx\csname captionlabeldelim\endcsname\relax
+      \expandafter\ifx\csname caption at lsep@period\endcsname\relax
+        \let\@@magyar at do@makecaption\@@magyar at do@makecaption at captiontwo@no
+      \else
+        % Dat: caption3.sty is loaded, and it has caption at lsep defined
+        % Dat: \show\caption at lsep@colon  % \long\def\caption at lsep@colon{: }
+        % Dat: \show\caption at lsep %\def\caption at lsep{\caption at lsep@colon}
+        \ifx\caption at lsep\caption at lsep@default
+          % There was no \captionsetup{labelsep=...} yet, so we set the
+          % default to period (dot).
+          %
+          % This sets \caption at lsep@default and \caption at lsep.
+          \caption at setdefaultlabelsep{period}%
+        \fi
+        \let\@@magyar at do@makecaption\@@magyar at do@makecaption at captiontwo@yes
+      \fi
+    \else
+      % Dat: caption2.sty is loaded (and has \def\captionlabeldelim{.} -- but it might have {:})
+      % Dat: we now redefine {:} to {.}
+      % Dat: the user can force {:} by \def\captionlabeldelim{:\empty}
+      % Dat: this works now: \usepackage[german,french,magyar]{babel} \usepackage{caption2} \begin{document} \renewcommand*\captionfont{\itshape} \renewcommand*\captionlabelfont{\scshape}
+      \def\reserved at a{:}%
+      \ifx\reserved at a\captionlabeldelim \def\captionlabeldelim{.}\fi
+      \let\@@magyar at do@makecaption\@@magyar at do@makecaption at captiontwo@yes
+    \fi}
+  \@gobble
+{^}%
+
+% --- labelenums=
+
+\if0\magyar at opt@@labelenums \@@magyar at skiplong\fi
+  \providecommand\@greekalph[1]{%
+    % We use the robust \ensuremath here, similarly to \def\@fnsymbol in
+    % latex.ltx.
+    \ensuremath{\ifcase#1\or\alpha\or\beta\or\gamma\or\delta%
+    \or\varepsilon\or\zeta\or\eta\or\vartheta\or\iota\or\kappa%
+    \or\lambda\or\mu\or\nu\or\xi\or\varphi\or\varpi\or\varrho%
+    \or\varsigma\or\tau\or\upsilon\or\chi\or\psi\or\omega%
+    \else\@ctrerr\fi}}
+  \expandafter\ifx\csname c at enumv\endcsname\relax
+    \@definecounter{enumv}% call this before \def\theenumv
+  \fi
+  \if3\magyar at opt@@labelenums
+    \def\theenumi  {\@arabic   \c at enumi}  \def\labelenumi  {\theenumi.}
+    \def\theenumii {\@alph     \c at enumii} \def\labelenumii {\itshape\theenumii)}
+    \def\theenumiii{\@greekalph\c at enumiii}\def\labelenumiii{\itshape\theenumiii)}
+    \def\theenumiv {\@Alph     \c at enumiv} \def\labelenumiv {\itshape\theenumiv)}
+    \def\theenumv  {\@Roman    \c at enumv}  \def\labelenumc  {\theenumv.} % Dat: I'm not sure
+  \else
+    \def\theenumi{\@Roman\c at enumi}       \def\labelenumi{\theenumi.}
+    \def\theenumii{\@arabic\c at enumii}    \def\labelenumii{\theenumii.}
+    % !! correct \ref style for \the
+    \if1\magyar at opt@@labelenums % hu-a
+      \def\theenumiii{\@alph\c at enumiii}    \def\labelenumiii{\itshape\theenumiii)}
+      \def\theenumiv{\@greekalph\c at enumiv} \def\labelenumiv{\itshape\theenumiv)}
+      \def\theenumv{\@Alph\c at enumv}        \def\labelenumv {\itshape\theenumv)}
+    \else% hu-A
+      \def\theenumiii{\@Alph\c at enumiii}    \def\labelenumiii{\itshape\theenumiii)}
+      \def\theenumiv{\@alph\c at enumiv}      \def\labelenumiv{\itshape\theenumiv)}
+      \def\theenumv{\@greekalph\c at enumv}   \def\labelenumv {\itshape\theenumv)}
+    \fi
+  \fi
+  \def\reserved at a{% copied from latex.ltx
+    \ifnum \@enumdepth >\thr@@\@toodeep\else
+      \advance\@enumdepth\@ne
+      \edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+	\expandafter\list
+	  \csname label\@enumctr\endcsname
+	  {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}%
+    \fi}
+  \ifx\reserved at a\enumerate
+    \def\enumerate{% no \@enumdepth>3
+      \advance\@enumdepth\@ne
+      \expandafter\ifx\csname labelenum\romannumeral\the\@enumdepth\endcsname\relax
+        \@toodeep\advance\@enumdepth\m at ne\else
+	\edef\@enumctr{enum\romannumeral\the\@enumdepth}%
+	  \expandafter\list
+	    \csname label\@enumctr\endcsname
+	    {\usecounter\@enumctr\def\makelabel##1{\hss\llap{##1}}}%
+      \fi}
+  \fi
+  \@gobble
+{^}%
+
+% --- labelitems=
+
+\if0\magyar at opt@@labelitems \@@magyar at skiplong\fi
+  \def\labelitemi{\textendash}
+  % vvv Dat: formerly 2.5pt
+  \def\labelitemii {\raise0.58ex\hbox{\scriptsize\textbullet}}
+  \def\labelitemiii{\raise0.58ex\hbox{\(\scriptstyle\circ\)}}
+  \def\labelitemiv {\raise0.58ex\hbox{\scriptsize\textasteriskcentered}}
+  \def\labelitemv  {\raise0.58ex\hbox{\scriptsize\textperiodcentered}}
+  \def\reserved at a{% copied from latex.ltx
+    \ifnum \@itemdepth >\thr@@\@toodeep\else
+      \advance\@itemdepth\@ne
+      \edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+      \expandafter\list
+	\csname\@itemitem\endcsname
+	{\def\makelabel##1{\hss\llap{##1}}}%
+    \fi}
+  \ifx\reserved at a\itemize
+    \def\itemize{% no \@itemdepth>3
+      \advance\@itemdepth\@ne
+      \expandafter\ifx\csname labelitem\romannumeral\the\@itemdepth\endcsname\relax
+        \@toodeep\advance\@enumdepth\m at ne\else
+	\edef\@itemitem{labelitem\romannumeral\the\@itemdepth}%
+	\expandafter\list
+	  \csname\@itemitem\endcsname
+	  {\def\makelabel##1{\hss\llap{##1}}}%
+      \fi}
+  \fi
+  \@gobble
+{^}%
+
+% --- postpara= and postsubpara= and postdescription=
+
+\expandafter\ifx\csname magyar at opt@@paragraphs\endcsname\relax\@@magyar at skiplong\fi
+  % Dat: We make sure that hspaces emitted by \magyar at post@... are unstretchable
+  \def\magyar at post@dot{.\enskip}%
+  \def\magyar at post@bfdot{\textbf.\enskip}%
+  \let\magyar at post@quad\quad% not recommended in Hungarian
+  \let\magyar at post@enskip\enskip% not recommended in Hungarian
+  \def\magyar at post@em{\hskip1em\relax}%
+  \let\magyar at post@empty\@empty
+  %** from Gyurgy\'ak J\'anos: Szerkeszt\H{o}k \'es szerz\H{o}k k\'ezik\"onyve.
+  %** We don't have a square-shaped, black diamond in our math fonts :-(.
+  \def\magyar at post@diamond{%
+    \enskip\raise.5ex\hbox{\font\f=msam10 at1.3ex \f\char7}\enskip%\ignorespaces% raised \blacklozenge
+    %{\usefont{U}{msa}{m}{n}\small\char7}
+  }
+  \def\magyar at post@star{\enskip\({}^*\)\enskip}%
+  \def\magyar at post@endash{ -- }%
+  \def\magyar at post@semicolon{:\enskip}%
+  \def\magyar at first#1#2\vfuzz{\noexpand#1}%
+  %** Calls \magyar at pf@lowb, and never emits code resulting from #3 to TOC
+  %** @param #1 empty or `*'
+  %** @param #2 \@startsection{...}{...}... call
+  %** @param #3 \paragraph or \subparagraph (selects one of \magyar at post@...)
+  %** @param #4 paragraph title text
+  \def\magyar at pf@lowa#1#2#3#4{%
+    \if#1*\relax
+      \bbl at afterelse\magyar at pf@lowb*%
+    \else
+      \bbl at afterfi  \magyar at pf@lowb{[#4]}%
+    \fi
+    {#2}{#3}{#4}%
+  }%
+  % !! a less obscure way for \paragraph, without -1sp etc.
+  %** Calls \magyar at pf@lowb, and never emits code resulting from #3 to TOC
+  %** @param #1 \@startsection{...}{...}... call
+  %** @param #2 \paragraph or \subparagraph (selects one of \magyar at post@...)
+  %** @param #3 paragraph title text
+  %** @param #4 [...] arg to \paragraph
+  \def\magyar at pf@lowc#1#2#3[#4]{%
+    \magyar at pf@lowb{[#4]}{#1}{#2}{#3}%
+  }%
+  %** Calls \magyar at post@paragraph and \magyar at post@subparagraph
+  %** @param #1 [#4] or `*' (what goes to TOC?)
+  %** @param #2 \@startsection{...}{...}... call
+  %** @param #3 \paragraph or \subparagraph
+  %** @param #4 paragraph title text
+  \def\magyar at pf@lowb#1#2#3#4{%
+    #2#1{#4\csname magyar at post@\expandafter\@gobble\string#3\endcsname\kern\z@}%
+    % ^^^ Dat: \kern\z@ is needed so \unskip won't occur at \paragraph*
+    % ^^^ Dat: {#4\csname...} is needed so \magyar at post@dot makes a {\bf.}
+    % Dat: \ignorespaces is superflous here, it also doesn't ignore \par
+  }%
+  %** Fixes (redefines) the specified macro so postpara= and postsubpara=
+  %** takes effect. It is useful to call this after a `\renewcommand\paragraph'
+  %** in a package. Has no effect if the definition of #1 doesn't look like
+  %** the one in article.cls (i.e. \@startsection) or if it's not defined
+  %** (such as in beamer.cls).
+  %** @param #1 \paragraph or \subparagraph
+  \def\magyar at paragraphfix#1{%
+    \ifx#1\@undefined\else
+      % Change only if defined.
+      \expandafter\magyar at paragraphfix@defined\expandafter#1\fi
+  }
+  \def\magyar at paragraphfix@defined#1{%
+    \expandafter\magyar at pf@lowd\expandafter#1#1\hfuzz........\vfuzz
+  }
+  \def\magyar at pf@lowd#1#2#3#4#5#6#7#8#9\vfuzz{%
+    % Dat: \unskip doesn't work, have to change \hskip to -1sp: 1sp is the
+    %      amount of horizontal space between the diamond and the paragraph text
+    %      0sp would be bad, because it isn't negative (positive skips are
+    %      interpreted as vertical).
+    %%
+    \expandafter\def\expandafter\reserved at a\expandafter{\magyar at first#9\vfuzz}%
+    %\def\reserved at a{#9}\ifx\reserved at a\@empty
+    \if\reserved at a\hfuzz\ifx#2\@startsection\if-\magyar at first#7\vfuzz
+      \def#1{\@ifstar
+        {\magyar at pf@lowa *{#2{#3}{#4}{#5}{#6}{-1sp}{#8}}#1}%
+        {\@ifnextchar[%]
+          {\magyar at pf@lowc{#2{#3}{#4}{#5}{#6}{-1sp}{#8}}#1}%
+          {\magyar at pf@lowa{}{#2{#3}{#4}{#5}{#6}{-1sp}{#8}}#1}%
+        }%
+      }%
+    \fi\fi\fi
+  }
+  % !! Imp: change Hungarian \paragraphs only, with dual load
+  \expandafter\ifx\csname magyar at opt@@postpara\endcsname\relax\else
+    \magyar at paragraphfix\paragraph
+    \expandafter\let\expandafter\magyar at post@paragraph\csname magyar at post@\magyar at opt@@postpara\endcsname
+    \ifx\magyar at post@paragraph\relax
+      \@@magyar at error{Invalid arg for option: postpara = \magyar at opt@@postpara}%
+    \fi
+  \fi
+  \expandafter\ifx\csname magyar at opt@@postsubpara\endcsname\relax\else
+    \magyar at paragraphfix\subparagraph
+    \expandafter\let\expandafter\magyar at post@subparagraph\csname magyar at post@\magyar at opt@@postsubpara\endcsname
+    \ifx\magyar at post@subparagraph\relax
+      \@@magyar at error{Invalid arg for option: postsubpara = \magyar at opt@@postsubpara}%
+    \fi
+  \fi
+  \expandafter\ifx\csname magyar at opt@@postdescription\endcsname\relax\else
+    \expandafter\let\expandafter\magyar at post@description\csname magyar at post@\magyar at opt@@postdescription\endcsname
+    \ifx\magyar at post@description\relax
+      \@@magyar at error{Invalid arg for option: postdescription = \magyar at opt@@postdescription}%
+    \fi
+    \def\magyar@@descriptionfont{\normalfont\bfseries}%
+    \def\descriptionlabel#1{\hskip\labelsep{\magyar@@descriptionfont#1}\magyar at post@description\hskip-\labelsep}%
+  \fi
+  \@gobble
+{^}%
+
+% --- afterindent=
+
+\ifnum\magyar at opt@@afterindent>8 \@@magyar at skiplong\fi
+  \ifnum\magyar at opt@@afterindent<1 % force-no
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      \babel at save\@afterindenttrue
+      \let\@afterindenttrue\@afterindentfalse
+    }%
+  \else% force-yes
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      \babel at save\@afterindentfalse
+      \let\@afterindentfalse\@afterindenttrue
+    }%
+  \fi
+  \@gobble
+{^}
+
+% --- default \frenchspacing; frenchspacing=
+
+\if0\magyar at opt@@frenchspacing \@@magyar at skiplong\fi
+  \if1\magyar at opt@@frenchspacing% =no
+    \def\@@magyar at antifrenchspacing{% only does some caching
+      \ifnum\the\sfcode`\.=\@m
+	\nonfrenchspacing
+	\let\@@magyar at nonfrenchspacing\frenchspacing
+      \else
+	\let\@@magyar at nonfrenchspacing\relax
+      \fi}
+    \let\@@magyar at nonantifrenchspacing\frenchspacing
+    \expandafter\addto\csname   extras\CurrentOption\endcsname{\@@magyar at antifrenchspacing}
+    \expandafter\addto\csname noextras\CurrentOption\endcsname{\@@magyar at nonantifrenchspacing}
+  \else
+    \expandafter\addto\csname   extras\CurrentOption\endcsname{\bbl at frenchspacing}
+    \expandafter\addto\csname noextras\CurrentOption\endcsname{\bbl at nonfrenchspacing}
+  \fi
+  \@gobble
+{^}
+
+
+% --- Putting dots after section number in toc/lof/lot; sectiondot=
+%
+% This is to have a dot after figure/table numbers in lof/lot and
+% section numbers in toc.
+%
+% The option sectiondot= is ill-named, because it doesn't apply to what is
+% displayed in \section, but it applies to \tableofcontents, \listoftables
+% and \listoffigures.
+
+\if0\magyar at opt@@sectiondot \@@magyar at skiplong\fi
+  \ifnum\magyar at opt@@sectiondot>1
+    % This solution (for sectiondot=problematic) is what was provided by
+    % magyar.ldf v1.4. It is incomatible with lots of packages.
+    %
+    % [pts] This doesn't work with nameref.sty.
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      \babel at save\@caption
+      \long\def\@caption#1[#2]#3{%
+	\csname par\endcsname
+	\addcontentsline{\csname ext@#1\endcsname}{#1}%
+	  {\protect\numberline{\csname the#1\endcsname.}{\ignorespaces #2}}%
+	\begingroup
+	  \@parboxrestore
+	  \if at minipage
+	    \@setminipage
+	  \fi
+	  \normalsize
+	  \@makecaption{\csname fnum@#1\endcsname}%
+	      {\ignorespaces #3}\csname par\endcsname
+	\endgroup}}
+
+    % [pts] This is incompatible with some packages.
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      % Alas, \@sect must also be redefined to have that dot in toc too.
+      % On the other hand, we include a dot after a run-in head.
+      \babel at save\@sect
+      \def\@sect#1#2#3#4#5#6[#7]#8{%
+	\ifnum #2>\c at secnumdepth
+	  \let\@svsec\@empty
+	\else
+	  \refstepcounter{#1}%
+	  \protected at edef\@svsec{\@seccntformat{#1}\relax}%
+	\fi
+	\@tempskipa #5\relax
+	\ifdim \@tempskipa>\z@
+	  \begingroup
+	    #6{%
+	      \@hangfrom{\hskip #3\relax\@svsec}%
+		\interlinepenalty \@M #8\@@par}%
+	  \endgroup
+	  \csname #1mark\endcsname{#7}%
+	  \addcontentsline{toc}{#1}{%
+	    \ifnum #2>\c at secnumdepth \else
+	      \protect\numberline{\csname the#1\endcsname.}%
+	    \fi
+	    #7}%
+	\else
+	  \def\@svsechd{%
+	    #6{\hskip #3\relax
+	    \@svsec #8.}%
+	    \csname #1mark\endcsname{#7}%
+	    \addcontentsline{toc}{#1}{%
+	      \ifnum #2>\c at secnumdepth \else
+		\protect\numberline{\csname the#1\endcsname.}%
+	      \fi
+	      #7}}%
+	\fi
+	\@xsect{#5}}}
+
+    % [pts] This is incompatible with some packages.
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      % In order to have that dot after a run-in head when the star form of the
+      % sectioning commands is used, we have to redefine \@ssect
+      \babel at save\@ssect
+      \def\@ssect#1#2#3#4#5{%
+	\@tempskipa #3\relax
+	\ifdim \@tempskipa>\z@
+	  \begingroup
+	    #4{%
+	      \@hangfrom{\hskip #1}%
+		\interlinepenalty \@M #5\@@par}%
+	  \endgroup
+	\else
+	  \def\@svsechd{#4{\hskip #1\relax #5.}}%
+	\fi
+	\@xsect{#3}}}
+  \else
+    % This implements option sectiondot=safe.
+    %
+    % [pts] We definitely want \numberline to emit table number in \listoftables as
+    % `5.6.' instead of the default `5.6', but we don't want to redefine \@caption,
+    % because the # args \addcontentsline adds to \contentsline depends on whether
+    % nameref.sty (hyperref.sty) is loaded (no nameref: 3, w/ nameref: 4); this 
+    % would cause the strange `Package hyperref Warning: No destination for
+    % bookmark of \addcontentsline'.
+    %   So we rather redefine \numberline. But we cannot simply add a dot, because
+    % it might be already present (e.g in \tableofcontents). So we add a dot only
+    % if it is missing. This modification affects \tableofcontents, \listoffigures
+    % and \listoftables. The presence of the dot in TOC depends on the language
+    % the section was defined in.
+    %   amsart.sty uses \tocsection instead of \numberline, see amstocnumskip=
+    % below
+    \def\magyar at striplastdot@lowa#1.\relax{#1\relax}%
+    \def\magyar at striplastdot@lowb#1\relax#2\relax{#1}%
+    %** \@tempdima is set by \@dottedtocline, called by \l at section
+    \def\magyar at numberline#1\vfuzz{\hb at xt@\@tempdima{#1.\hfil}}%
+    \def\@@magyar at numberline@pre#1{%
+      \expandafter\expandafter\expandafter\magyar at numberline
+      \expandafter\magyar at striplastdot@lowb\magyar at striplastdot@lowa#1\relax.\relax\vfuzz
+    }%
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      \babel at save\numberline
+      %** Overrides latex.ltx
+      \let\numberline\@@magyar at numberline@pre
+    }
+  \fi
+  \@gobble
+{^}
+
+% --- amspostsectiondot=
+
+\if0\magyar at opt@@amspostsectiondot \@@magyar at skiplong\fi
+  % Now fix ams*.cls so that they don't put a dot after the section title.
+  % First check whether the definition of \@sect contains
+  % \global\@nobreaktrue\@xsect
+  \long\def\@@magyar at amssect@fixa#1\global\@nobreaktrue\@xsect#2\hfuzz#3{%
+    \ifx\hfuzz#2\hfuzz\else% found
+      \@@magyar at amssect@fixb#3\fi}
+  %** @param #1 a \cs, e.g \@sect
+  \def\@@magyar at amssect@fixb#1{%
+    \expandafter\let\csname @@magyar at amssect@saved\string#1\endcsname#1%
+    \edef#1{\noexpand\expandafter\noexpand\@@magyar at amssect@low
+       \expandafter\noexpand\csname @@magyar at amssect@saved\string#1\endcsname}%
+    \let\@svsechd\@empty% prevent Undefied \cs
+    %** Definition of \@sect in ams*.cs ends by `\global\@nobreaktrue{#5}'
+    \long\def\@@magyar at amssect@low##1\global\@nobreaktrue{%
+      ##1%
+      \expandafter\def\expandafter\@svsechd\expandafter{%
+	\expandafter\let\expandafter\@addpunct\expandafter\@gobble \@svsechd}%
+      \global\@nobreaktrue
+    }%
+  }
+  \expandafter\@@magyar at amssect@fixa\@sect[][][][][][][][]\global\@nobreaktrue\@xsect\hfuzz\@sect
+  \expandafter\@@magyar at amssect@fixa\@sect[][][][][][][][]\global\@nobreaktrue\@xsect\hfuzz\NR at sect% with nameref.sty
+  \@gobble
+{^}%
+
+% --- amstocnumskip=, amstocnumlang=
+%
+% Change \tocsection, \tocsubsection etc. in amsart.cls etc. These commands
+% have effect in \tableofcontents, e.g. in the .toc file:
+% `\contentsline {section}{\tocsubsection {}{1.1}{Foo}}{1}'
+%
+% We should be careful not to define \tocchapter and \tocsection if
+% tocbibind.sty is (or will be) loaded, because it provides its own definition
+% as \newcommand.
+
+\ifx\@empty\magyar at opt@@amstocnumskip \@@magyar at skiplong\fi
+  % Similar to titleskip=, but AMS classes don't look at \@seccntformat
+  \def\@@magyar at amstocnumskip@lets{%
+    \ifx\tocsubsection\@undefined\else
+      \ifx\tocsubsection\tocparagraph
+	\def\tocsubsection{\tocsection}%
+	% These lines are similar to those in amsart.cls.
+	\let\tocsubsubsection\tocsubsection
+	\let\tocparagraph\tocsubsection
+	\let\tocsubparagraph\tocsubsection
+	\let\tocpart\tocsubsection
+	\let\tocchapter\tocsubsection
+      \fi
+    \fi
+  }%
+  \def\@@magyar at amstocnumskip@defs{%
+    \ifx\tocsubsection\@undefined\else
+      \ifx\tocsubsection\tocparagraph
+	%** Overrides amsart.cls, amsbook.cls etc.
+	%** Only for Hungarian \section{}s. Changes \quad to
+	%** \magyar at 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{%
+	    \def\reserved at a{##1}%
+	    \def\reserved at b{##2}%
+	    \ifx\reserved at b\empty
+	    \else\ifx\reserved at a\chaptername
+	      % * Sometimes (but not in \tableofcontents) #1 is
+	      %   `\csname chaptername\endcsname'. Why?
+	      % * \tocappendix is called instead of \tocsection for the
+	      %   appendix.
+              \ifnum\magyar at opt@@chapternumber=1      \@huordinal{##2}~%
+              \else\ifnum\magyar at opt@@chapternumber=2 \@Huordinal{##2}~%
+              \else##2.~%
+              \fi\fi
+              ##1.\magyar at opt@@amstocnumskip
+	    \else\ifx\reserved at a\partname
+              \ifnum\magyar at opt@@partnumber=1      \@huordinal{##2}~%
+              \else\ifnum\magyar at opt@@partnumber=2 \@Huordinal{##2}~%
+              \else##2.~%
+              \fi\fi
+              ##1.\magyar at opt@@amstocnumskip
+            \else
+              \ignorespaces##1 ##2.\magyar at opt@@amstocnumskip
+	    \fi\fi\fi}%
+	  ##3}%
+	%** Overrides amsart.cls etc. Only for Hungarian \section{}s. Changes \quad to
+	%** \magyar at opt@@amstocnumskip in the definition.
+	\def\tocappendix##1##2##3{%
+	  \indentlabel{%
+	    \def\reserved at a{##1}%
+	    \ifx\reserved at a\appendixname
+              ##2\ifx\@@magyar at appendixname\@empty.\fi~##1%
+	    \else
+	      ##1\@ifnotempty{##2}{ ##2}%
+	    \fi
+	    .\magyar at opt@@amstocnumskip}%
+	  ##3}%
+      \fi
+    \fi
+  }%
+  \AtBeginDocument\@@magyar at amstocnumskip@lets  % must be before @defs
+  \if2\magyar at opt@@amstocnumlang
+    \AtBeginDocument\@@magyar at amstocnumskip@defs
+    %\let\@@magyar at amstocnumskip@defs\@undefined% for use by the user
+  \else
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      \babel at save\tocsection \babel at save\tocappendix
+      \@@magyar at amstocnumskip@defs
+    }
+  \fi
+  \@gobble
+{^}%
+
+
+% --- Fixup Babel language selection glitches; toclang=
+
+% There are fundamental problem of emitting \select at language items in LOT
+% files.
+%
+% Problem (3): When using \begin{table}...\end{table} \selectlanguage{foo}
+% \begin{table}...\end{table}, the LaTeX-Babel scheme will not emit a
+% \select at language{foo} between the two \contentsline{}s in \jobname.lot. The
+% TOC file is OK, because section titles aren't floats. (But what about
+% \mark{}s?).
+%
+% Problem (1): \selectlanguage emits .aux entries even
+% if the language isn't really changed.
+%
+% Problem (2): babel.def has
+% `\AtBeginDocument...\selectlanguage...\bbl at main@language', from which an
+% \immediate is missing, so the \select at language is emitted to the .aux file
+% after the first float has been typeset. A better solution would be
+% `\select at language{\languagename}', which forcibly activates the default
+% language.
+%
+% Problem (4): \ps at headings isn't run \AtBeginDocument, but book.cls runs
+% \pagestyle{headings} when it is loaded. We should change this to
+% \AtBeginDocument or similar.
+
+\ifnum\magyar at opt@@toclang=0 \@@magyar at skiplong\fi
+  \ifnum\magyar at opt@@toclang>1  % toclang=good
+    % Solve problems (2) and (4). Timing is critical. \select at language must
+    % be called after \AtBeginDocument, so \catcode{}s won't be \activated
+    % too early. (Because some code in \AtBeginDocument might issue an
+    % \input such as hyperref.sty which does \RequirePackage{nameref}.)
+    % Note that \extrasmagyar containing the \catcode changes is
+    % only run when `magyar' is the default language (last arg of
+    % \usepackage[...]{babel}). If that is run after \AtBeginDocument hooks,
+    % then most packages will use 12 as \catcode\string``, which is intended.
+    %   \@@magyar at setup@psheadings might just be run \AtBeginDocument, it doesn't
+    % need \@preamblecmds -- but it must be after \select at language.
+    %
+    % \@preamblecmds is expanded after \@begindocumenthook
+    \expandafter\gdef\expandafter\@preamblecmds\expandafter{\@preamblecmds
+      \@@magyar at setup@psheadings% Solve problem (4). Before \selectlanguage.
+      \select at language{\languagename}% force initial language
+    }%
+    % Solve problem (1) and assist solving problem (2) by not emitting
+    % \select at language twice.
+    \def\bbl at set@language#1{%
+      \edef\@Lang at tmp{%
+	\ifcat\noexpand\noexpand\noexpand#1% a control sequence
+	  \expandafter\expandafter\expandafter\@gobble\expandafter\string
+	\fi
+	#1%
+      }%
+      \ifx\languagename\@Lang at tmp\else
+	\let\languagename\@Lang at tmp
+	\select at language{\languagename}%
+      \fi
+    }%
+    % Solve problem (3).
+    \long\def\addtocontents#1#2{%
+      % Dat: \noexpand should be avoided in \protected at write
+      \protected at write\@auxout
+	  {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble \let\select at language\relax}%
+	  {\string\@writefile{#1}{\string\select at language{\languagename} #2}}}
+  \else
+    % Solve problems (2) and (4).
+    \AtBeginDocument{%
+      \if at filesw \immediate\write\@mainaux{%
+        \string\select at language{\languagename}%
+        \string\@writefile{toc}{\string\select at language{\languagename}}%
+        \string\@writefile{lof}{\string\select at language{\languagename}}%
+        \string\@writefile{lot}{\string\select at language{\languagename}}%
+      }\fi
+      \@@magyar at setup@psheadings% Solve problem (4). Before \selectlanguage.
+      \select at language{\languagename}% force initial language
+    }
+    % Solve problem (1) and assist solving problem (2) by not emitting
+    % \select at language twice.
+    \def\bbl at set@language#1{%
+      \edef\@Lang at tmp{%
+	\ifcat\noexpand\noexpand\noexpand#1% a control sequence
+	  \expandafter\expandafter\expandafter\@gobble\expandafter\string
+	\fi
+	#1%
+      }%
+      \ifx\languagename\@Lang at tmp\else
+	\let\languagename\@Lang at tmp
+	\select at language{\languagename}%
+	\if at filesw \protected at write\@auxout{}{%
+	  \string\select at language{\languagename}%
+	  \string\@writefile{toc}{\string\select at language{\languagename}}%
+	  \string\@writefile{lof}{\string\select at language{\languagename}}%
+	  \string\@writefile{lot}{\string\select at language{\languagename}}%
+	\fi}%
+      \fi
+    }%
+    % Don't solve problem (3).
+  \fi
+  \@gobble
+{^}%
+
+% --- suggestions=
+
+\ifnum\magyar at opt@@suggestions=0 \@@magyar at skiplong\fi
+  % Dat: buggy varioref.sty adds this to extrasmagyar (\AtBeginDocument is
+  %      buggy, can be used only in the preamble.
+  %     \def\reftextfaceafter {a k\"o\-vet\-kez\H{o} ol\-da\-lon}%
+  %     \def\reftextfacebefore{az el\H{o}\-z\H{o} ol\-da\-lon}%
+  %     \def\reftextafter     {a k\"o\-vet\-kez\H{o} ol\-da\-lon}%
+  %     \def\reftextbefore    {az el\H{o}\-z\H{o} ol\-da\-lon}%
+  %     \def\reftextcurrent   {ezen az ol\-da\-lon}%
+  %     \def\reftextfaraway#1{\aza{\pageref{#1}} \pageref{#1}.~ol\-da\-lon}%
+  %     \def\reftextpagerange#1#2{\vref at stringwarning\reftextpagerange
+  %                               on pages~\pageref{#1}--\pageref{#2}}%
+  %     \def\reftextlabelrange#1#2{\vref at stringwarning\reflabelpagerange
+  %                                \ref{#1} to~\ref{#2}}%
+  %     \AtBeginDocument{\providecommand\aza[1]{a/az%
+  %        \PackageError{varioref}{%
+  %          Proper definition for command \noexpand\aza missing}%
+  %         {You need to (re)define the command \noexpand\aza that
+  %          takes one argument (a number or a \noexpand\pageref command)
+  %          and produces the string `a' or `az' depending on the argument
+  %          value. It should also accept an optional argument (default `l')
+  %          to denote whether or not the string should be lowercase or
+  %          uppercase.}}}%
+  \def\@@magyar at ignorehbox@pree#1\hbox$#2{}%$
+  %\def\@@magyar at grep@reftextcurrent#1\def\reftextcurrent#2\hbox$
+  \def\@@magyar at grep@reftextbegin#1\def\reftextfaceafter#2\hfuzz\hfuzz\hfuzz#3\hbox$#4{%$
+    \toks@={#1#3}% Dat: # -> ## conversion for \def
+    \expandafter\global\expandafter\edef\csname extras#4\endcsname
+      {\the\toks@}%
+  }
+  \def\@@magyar at grep@reftextcurrent#1\def\reftextlabelrange#2#3#4#5#6%
+    \AtBeginDocument#7#8\hbox$#9{%$ Dat: no need for \long\def
+    % ^^^ Dat: Don't use `#21', because then #2 would match multiple tokens
+    \ifx#31% found real data, not sentinel
+      \PackageWarningNoLine{#9.ldf}{Do not load buggy \string\usepackage[magyar]{varioref},\MessageBreak load simply \string\usepackage{varioref}}%
+      % vvv remove code inserted by varioref.sty
+      \@@magyar at grep@reftextbegin#1\hfuzz\hfuzz\hfuzz#8\hbox${#9}%$
+    \fi
+  }
+  \def\magyar at sugg@vr#1{%
+    \expandafter\expandafter\expandafter\@@magyar at grep@reftextcurrent
+       \csname extras#1\endcsname\hbox${#1}\@@magyar at ignorehbox@pree%$
+       \def\reftextlabelrange23456\AtBeginDocument78\hbox${#1}%$
+  }
+  \def\magyar at sugg@to#1{%
+    \def\reserved at a{T1}
+    \edef\reserved at b{\encodingdefault}% \encodingdefault is \long for t1enc.sty, but not for fontenc.sty
+    \ifx\reserved at a\reserved at b\else
+      \@latex at warning@no at line{Please use \string\usepackage{t1enc} with\MessageBreak \string\usepackage[#1]{babel}, to get accented chars hyphenated}%
+      % ^^^ Dat: \usepackage[T1]{fontenc} is equally good, but less effective
+    \fi
+  }
+  \def\magyar at sugg@ie at lowb#1{\@latex at warning@no at line{%
+      Please use \string\usepackage[latin2]{inputenc}\MessageBreak
+      or \string\usepackage[utf8]{inputenc}\MessageBreak
+      with \string\usepackage[#1]{babel}}}%
+  %** @param #1 empty (old) or \protect
+  %** @param #2 input encoding name
+  \def\magyar at sugg@ie at low#1\@inpenc at undefined@#2#3\vfuzz#4{%
+    \def\reserved at b{#2}%
+    \def\reserved at a{latin2}%
+    \ifx\reserved at a\reserved at b\else
+      \def\reserved at a{utf8}%
+      \ifx\reserved at a\reserved at b\else
+        \def\reserved at a{utf8x}%
+        \ifx\reserved at a\reserved at b\else
+          \def\reserved at a{cp1250}%
+          \ifx\reserved at a\reserved at b\else
+            \magyar at sugg@ie at lowb{#4}%
+          \fi
+        \fi
+      \fi
+    \fi
+  }
+  \def\magyar at sugg@ie#1{%
+    % Dat: don't print warning for missing \usepackage
+    \expandafter\ifx\csname @inpenc at undefined\endcsname\relax
+      \magyar at sugg@ie at lowb{#1}%
+    \else
+      % from inputenc.sty: \edef\@inpenc at undefined{\noexpand\@inpenc at undefined@{#1}}%
+      % > \@inpenc at undefined=macro:
+      % ->\@inpenc at undefined@ {latin2}.
+      \expandafter\magyar at sugg@ie at low\@inpenc at undefined....\vfuzz{#1}%
+    \fi
+  }%
+  \def\magyar at sugg@af#1{%
+    \expandafter\ifx\csname#1Options\endcsname\relax\else
+      \PackageWarningNoLine{#1.ldf}{No effect of \string\def\@backslashchar #1Options{...}\MessageBreak
+      please move it before \string\usepackage[#1]{babel}}%
+    \fi
+  }%
+  \def\@@magyar@@ps at fancy{\relax}%\@fancyplainfalse\ps@@fancy}%
+  \def\magyar at sugg@fh#1{%
+    \ifx\ps at fancy\@@magyar@@ps at fancy
+      \PackageWarningNoLine{#1.ldf}{No effect on fancyhdr.sty,\MessageBreak
+      please load it before \string\usepackage[#1]{babel}}%
+    \fi
+  }%
+  \def\magyar at sugg@ap#1{%
+    \expandafter\ifx\csname opt@#1.ldf.sty\endcsname\relax\else
+      \PackageWarningNoLine{#1.ldf}{No effect of \@backslashchar PassOptionsToPackage{?}{#1.ldf}\MessageBreak
+      please move it before \string\usepackage[#1]{babel}}%
+    \fi
+  }%
+  \edef\reserved at a{\noexpand\AtBeginDocument{%
+    \noexpand\magyar at sugg@pa{\CurrentOption}%
+    \noexpand\magyar at sugg@af{\CurrentOption}%
+    \noexpand\magyar at sugg@ap{\CurrentOption}%
+    \noexpand\magyar at sugg@to{\CurrentOption}%
+    \noexpand\magyar at sugg@ie{\CurrentOption}%
+    \noexpand\magyar at sugg@vr{\CurrentOption}%
+    \noexpand\magyar at sugg@fh{\CurrentOption}%
+  }}\reserved at a
+  \@gobble
+{^}%
+
+% --- Active characters and shorthands; active=, activeprefix=, activespace=
+
+\ifnum0=\magyar at opt@@activespace\magyar at opt@@active\space
+  \def\@@magyar at declare@shorthandx#1#2{%
+    \expandafter\def\csname @@magyar at shorthand@\string#1\endcsname{#2}%
+  }
+\@@magyar at skiplong\fi
+  \def\magyar at activate@shorthands{%
+    \edef\reserved at a{%
+      \noexpand\addto\expandafter\noexpand\csname extras\CurrentOption\endcsname
+      {\noexpand\languageshorthands{\CurrentOption}}%
+    }
+    \reserved at a
+    \let\magyar at activate@shorthands\relax
+  }
+  \let\@@magyar at saved@initiate at active@char\initiate at active@char
+  %
+  % vvv Fri Oct  1 18:09:55 CEST 2004
+  %     This is the ultimate fix of the .aux file catcodes when
+  %     \usepackage[german,magyar]{babel} or
+  %     \usepackage[french,magyar]{babel}.
+  %     This enforces \catcode\string``=12 very early into the .aux file.
+  % Imp: don't let \catcode``\active too early...
+  {\toks@\expandafter{\expandafter\@@magyar at protect@backtick\@begindocumenthook}%
+   \xdef\@begindocumenthook{\the\toks@}}% Dat: \@begindocumenthook has #1 #2 etc.
+  \def\@@magyar at protect@backtick{%
+    \if at filesw\immediate\write\@auxout{\catcode\noexpand\string``=12}\fi}
+  %
+  %** @param #1 a non-active char token
+  %** @param #2 activation type: 0, 1, 2 or 3
+  % !! quick link to \@@magyar at shorthand
+  \def\magyar at activate@char#1#2{%
+    \ifnum#2>1 % ignore 0 and 1
+      \ifnum#2>2 % 3
+        % SUXX, breaks compatibility with graphicx.sty and hyperref.sty and possibly
+        % with many other packages using \catcode`` etc.
+        %** Fix .aux load timing bug.
+        \AtBeginDocument{%
+          \if at filesw\immediate\write\@auxout{\catcode\noexpand\string`#1=12}\fi
+        }
+        \initiate at active@char{#1}%
+      \else% 2
+        % Dat: german.ldf emits `\catcode`"\active'; we should emit our
+        %      catcode change (\catcode\string``=12) before that
+        % Dat: this works only with \usepackage[magyar,german,magyar]{babel},
+	%      not with \usepackage[german,magyar]{babel}
+	%      solution: \AtBeginDocument{\if at filesw\immediate\write\@auxout{\catcode\noexpand\string`#1=12}\fi}
+        \let\magyar at saved@AtBeginDocument\AtBeginDocument
+        \let\AtBeginDocument\@gobble
+        % vvv Calls \AtBeginDocument to set \catcode to \active and also write such a
+        %     line to the .aux file. We just ignore it.
+        \initiate at active@char{#1}%
+        \let\AtBeginDocument\magyar at saved@AtBeginDocument
+        \let\magyar at saved@AtBeginDocument\@undefined
+        \expandafter\addto\csname extras\CurrentOption\endcsname{%
+          \babel at savevariable{\catcode\string`#1}%
+          \catcode\string`#1=13 %
+        }%
+      \fi
+      % Dat: now #1 is \active (done by \initiate at active@char)
+      \lccode\string`~=\string`#1\lowercase{% Dat: luckily everything below is in lowercase
+        \expandafter\addto\csname   extras\CurrentOption\endcsname  {\bbl at activate{~}}%
+        \expandafter\addto\csname noextras\CurrentOption\endcsname{\bbl at deactivate{~}}%
+      }
+      \lccode\string`~=0
+      \catcode\string`#1=12 % Imp: restore _old_ catcode
+    \fi
+  }
+  %** @param #1 shorthand prefix character (depends on activeprefix=)
+  %** @param #2 a single character (will be prefixed)
+  %*  @param #3 TeX code
+  \def\@@magyar at declare@shorthand at low#1#2#3{%
+    \declare at shorthand{\CurrentOption}{#1#2}{#3}%
+  }
+  \edef\@@magyar at shorthandprefix{\string`}%
+  %** @param #1 a single character (will be prefixed by ``' etc.)
+  %*  @param #2 TeX code
+  %\def\@@magyar at declare@shorthand#1#2{\magyar at opt@@activeprefix#1{#2}}% defined below
+  \ifx\magyar at opt@@activeprefix\relax
+    \def\magyar at opt@@active{0}% =none
+    \def\magyar at opt@@openqq{0}% =unchanged  (this must be defined before processing openqq below)
+  \else\edef\@@magyar at declare@shorthand#1#2{\noexpand\@@magyar at declare@shorthand at low\expandafter\string\magyar at opt@@activeprefix#1{#2}}\fi
+  %\magyar at activate@shorthands% not yet
+  \def\@@magyar at declare@shorthandx#1#2{%
+    \magyar at activate@shorthands
+    \expandafter\def\csname @@magyar at shorthand@\string#1\endcsname{#2}%
+    \expandafter\@@magyar at declare@shorthand\expandafter#1\expandafter{\csname @@magyar at shorthand@\string#1\endcsname}%
+  }
+  \@gobble
+{^}%
+
+%** Call \@@magyar at shorthand@... For example: {`tty} and
+%** {\@@magyar at shorthand tty} are interchangeable.
+%** @param #1 a char token. 
+\def\@@magyar at shorthand#1{%
+  \expandafter\ifx\csname @@magyar at shorthand@\string#1\endcsname\relax
+    \@@magyar at error{Unknown shorthand: \string#1 }%
+  \else
+    \expandafter\expandafter\csname @@magyar at shorthand@\string#1\endcsname
+  \fi
+}
+
+% --- activespace= Extra \thispace before :, ;, ! and ?
+%
+% french.ldf has \space after `:', but we only have \thinspace
+
+\ifnum\magyar at opt@@activespace=0 \@@magyar at skiplong\fi
+  %** @param #1 any of : ; ! ?
+  \def\magyar at thinspaced#1{%
+    % Dat: `!' at the end of the word is OK, but at the beginning it makes the
+    %      word unhyphenatable. Imp: maybe \nobreak\hskip\z at skip?
+    % Dat: this is math-mode safe, because \ifhmode is false in math mode 
+    \ifhmode% \ifhmode and \ifmmode are never true
+      \ifdim\lastskip>\z@
+        \unskip\penalty\@M\kern.1em% \thinspace is .16667em
+      \else
+        \kern.1em
+      \fi
+    \fi
+    \string#1%
+  }
+  \magyar at activate@shorthands
+  \magyar at activate@char;\magyar at opt@@activespace
+  \declare at shorthand{\CurrentOption}{;}{\magyar at thinspaced;}
+  \magyar at activate@char!\magyar at opt@@activespace
+  \declare at shorthand{\CurrentOption}{!}{%
+    \ifmmode
+      \expandafter\ifx\csname factorial\endcsname\relax\mathchar"5021 \else\factorial\fi
+    \else\magyar at thinspaced!\fi}
+  % ^^^ compatibility with nath.sty
+  \magyar at activate@char?\magyar at opt@@activespace
+  \declare at shorthand{\CurrentOption}{?}{\magyar at thinspaced?}
+  \magyar at activate@char:\magyar at opt@@activespace
+  \declare at shorthand{\CurrentOption}{:}{\magyar at thinspaced:}
+  \@gobble
+{^}%
+
+
+% --- active=
+%
+% Dat: active=safe isn't safe unless other .ldf files used don't call
+%      \initiate at active@char{`}.
+%
+% `` `' `= `_ `-- `- `| `< `> `" `~ etc.
+
+\ifnum\magyar at opt@@active=0
+  \ifnum\magyar at opt@@openqq>0 \@@magyar at error{active=none implies openqq=unchanged}\fi
+\@@magyar at skiplong\fi
+  \ifnum\magyar at opt@@active>1
+    \magyar at activate@shorthands% Dat: don't do it if \magyar at opt@@active=0
+    \expandafter\magyar at activate@char\magyar at opt@@activeprefix\magyar at opt@@active
+  \fi
+  %
+  \ifnum\magyar at opt@@openqq>1 % =down
+    % Same as in in ukraineb.ldf
+    \@@magyar at declare@shorthandx`{\glqq}% down 99  \glqq is Babel's macro containing \quotedblbase
+    \@@magyar at declare@shorthandx'{\grqq}% up 66
+  \else\ifnum\magyar at opt@@openqq>0 % =up
+    \@@magyar at declare@shorthandx`{\grqq}% up 66
+    \@@magyar at declare@shorthandx'{\glqq}% down 99
+  \else
+    \dMf @@magyar at shorthand@\string` {\string`\string`}% unchanged -- expect a ligature in font
+    \dMf @@magyar at shorthand@\string' {\string`\string'}% unchanged -- expect a ligature in font
+  \fi\fi
+  %
+  %** A hyphen, but hyphenation is OK at both sides
+  %** reported and asked by J\xF3zsa M\xE1rton <jozsineni at freemail.hu>
+  \@@magyar at declare@shorthandx ={\leavevmode\nobreak-\hskip\z at skip}
+  % ^^^ Dat: no need for \nobreak\hskip\z at skip, because of the empty discretionary
+  %** \shu?-- typesets an endash (--) with a small space around it (the one to
+  %** the right is breakable). \shu?- typesets a normal hyphen, having
+  %** hyphenation OK at both sides.
+  %** @example Kiss El\xF5d\shu?--Nagy P\xE1l
+  %** @example k\xF6zgazdas\xE1g\shu?-tudom\xE1nyi
+  \def\@@magyar at shorthandminus{%
+    \ifmmode \mskip2.4mu plus3.6mu minus1.8mu \else % ,`- is just a space in math mode
+      \if-\noexpand\@Lang at tmp \leavevmode\nobreak\,\nobreak\hbox{--}\,\expandafter\expandafter\expandafter\@gobble% Dat: \@gobble -
+      \else                   \leavevmode\nobreak-\hskip\z at skip\fi% Dat: e.g hegyes`-sz\xF6g\xFB
+    \fi
+  }
+  \@@magyar at declare@shorthandx -{\futurelet\@Lang at tmp\@@magyar at shorthandminus}%
+  %** A hyphen that is displayed in both next and current lines. Hyphenation
+  %** is OK at both sides. This differs from ukraineb.ldf.
+  %** \showhyphens{n\xE1trium`|klorid} -> n\xE1t-ri-um--klo-rid
+  \@@magyar at declare@shorthandx |{\leavevmode\nobreak-\nobreak\discretionary{}{-}{}\nobreak\hskip\z at skip}% Dat: all \nobreak s are important % e.g egyszer`|k\xE9tszer
+  \@@magyar at declare@shorthandx _{\leavevmode\nobreak\-\nobreak\hskip\z at skip}
+  \@@magyar at declare@shorthandx <{\flqq}
+  \@@magyar at declare@shorthandx >{\frqq}
+  \@@magyar at declare@shorthandx "{\hskip\z at skip}% \allowbreak, but hyphenation is OK at both sides
+  \@@magyar at declare@shorthandx ~{\textormath{\leavevmode\hbox{-}}{-}}% a hyphen that isn't part of ligatures -- and ---
+  %
+  % Dat: `CXY means \discretionary{CS-}{XY}{CXY}, which makes sense only for
+  %      `CCS. But `Ccs wouldn't make sense, since there is no Hungarian word
+  %      (whose first letter has to be capitalized) beginning with ccs.
+  % Dat: \nobreak\bbl at allowhyphens: \showhyphens{ho`sszabbra} -> hosz-szabb-ra
+  % Dat: \def\foo{`}\declare at shorthand{\CurrentOption{\foo c}{...} doesn't work
+  % Dat: these work quite well in math mode
+  % Dat: \showhyphens{a\hskip\z at skip b} displays "ab", but
+  %      \showhyphens{a\hskip0pt b} displays "a b"
+  %** These should be equivalent:
+  %**   \showhyphens{verembepot\nobreak\discretionary{y-}{}{}\nobreak\hskip\z at skip tyantam}
+  %**   \showhyphens{verembepo`ttyantam}
+  \def\@@magyar at disc#1#2{#1\textormath{\nobreak\discretionary{#2-}{}{}}{}\nobreak\hskip\z at skip}%
+  \@@magyar at declare@shorthandx c{\@@magyar at disc cs}% loccsan --> locs-csan (lo`ccsan)
+  \@@magyar at declare@shorthandx C{\@@magyar at disc CS}
+  \@@magyar at declare@shorthandx g{\@@magyar at disc gy}% poggy\'asz --> pogy-gy\'asz (po`ggy\'asz)
+  \@@magyar at declare@shorthandx G{\@@magyar at disc GY}
+  \@@magyar at declare@shorthandx l{\@@magyar at disc ly}% Kod\'allyal --> Kod\'aly-lyal (Kod\'a`llyal)
+  \@@magyar at declare@shorthandx L{\@@magyar at disc LY}
+  \@@magyar at declare@shorthandx n{\@@magyar at disc ny}% mennyei --> meny-nyei (me`nnyei)
+  \@@magyar at declare@shorthandx N{\@@magyar at disc NY}
+  \@@magyar at declare@shorthandx s{\@@magyar at disc sz}% vissza --> visz-sza (vi`ssza)
+  \@@magyar at declare@shorthandx S{\@@magyar at disc SZ}
+  \@@magyar at declare@shorthandx t{\@@magyar at disc ty}% pottyan --> poty-tyan (po`ttyan)
+  \@@magyar at declare@shorthandx T{\@@magyar at disc TY}
+  \@@magyar at declare@shorthandx z{\@@magyar at disc zs}% rizzsel --> rizs-zsel (ri`zzsel)
+  \@@magyar at declare@shorthandx Z{\@@magyar at disc ZS}
+  \def\magyar at fixddzs{\@@magyar at declare@shorthandx d{% bridzs-dzsel
+    % vvv doesn't handle the rare combination dzs-dzs
+    %\@@magyar at declare@shorthandx D}{\@@magyar at disc DZ}
+    %\@@magyar at declare@shorthandx d}{\@@magyar at disc dz}% eddz\"unk (felsz. m.) --> edz-dz\"unk (e`ddz\"unk)
+    \def\reserved at a{%
+      \if\noexpand\reserved at b d%
+        \def\reserved at a{%
+	  \if\noexpand\reserved at b z%
+	    \def\reserved at a{%
+              \nobreak% so word before `ddzs gets hyphenated
+	      \if\noexpand\reserved at b s%
+	        \discretionary{dzs-}{dz}{ddz}% \showhyphens{szuper`ddzsungelben}
+	      \else
+	        \discretionary{dz-}{d}{dd}z% \showhyphens{szuper`ddzungelben}
+	      \fi
+              \nobreak\hskip\z at skip% allow both pre- and post breaks
+	    }%
+	    \bbl at afterelse\expandafter\futurelet\expandafter\reserved at b\expandafter\reserved at a\@gobble
+	  \else
+	    \bbl at afterfi dd%
+	  \fi
+	}%
+	\bbl at afterelse\expandafter\futurelet\expandafter\reserved at b\expandafter\reserved at a\@gobble
+      \else\bbl at afterfi d\fi
+    }%
+    \futurelet\reserved at b\reserved at a% doesn't remove next token
+  }}%
+  \magyar at fixddzs \expandafter\uppercase\expandafter{\magyar at fixddzs}
+  \@gobble
+{^}%
+
+
+% --- hunumbers=
+
+\ifnum\magyar at opt@@hunumbers=0 \@@magyar at skiplong\fi
+\def\@@magyar at egyjegyu#1{%
+  \ifcase#1 \or\or k\'et\or h\'arom\or n\'egy\or \"ot\or hat\or h\'et\or
+    nyolc\or kilenc\fi
+}
+\def\@@magyar at upperfi@nine#1\fi\fi\fi\fi\fi\fi\fi\fi\fi{\fi\fi\fi\fi\fi\fi\fi\fi\fi#1}
+\def\@@magyar at upperelse@nine#1\else#2\fi\fi\fi\fi\fi\fi\fi\fi\fi{\fi#1}
+\def\@@magyar at uppernum#1{%
+  \ifx#1\"\@@magyar at upperelse@nine\"O\@gobble% \"o
+  \else\if\noexpand#1eE%
+  \else\if\noexpand#1hH%
+  \else\if\noexpand#1kK%
+  \else\if\noexpand#1mM% m\xEDnusz
+  \else\if\noexpand#1nN%
+  \else\if\noexpand#1oO%
+  \else\if\noexpand#1sS% sokadik
+  \else\if\noexpand#1tT%
+  \else\@@magyar at upperfi@nine\expandafter\@@magyar at uppernum#1% do an extra expansion
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+%** For \pagenumbering{huordinal}. Expands to the Hungarian ordered numeral,
+%** spelled out in letters (i.e 1 --> first --> els\xF5). Suitable for numbering
+%** \part{}s and \chapter{}s of a book (\def\thepart{\@Huordinal\c at part}})
+%** @param #1 a number (input for \number) in -9999..9999
+\def\@huordinal#1{%
+  % !! larger numbers, also for \@hunumeral
+  \ifnum#1=-1 m\'nusz egyedik\else
+  \ifnum#1=-2 m\'nusz kettedik\else
+  \ifnum#1<0 m\'inusz \expandafter\@huordinal\expandafter{\number-#1 }\else
+  \ifcase\number#1 nulladik\or els\H o\or m\'asodik\or harmadik\or negyedik\or
+    \"ot\"odik\or hatodik\or hetedik\or nyolcadik\or kilencedik\else
+    \ifnum#1>999 \expandafter\@@magyar at ezresedik\number#1.\else
+    \ifnum#1>99 \expandafter\@@magyar at szazasodik\number#1\else
+                \expandafter\@@magyar at tizesedik\number#1%
+  \fi\fi\fi\fi\fi\fi
+}
+%** @param #1#2 1000..9999
+\def\@@magyar at ezresedik#1#2.{%
+  \ifnum#1#2>9999 sokadik\else
+    \@@magyar at egyjegyu#1%
+    \ifnum#2=0 ezredik\else
+      ezer\ifnum#1>1 -\fi% k\xE9tezer-harmadik
+      \ifnum#2<100
+        \expandafter\@@magyar at tizesedik\number#2%
+      \else
+        \ifnum#2<200 egy\fi% ezersz\xE1zadik -> ezeregysz\xE1zadik
+        \@@magyar at szazasodik#2%
+      \fi
+    \fi
+  \fi
+}
+%** @param #1#2 100..999
+%** Imp: binary search
+\def\@@magyar at szazasodik#1#2#3{%
+  \@@magyar at egyjegyu#1sz\'az%
+  \@@magyar at tizesedik#2#3%
+}
+%** @param #1 a digit
+%** @param #2 a digit
+%** Imp: binary search
+\def\@@magyar at tizesedik#1#2{%
+       \ifnum#1#2>89 kilencven\@@magyar at egyesedik#2e%
+  \else\ifnum#1#2>79  nyolcvan\@@magyar at egyesedik#2a%
+  \else\ifnum#1#2>69    hetven\@@magyar at egyesedik#2e%
+  \else\ifnum#1#2>59    hatvan\@@magyar at egyesedik#2a%
+  \else\ifnum#1#2>49   \"otven\@@magyar at egyesedik#2e%
+  \else\ifnum#1#2>39   negyven\@@magyar at egyesedik#2e%
+  \else\ifnum#1#2>29   harminc\@@magyar at egyesedik#2a%
+  \else\ifnum#1#2>20    huszon\@@magyar at egyesedik#2.%
+  \else\ifnum#1#2=20  huszadik%
+  \else\ifnum#1#2>10     tizen\@@magyar at egyesedik#2.%
+  \else\ifnum#1#2=10   tizedik%
+  \else                       \@@magyar at egyesedik#2a% ``k\xE9tsz\xE1zadik''
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}%
+\def\@@magyar at egyesedik#1#2{%
+  \ifcase#1 #2\or egye\or kette\or harma\or negye\or
+    \"ot\"o\or hato\or hete\or nyolca\or kilence\fi dik%
+}
+%** Same as \@huordinal, but uppercase
+\def\@Huordinal#1{%
+  % Dat: \newlabel{hellopart}{{Els\H o}{3}} is correctly written out
+  \ifcase#1 Nulladik\or Els\H o\or M\'asodik\or Harmadik\or Negyedik\or
+    \"Ot\"odik\or Hatodik\or Hetedik\or Nyolcadik\or Kilencedik\or Tizedik%
+    \or Tizenegyedik\or Tizenkettedik\else\@@magyar at uppernum\@huordinal{#1}\fi
+}
+\def\huordinal#1{\expandafter\@huordinal\csname c@#1\endcsname}
+\def\Huordinal#1{\expandafter\@Huordinal\csname c@#1\endcsname}
+
+%** For \pagenumbering{hunumeral}. Expands to the Hungarian ordered numeral,
+%** spelled out in letters (i.e 1 --> first --> els\xF5). Suitable for numbering
+%** \part{}s and \chapter{}s of a book (\def\thepart{\@Hunumeral\c at part}})
+%** @param #1 a number (input for \number) in -9999..9999
+\def\@hunumeral#1{%
+  \ifnum#1<0 m\'inusz \expandafter\@hunumeral\expandafter{\number-#1 }\else
+  \ifcase#1 nulla\or egy\or kett\H{o}\or h\'arom\or n\'egy\or
+    \"ot\or hat\or h\'et\or nyolc\or kilenc\else
+    \ifnum#1>999 \expandafter\@@magyar at ezer\number#1.\else
+    \ifnum#1>99 \expandafter\@@magyar at szaz\number#1\else
+                \expandafter\@@magyar at tiz\number#1%
+  \fi\fi\fi\fi
+}
+%** @param #1#2 1000..9999
+\def\@@magyar at ezer#1#2.{%
+  \ifnum#1#2>9999 sokadik\else
+    \@@magyar at egyjegyu#1%
+    \ifnum#2=0 ezer\else
+      ezer\ifnum#1>1 -\fi% k\xE9tezer-harmadik
+      \ifnum#2<100
+        \expandafter\@@magyar at tiz\number#2%
+      \else
+        \ifnum#2<200 egy\fi% ezersz\xE1zadik -> ezeregysz\xE1zadik
+        \@@magyar at szaz#2%
+      \fi
+    \fi
+  \fi
+}
+%** @param #1#2 100..999
+%** Imp: binary search
+\def\@@magyar at szaz#1#2#3{%
+  \@@magyar at egyjegyu#1sz\'az%
+  \@@magyar at tiz#2#3%
+}
+%** @param #1 a digit
+%** @param #2 a digit
+%** Imp: binary search
+\def\@@magyar at tiz#1#2{%
+       \ifnum#1#2>89 kilencven\@@magyar at egy#2%
+  \else\ifnum#1#2>79  nyolcvan\@@magyar at egy#2%
+  \else\ifnum#1#2>69    hetven\@@magyar at egy#2%
+  \else\ifnum#1#2>59    hatvan\@@magyar at egy#2%
+  \else\ifnum#1#2>49   \"otven\@@magyar at egy#2%
+  \else\ifnum#1#2>39   negyven\@@magyar at egy#2%
+  \else\ifnum#1#2>29   harminc\@@magyar at egy#2%
+  \else\ifnum#1#2>20    huszon\@@magyar at egy#2%
+  \else\ifnum#1#2=20  h\'usz%
+  \else\ifnum#1#2>10     tizen\@@magyar at egy#2%
+  \else\ifnum#1#2=10   t\'iz%
+  \else                       \@@magyar at egy#2% ``k\xE9tsz\xE1zadik''
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}%
+\def\@@magyar at egy#1{%
+  \ifcase#1 \or egy\or kett\H{o}\or h\'arom\or n\'egy\or
+    \"ot\or hat\or h\'et\or nyolc\or kilenc\fi%
+}
+%** Same as \@hunumeral, but uppercase
+\def\@Hunumeral#1{%
+  % Dat: \newlabel{hellopart}{{Els\H o}{3}} is correctly written out
+  \ifcase#1 Nulla\or Egy\or Kett\H{o}\or H\'arom\or N\'egy\or
+    \"Ot\or Hat\or H\'et\or Nyolc\or Kilenc\else\@@magyar at uppernum\@hunumeral{#1}\fi
+}
+\def\hunumeral#1{\expandafter\@hunumeral\csname c@#1\endcsname}
+\def\Hunumeral#1{\expandafter\@Hunumeral\csname c@#1\endcsname}
+
+\@gobble
+{^}%
+
+% --- Appending suffixes to numbers; told=
+
+\ifnum\magyar at opt@@told=0 \@@magyar at skiplong\fi
+% Dat: double accent combinations: +adik,+a,+as,+ad  +hoz,+an,+on,+at,+ban...
+
+% vvv Terminal suffix variants
+
+% Dat: meaning of classes(#1): {\ifcase 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or 10\or 11/-1\or 12/-2\or 100\or 1000\or 10^6\or 10^9\or 20\or 30\or 40\or 60\fi}
+% Dat: ... at st is is special for appending +t to \refstruc names
+\def\@@magyar at suffix@adik#1{\ifnum#1=1 s\H o\else
+                              \ifcase#1 a\or  e\or  o\or a\or e\or\"o\or o\or e\or a\or e\or e\or e\or  e\or a\or e\or a\or a\or a\or a\or e\or a\or e\or e\fi dik\fi}%
+\def\@@magyar at suffix@a#1{\ifcase     #1 a\or je\or  a\or a\or e\or  e\or a\or e\or a\or e\or e\or e\or  e\or a\or e\or a\or a\or a\or a\or e\or a\fi}%
+\def\@@magyar at suffix@as#1{\ifcase    #1  \or  e\or  e\or a\or e\or\"o\or o\or e\or a\or e\or e\or e\or  e\or a\or e\or  \or a\or a\or a\or e\or a\fi s}%
+\def\@@magyar at suffix@ad#1{\ifcase    #1 a\or  e\or  e\or a\or e\or\"o\or o\or e\or a\or e\or e\or e\or  e\or a\or e\or a\or a\or a\or a\or e\or a\fi d}%
+\def\@@magyar at suffix@@hoz#1#2{\ifcase#2 o\or  e\or\"o\or o\or e\or\"o\or o\or e\or o\or e\or e\or e\or\"o\or o\or e\or o\or o\or o\or o\or e\or o\fi#1}%
+\def\@@magyar at suffix@@an#1{\ifcase   #1  \or  e\or  e\or a\or e\or  e\or a\or e\or a\or e\or e\or e\or  e\or a\or e\or a\or a\or a\or a\or e\or a\fi n}%
+\def\@@magyar at suffix@on#1{\ifcase    #1  \or  e\or   \or o\or e\or\"o\or o\or e\or a\or e\or e\or e\or  e\or o\or e\or  \or o\or o\or o\or e\or o\fi n}%
+\def\@@magyar at suffix@st#1{\ifcase    #1  \or   \or   \or  \or e\or   \or  \or  \or  \or  \or  \or  \or   \or  \or  \or  \or  \or  \or  \or  \or  \fi t}%
+\def\@@magyar at suffix@@at#1{\ifcase   #1  \or  e\or   \or a\or e\or\"o\or o\or e\or a\or e\or e\or e\or   \or a\or e\or  \or a\or a\or a\or e\or a\fi t}%
+\def\@@magyar at suffix@@a#1#2{\ifcase  #2 a\or  e\or  e\or a\or e\or  e\or a\or e\or a\or e\or e\or e\or  e\or a\or e\or a\or a\or a\or a\or e\or a\fi#1}%
+\def\@@magyar at suffix@nal#1{n\ifcase  #1 \'a\or \'e\or \'e\or\'a\or \'e\or \'e\or\'a\or \'e\or\'a\or \'e\or \'e\or \'e\or \'e\or\'a\or \'e\or \'a\or \'a\or \'a\or\'a\or \'e\or\'a\fi l}%
+\def\@@magyar at suffix@@ol#1{\ifcase   #1 \'o\or\H o\or\H o\or\'o\or\H o\or\H o\or\'o\or\H o\or\'o\or\H o\or\H o\or\H o\or\H o\or\'o\or\H o\or \'o\or \'o\or \'o\or\'o\or\H o\or\'o\fi l}%
+\def\@@magyar at suffix@ul#1{\ifcase    #1   u\or \"u\or \"u\or  u\or \"u\or \"u\or  u\or \"u\or  u\or \"u\or \"u\or \"u\or \"u\or  u\or \"u\or   u\or   u\or   u\or  u\or \"u\or  u\fi l}%
+\def\@@magyar at suffix@val#1{\ifcase   #1  va\or gye\or ve\or ma\or gye\or  te\or ta\or  te\or ca\or  ce\or  ze\or gye\or  ve\or za\or  re\or  va\or  da\or sza\or ca\or  ne\or na\fi l}%
+% @example: \atold(2.31)+es+sel{}
+\def\@@magyar at suffix@sal#1{\ifcase   #1  sa\or se\or  se\or sa\or  se\or  se\or sa\or  se\or sa\or  se\or  se\or  se\or  se\or sa\or  se\or  sa\or  sa\or  sa\or sa\or  se\or sa\fi l}%
+% @example: \atold(2.31)+ed+del{}
+\def\@@magyar at suffix@dal#1{\ifcase   #1  da\or de\or  de\or da\or  de\or  de\or da\or  de\or da\or  de\or  de\or  de\or  de\or da\or  de\or  da\or  da\or  da\or da\or  de\or da\fi l}%
+% @example: \atold(2.31)+edik+kel{}
+\def\@@magyar at suffix@kal#1{\ifcase   #1  ka\or ke\or  ke\or ka\or  ke\or  ke\or ka\or  ke\or ka\or  ke\or  ke\or  ke\or  ke\or ka\or  ke\or  ka\or  ka\or  ka\or ka\or  ke\or da\fi l}%
+\def\@@magyar at suffix@an{\@@magyar at suffix@@an}% make \ifx\@@magyar at suffix@an faster
+\def\@@magyar at suffix@at{\@@magyar at suffix@@at}% make \ifx\@@magyar at suffix@at faster
+\def\@@magyar at suffix@hoz{h\@@magyar at suffix@@hoz z}
+\def\@@magyar at suffix@ban{b\@@magyar at suffix@@a n}
+\def\@@magyar at suffix@nak{n\@@magyar at suffix@@a k}
+\def\@@magyar at suffix@ba{b\@@magyar at suffix@@a \@empty}
+\def\@@magyar at suffix@ra{r\@@magyar at suffix@@a \@empty}
+\def\@@magyar at suffix@bol{b\@@magyar at suffix@@ol}
+\def\@@magyar at suffix@tol{t\@@magyar at suffix@@ol}
+\def\@@magyar at suffix@rol{r\@@magyar at suffix@@ol}
+\def\@@magyar at suffix@szor{sz\@@magyar at suffix@@hoz r}
+
+% vvv Continued suffix variants
+
+\def\@@magyar at skipfi\fi\else{\fi}%
+%** Usage: \@@magyar at suffix@aS{5}\magyar@@suffix at hoz
+\def\@@magyar at suffix@aS#1#2{%
+  \ifnum#2=5 \ifx#1\@@magyar at suffix@at \"oset\else\@@magyar at skipfi\fi\else
+    \ifcase#2  \or e\or e\or a\or e\or \"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or  \or a\or a\or a\or e\or a\fi s%
+    \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter
+    \ifx#1\@@magyar at suffix@val\@@magyar at suffix@sal\else#1\fi % +es+vel -> +es+sel
+    % Imp: +ad+val, +adik+val etc.
+    \ifcase#2 3\or 1\or 1\or 3\or 1\or   5\or 3\or 1\or 3\or 1\or 1\or 1\or 1\or 3\or 1\or 3\or 3\or 3\or 3\or 1\or 3\fi
+  \fi
+}%
+\def\@@magyar at suffix@aD#1#2{%
+  \ifcase#2  \or e\or e\or a\or e\or \"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or  \or a\or a\or a\or e\or a\fi d%
+  \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter
+  \ifx#1\@@magyar at suffix@val\@@magyar at suffix@dal\else#1\fi % +ed+vel -> +ed+del
+  \ifcase#2 3\or 1\or 1\or 3\or 1\or   5\or 3\or 1\or 3\or 1\or 1\or 1\or 1\or 3\or 1\or 3\or 3\or 3\or 3\or 1\or 3\fi
+}%
+\def\@@magyar at suffix@adiK#1#2{%
+  \ifnum#2=1 \ifx#1\@@magyar at suffix@at s\"ot\else\@@magyar at skipfi\fi\else
+    \ifcase#2  \or e\or e\or a\or e\or \"o\or o\or e\or a\or e\or e\or e\or e\or a\or e\or  \or a\or a\or a\or e\or a\fi dik%
+    \expandafter\expandafter\expandafter\expandafter\expandafter\expandafter
+    \ifx#1\@@magyar at suffix@val\@@magyar at suffix@kal\else#1\fi % +edik+vel -> +ed+kel
+    \ifcase#2 3\or 1\or 1\or 3\or 1\or   1\or 3\or 1\or 3\or 1\or 1\or 1\or 1\or 3\or 1\or 3\or 3\or 3\or 3\or 1\or 3\fi
+  \fi
+}%
+\def\@@magyar at suffix@A#1#2{%
+  \ifcase#2 \'a\or j\'e\or \'a\or \'a\or \'e\or \'e\or \'a\or \'e\or \'a\or \'e\or \'e\or \'e\or \'e\or \'a\or \'e\or \'a\or\'a\or\'a\or\'a\or\'e\or\'a\fi
+  \ifx#1\@@magyar at suffix@at t\else
+  \ifx#1\@@magyar at suffix@an n\else% Dat: suffix overload: 2-a-an => 2-\xE1n
+    \expandafter#1\ifcase#2 3\or 1\or 1\or 3\or 1\or   1\or 3\or 1\or 3\or 1\or 1\or 1\or 1\or 3\or 1\or 3\or 3\or 3\or 3\or 1\or 3\fi
+  \fi\fi
+}%
+\def\@@magyar at suffix@@bad#1#2{\@@magyar at error{Unknown suffix \string`#1' for \string\told}}
+
+% vvv Input suffix parser
+
+%** Also defined elsewhere.
+%** @param #2 \else...\else...\fi...\fi etc.
+\def\@@magyar at swaprelax#1#2\relax{#2#1}
+%\def\@@magyar at swapno#1\noexpand{...}
+\def\@@magyar at contn#1\relax{#1\@@magyar at told@cont{}}
+\def\@@magyar at conta#1#2#3\relax{#3\noexpand#1\@@magyar at told@cont{#2}}
+\def\@@magyar at badsuffix#1#2\relax{#2\noexpand\@@magyar at suffix@@bad{#1}\@@magyar at told@cont{#1}}%
+\def\@@magyar at fs@#1{%
+  \if a\noexpand#1\@@magyar at swaprelax\@@magyar at fs@a\else
+  \if b\noexpand#1\@@magyar at swaprelax\@@magyar at fs@b\else
+  \if d\noexpand#1\@@magyar at swaprelax\@@magyar at fs@d\else
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@e\else
+  \if h\noexpand#1\@@magyar at swaprelax\@@magyar at fs@h\else
+  \if k\noexpand#1\@@magyar at swaprelax\@@magyar at fs@k\else
+  \if n\noexpand#1\@@magyar at swaprelax\@@magyar at fs@n\else
+  \if o\noexpand#1\@@magyar at swaprelax\@@magyar at fs@o\else
+  \if r\noexpand#1\@@magyar at swaprelax\@@magyar at fs@r\else
+  \if s\noexpand#1\@@magyar at swaprelax\@@magyar at fs@s\else
+  \if t\noexpand#1\@@magyar at swaprelax\@@magyar at fs@t\else
+  \if u\noexpand#1\@@magyar at swaprelax\@@magyar at fs@u\else
+  \if v\noexpand#1\@@magyar at swaprelax\@@magyar at fs@v\else
+  % Imp: SUXX: badsuffix doesn't work for +qal here -- fix error reporting
+  \@@magyar at badsuffix{#1}{}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax
+}
+\def\@@magyar at fs@a#1{%
+  %\if -\noexpand#1\@@magyar at swapno\else
+  \if +\noexpand#1\noexpand\@@magyar at suffix@A\@@magyar at swaprelax\@@magyar at fs@\else
+  \if d\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ad\else
+  \if n\noexpand#1\noexpand\@@magyar at suffix@an\@@magyar at contn\else
+  \if s\noexpand#1\@@magyar at swaprelax\@@magyar at fs@as\else
+  \if t\noexpand#1\noexpand\@@magyar at suffix@at\@@magyar at contn\else
+                  \@@magyar at conta\@@magyar at suffix@a{#1}%
+  \fi\fi\fi\fi\fi\relax
+}
+\def\@@magyar at fs@ad#1{%
+  %\if -\noexpand#1\@@magyar at swapno\else
+  \if +\noexpand#1\noexpand\@@magyar at suffix@aD\@@magyar at swaprelax\@@magyar at fs@\else
+  \if i\noexpand#1\@@magyar at swaprelax\@@magyar at fs@adi\else
+                  \@@magyar at conta\@@magyar at suffix@ad{#1}%
+  \fi\fi\relax
+}
+\def\@@magyar at fs@adi#1{%
+  \if k\noexpand#1\@@magyar at swaprelax\@@magyar at fs@adik\else
+  \@@magyar at badsuffix{adi#1}{}\fi\relax
+}
+\def\@@magyar at fs@adik#1{%
+  %\if -\noexpand#1\@@magyar at swapno\else
+  \if +\noexpand#1\noexpand\@@magyar at suffix@adiK\@@magyar at swaprelax\@@magyar at fs@\else
+                  \@@magyar at conta\@@magyar at suffix@adik{#1}%
+  \fi\relax
+}
+\def\@@magyar at fs@as#1{%
+  %\if -\noexpand#1\@@magyar at swapno\else
+  \if +\noexpand#1\noexpand\@@magyar at suffix@aS\@@magyar at swaprelax\@@magyar at fs@\else
+                  \@@magyar at conta\@@magyar at suffix@as{#1}%
+  \fi\relax
+}
+\def\@@magyar at fs@b#1{%
+  \if a\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ba\else
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ba\else
+  \if o\noexpand#1\@@magyar at swaprelax\@@magyar at fs@bo\else
+  \@@magyar at badsuffix{b#1}{}\fi\fi\fi\relax
+}
+\def\@@magyar at fs@ba#1{%
+  \if n\noexpand#1\noexpand\@@magyar at suffix@ban\@@magyar at contn\else
+                  \@@magyar at conta\@@magyar at suffix@ba{#1}%
+  \fi\relax
+}
+\def\@@magyar at fs@bo#1{%
+  \if l\noexpand#1\noexpand\@@magyar at suffix@bol\@@magyar at contn\else
+  \@@magyar at badsuffix{bo#1}{}\fi\relax
+}
+\def\@@magyar at fs@d#1{%
+  \if a\noexpand#1\@@magyar at swaprelax\@@magyar at fs@da\else
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@da\else
+  \@@magyar at badsuffix{d#1}{}\fi\fi\relax
+}
+\def\@@magyar at fs@da#1{%
+  \if l\noexpand#1\noexpand\@@magyar at suffix@dal\@@magyar at contn\else
+  \@@magyar at badsuffix{da#1}{}\fi\relax
+}
+\def\@@magyar at fs@e#1{%
+  \if d\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ad\else
+  \if s\noexpand#1\@@magyar at swaprelax\@@magyar at fs@as\else
+  \if t\noexpand#1\noexpand\@@magyar at suffix@at\@@magyar at contn\else
+  \if n\noexpand#1\noexpand\@@magyar at suffix@an\@@magyar at contn\else
+  \if +\noexpand#1\noexpand\@@magyar at suffix@A\@@magyar at swaprelax\@@magyar at fs@\else
+  %\@@magyar at badsuffix{e#1}{}
+  \@@magyar at conta\@@magyar at suffix@a{#1}{}%
+  \fi\fi\fi\fi\fi\relax
+}
+\def\@@magyar at fs@h#1{%
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ho\else
+  \if o\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ho\else
+  \@@magyar at badsuffix{h#1}{}\fi\fi\relax
+}
+\def\@@magyar at fs@ho#1{%
+  \if z\noexpand#1\noexpand\@@magyar at suffix@hoz\@@magyar at contn\else
+  \@@magyar at badsuffix{ho#1}{}\fi\relax
+}
+\def\@@magyar at fs@k#1{%
+  \if a\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ka\else
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ka\else
+  \@@magyar at badsuffix{k#1}{}\fi\fi\relax
+}
+\def\@@magyar at fs@ka#1{%
+  \if l\noexpand#1\noexpand\@@magyar at suffix@kal\@@magyar at contn\else
+  \@@magyar at badsuffix{ka#1}{}\fi\relax
+}
+\def\@@magyar at fs@n#1{%
+  \if a\noexpand#1\@@magyar at swaprelax\@@magyar at fs@na\else
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@na\else
+  \@@magyar at badsuffix{n#1}{}\fi\fi\relax
+}
+\def\@@magyar at fs@na#1{%
+  \if k\noexpand#1\noexpand\@@magyar at suffix@nak\@@magyar at contn\else
+  \if l\noexpand#1\noexpand\@@magyar at suffix@nal\@@magyar at contn\else
+  \@@magyar at badsuffix{na#1}{}\fi\fi\relax
+}
+\def\@@magyar at fs@o#1{%
+  \if d\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ad\else
+  \if n\noexpand#1\noexpand\@@magyar at suffix@on\@@magyar at contn\else
+  \if s\noexpand#1\@@magyar at swaprelax\@@magyar at fs@as\else
+  \if t\noexpand#1\noexpand\@@magyar at suffix@at\@@magyar at contn\else
+  \@@magyar at badsuffix{o#1}{}\fi\fi\fi\fi\relax
+}
+\def\@@magyar at fs@r#1{%
+  \if a\noexpand#1\noexpand\@@magyar at suffix@ra\@@magyar at contn\else
+  \if e\noexpand#1\noexpand\@@magyar at suffix@ra\@@magyar at contn\else
+  \if o\noexpand#1\@@magyar at swaprelax\@@magyar at fs@ro\else
+  \@@magyar at badsuffix{r#1}{}\fi\fi\fi\relax
+}
+\def\@@magyar at fs@ro#1{%
+  \if l\noexpand#1\noexpand\@@magyar at suffix@rol\@@magyar at contn\else
+  \@@magyar at badsuffix{ro#1}{}\fi\relax
+}
+\def\@@magyar at fs@s#1{%
+  \if z\noexpand#1\@@magyar at swaprelax\@@magyar at fs@sz\else
+  \if a\noexpand#1\@@magyar at swaprelax\@@magyar at fs@sa\else
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@sa\else
+  \if t\noexpand#1\noexpand\@@magyar at suffix@st\@@magyar at contn\else
+  \@@magyar at badsuffix{s#1}{}\fi\fi\fi\fi\relax
+}
+\def\@@magyar at fs@sa#1{%
+  \if l\noexpand#1\noexpand\@@magyar at suffix@sal\@@magyar at contn\else
+  \@@magyar at badsuffix{sa#1}{}\fi\relax
+}
+\def\@@magyar at fs@sz#1{%
+  \if o\noexpand#1\@@magyar at swaprelax\@@magyar at fs@szo\else
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@szo\else
+  \@@magyar at badsuffix{sz#1}{}\fi\fi\relax
+}
+\def\@@magyar at fs@szo#1{%
+  \if r\noexpand#1\noexpand\@@magyar at suffix@szor\@@magyar at contn\else
+  \@@magyar at badsuffix{szo#1}{}\fi\relax
+}
+\def\@@magyar at fs@t#1{%
+  \if o\noexpand#1\@@magyar at swaprelax\@@magyar at fs@to\else% Dat: works even if #1 is empty
+                  \@@magyar at conta\@@magyar at suffix@at{#1}%
+  \fi\relax
+}
+\def\@@magyar at fs@to#1{%
+  \if l\noexpand#1\noexpand\@@magyar at suffix@tol\@@magyar at contn\else
+  \@@magyar at badsuffix{to#1}{}\fi\relax
+}
+\def\@@magyar at fs@u#1{%
+  \if l\noexpand#1\noexpand\@@magyar at suffix@ul\@@magyar at contn\else
+  \@@magyar at badsuffix{u#1}{}\fi\relax
+}
+\def\@@magyar at fs@v#1{%
+  \if a\noexpand#1\@@magyar at swaprelax\@@magyar at fs@va\else
+  \if e\noexpand#1\@@magyar at swaprelax\@@magyar at fs@va\else
+  \@@magyar at badsuffix{v#1}{}\fi\fi\relax
+}
+\def\@@magyar at fs@va#1{%
+  \if l\noexpand#1\noexpand\@@magyar at suffix@val\@@magyar at contn\else
+  \@@magyar at badsuffix{va#1}{}\fi\relax
+}
+
+% vvv Classification
+
+% Old: \def\@@magyar at skipor#1\or#2\fi{\fi#1}%
+%** Usage: \expandafter\@@magyar at skipor\expandafter\token\ifcase ... \else ... \or\else\fi
+\def\@@magyar at skipor#1\or{\@@magyar at skipelse#1\else}%
+\def\@@magyar at skipelse#1\else#2\fi{\fi#1}%
+
+%** Usage: \@@magyar at classify@none{N}{...}
+%**   Reads till \vfuzz, considers the last decimal number, ignores space,
+%** punctuation and the minus `-' sign. Ignores spaces, so `1 2' and `12' are
+%** treated the same number. There must ne no `{' or `}' inside `...'.
+%**   x ends by 0..9, y ends by 1..9 below.
+%** @expands to:
+%**   c0: 0
+%**   c1: 1
+%**   c2: x2 ...
+%**   c9: x9
+%**   c10: x10
+%**   c11: x1
+%**   c12: x2
+%**   c13: y00
+%**   c14: y000 y0000 y00000
+%**   c15: y000000 y0000000 y00000000
+%**   c16: x000000000
+%**   c17: x20
+%**   c18: x30
+%**   c19: x40 x50 x70 x90
+%**   c20: x60 x80
+%**   On error, expansion doesn't start with `c'
+%** @param #1 default classification, if no (more) numbers found
+%** @param #2 next token
+\def\@@magyar at classify@none#1#2{%
+  \if\noexpand#20\@@magyar at swaprelax{\@@magyar at classify@none{c0}}\else
+  % Dat: smart way to test whether #1 is in 1..9: \ifnum0<0\string#1 foo\fi
+  \ifnum0<0\string#2 \@@magyar at swaprelax{\@@magyar at classify@single#2}\else
+  \if\noexpand#2- \@@magyar at swaprelax{\@@magyar at classify@neg{#1}}\else
+  \ifx#2\vfuzz   \@@magyar at swaprelax{#1}\else% stop processing if terminating \vfuzz is found
+                 \@@magyar at swaprelax{\@@magyar at classify@none{#1}}% find next (possibly) number
+  % ^^^ Dat: it is safe to call \@@magyar at swaprelax here, even if #2 contains \relax
+  \fi\fi\fi\fi\relax
+}
+\def\@@magyar at classify@neg#1#2{%
+  \if\noexpand#20\@@magyar at swaprelax{\@@magyar at classify@none{c0}}\else
+  % Dat: smart way to test whether #1 is in 1..9: \ifnum0<0\string#1 foo\fi
+  \ifnum0<0\string#2 \@@magyar at swaprelax{\@@magyar at classify@singleneg#2}\else
+  \if\noexpand#2- \@@magyar at swaprelax{\@@magyar at classify@none{#1}}\else% double negation
+  \ifx#2\vfuzz   \@@magyar at swaprelax{#1}\else% stop processing if terminating \vfuzz is found
+                 \@@magyar at swaprelax{\@@magyar at classify@none{#1}}% find next (possibly) number, start as positive
+  % ^^^ Dat: it is safe to call \@@magyar at swaprelax here, even if #2 contains \relax
+  \fi\fi\fi\fi\relax
+}
+%** @param #1 previous digit 1..9
+%** @param #2 next token
+\def\@@magyar at classify@single#1#2{%
+  \if\noexpand#20\@@magyar at swaprelax{\@@magyar at classify@tens#1}\else
+  \ifnum0<0\string#2 \@@magyar at swaprelax{\@@magyar at classify@more#2}\else
+  \ifx#2\vfuzz   \@@magyar at swaprelax{c#1}\else
+                 \@@magyar at swaprelax{\@@magyar at classify@none{c#1}#2}%
+  % ^^^ Dat: it is safe to call \@@magyar at swaprelax here, even if #2 contains \relax
+  \fi\fi\fi\relax
+}
+%** @param #1 previous digit 1..9
+%** @param #2 next token
+\def\@@magyar at classify@singleneg#1#2{%
+  \if\noexpand#20\@@magyar at swaprelax{\@@magyar at classify@tens#1}\else
+  \ifnum0<0\string#2 \@@magyar at swaprelax{\@@magyar at classify@more#2}\else
+  \ifx#2\vfuzz   \@@magyar at swaprelax{c\ifcase#1 0\or11\or12\else#1\fi}\else % turn `-1' -> `11' and `-2' to `12'
+  \if#11\@@magyar at swaprelax{\@@magyar at classify@neg{c11}#2}\else
+  \if#12\@@magyar at swaprelax{\@@magyar at classify@neg{c12}#2}\else
+                 \@@magyar at swaprelax{\@@magyar at classify@neg{c#1}#2}%
+  % ^^^ Dat: it is safe to call \@@magyar at swaprelax here, even if #2 contains \relax
+  \fi\fi\fi\fi\fi\relax
+}
+%** @param #1 previous digit 1..9
+%** @param #2 next token
+\def\@@magyar at classify@more#1#2{%
+  \if\noexpand#20\@@magyar at swaprelax{\@@magyar at classify@tens#1}\else
+  \ifnum0<0\string#2 \@@magyar at swaprelax{\@@magyar at classify@more#2}\else
+                 \@@magyar at swaprelax{%
+    \expandafter\@@magyar at skipor\expandafter\@@magyar at classify@none
+    \ifcase#1 M\or {c11}\or {c12}\else {c#1}\or\else\fi#2}%
+  % ^^^ Dat: it is safe to call \@@magyar at swaprelax here, even if #2 contains \relax
+  \fi\fi\relax
+}
+%** @param #1 prev-prev digit, 1..9
+%** @param #2 next token
+\def\@@magyar at classify@tens#1#2{%
+  \if\noexpand#20\@@magyar at swaprelax{\@@magyar at classify@zeroes2}\else
+  \ifnum0<0\string#2 \@@magyar at swaprelax{\@@magyar at classify@more#2}\else
+                 \@@magyar at swaprelax{%
+    \expandafter\@@magyar at skipor\expandafter\@@magyar at classify@none
+    \ifcase#1 T\or{c10}\or{c17}\or{c18}\or{c19}\or{c19}\or{c20}\or{c19}\or{c20}\else{c19}\or\else\fi#2}%
+  % ^^^ Dat: it is safe to call \@@magyar at swaprelax here, even if #2 contains \relax
+  \fi\fi\relax
+}
+%** @param #1 zero-count 2..9
+%** @param #2 next token
+\def\@@magyar at classify@zeroes#1#2{%
+  \if\noexpand#20\@@magyar at swaprelax{%
+     %\def\foo#1,{.(#1)}
+     %\message{\expandafter\expandafter\expandafter\foo\expandafter
+     %  \@@magyar at skipor\ifcase3 zero\or one\or two\else three\or\fi,done}
+     \expandafter\@@magyar at skipor\expandafter\@@magyar at classify@zeroes
+     %\ifcase#1 Y\or Y\or 3\or 4\or 5\or 6\or 7\or 8\or 9\or 9\or% Dat: no \else
+     \ifcase#1 Y\or Y\or 3\or 4\or 5\or 6\or 7\or 8\else 9%
+     \or\else\fi}\else% ^^^ Dat: 2 -> 3 ... 8 -> 9, 9 -> 9
+  \ifnum0<0\string#2 \@@magyar at swaprelax{\@@magyar at classify@more#2}\else
+                 \@@magyar at swaprelax{%
+    \expandafter\@@magyar at skipor\expandafter\@@magyar at classify@none
+    \ifcase#1 Z\or Z\or {c13}\or {c14}\or {c14}\or {c14}\or {c15}\or {c15}\or
+    {c15}\else {c16}\or\else\fi#2}%
+  % ^^^ Dat: it is safe to call \@@magyar at swaprelax here, even if #2 contains \relax
+  \fi\fi\relax
+}
+
+% vvv The user interface for suffixing
+
+\def\@@magyar at ccheck#1#2\vfuzz#3{%
+  \if\noexpand#1c\relax\else
+    \@@magyar at error{\string\told\space needs number, not \string`#3'}%
+    \def\reserved at a{c0}%
+  \fi
+}
+
+%** Expands #1 with \the if it is \cs (possibly \count or \toks etc.)
+\def\@@magyar at the#1{%
+  \ifx#1\relax\else\if\noexpand\noexpand\noexpand#1%
+  \expandafter\expandafter\expandafter\the\fi\fi#1%
+}%
+
+\def\@@magyar at firsthfuzz#1#2\hfuzz{#1}
+\def\@@magyar at secondhfuzz#1#2#3\hfuzz{#2}
+%** See docs in magyar.dtx
+\def\@@magyar at zerocite#1{%
+  \ifx[#1\expandafter\@secondoftwo\fi\@thirdofthree\@firstoftwo
+  {\@@magyar at zerocite@lowa[, }% had `['
+  {\@@magyar at zerocite@lowa[]{#1}}%
+}
+\def\@@magyar at zerocite@lowa[#1]#2{[\@@magyar at zerocite@lowb#2,\hbox,${#1}}
+\def\@@magyar at swapvfuzz#1#2\vfuzz{#2#1}
+\def\@@magyar at zerocite@lowb#1#2,{%
+  \ifx\hfuzz#1\hfuzz
+  \else\ifx\hbox#1\@@magyar at swapvfuzz\@@magyar at zerocite@lowc
+  \else\ifx,#1\@@magyar at swapvfuzz\@@magyar at zerocite@lowb{#2,}%
+  \else\expandafter\ifx\csname b@#1#2\endcsname\relax
+    0, \@@magyar at swapvfuzz\@@magyar at zerocite@lowb
+  \else\expandafter\expandafter\expandafter\@@magyar at b@number
+    \expandafter\expandafter\expandafter{\csname b@#1#2\endcsname},
+    \@@magyar at swapvfuzz\@@magyar at zerocite@lowb
+  \fi\fi\fi\fi\vfuzz}
+\def\@@magyar at zerocite@lowc$#1{]#1}
+
+%** Expands to the numeric value of a \b at foobar definition
+%** Dat: with natbib.sty, we get \def\b at foobar{{1}{...}...},
+%**      otherwise something like \def\b at foobar{\... 1}
+%** @param #1 value of a \b at foobar
+\def\@@magyar at b@number{%
+  \expandafter\ifx\csname ver at natbib.sty\endcsname\relax
+    \expandafter\@firstofone
+  \else \expandafter\@@magyar at b@number at natbibone \fi
+}
+\def\@@magyar at b@number at natbibone#1{\@@magyar at b@number at natbibtwo#1.\vfuzz}
+\def\@@magyar at b@number at natbibtwo#1#2\vfuzz{#1}%
+
+\def\@@magyar at zeroaref#1{%
+  % Dat: we cannot use \@ifnextchar here, because it is not expandable
+  \ifx(#1\expandafter\@secondoftwo\fi\@thirdofthree\@firstoftwo
+  {\@@magyar at zeroref}{% Dat: gobble the (
+    \ifx*#1\expandafter\@secondoftwo\fi\@thirdofthree\@firstoftwo
+    {\NotAllowedArefStar\@@magyar at zeropageref}% Dat: gobble the *
+    {\@@magyar at zeroref{#1}}%
+    {\@@magyar at zeroref{#1}}}%
+}
+
+\def\@@magyar at zeroapageref#1{%
+  % Dat: we cannot use \@ifnextchar here, because it is not expandable
+  \ifx*#1\expandafter\@secondoftwo\fi\@thirdofthree\@firstoftwo
+  {\NotAllowedApagerefStar\@@magyar at zeropageref}% Dat: gobble the *
+  {\@@magyar at zeropageref{#1}}%
+}
+
+\def\@@magyar at zeroref#1{%
+  \expandafter\ifx\csname r@#1\endcsname\relax0\else
+    \expandafter\expandafter\expandafter\@@magyar at firsthfuzz\csname r@#1\endcsname00\hfuzz
+  \fi
+}%
+\def\@@magyar at zeroeqref#1{(\@@magyar at zeroref{#1})}%
+\def\@@magyar at zerorefplus#1{\@@magyar at zerorefplus@low#1+\vfuzz}
+\def\@@magyar at zerorefplus@low#1+#2\vfuzz{%
+  \expandafter\ifx\csname r@#1\endcsname\relax0\else
+    \expandafter\expandafter\expandafter\@@magyar at firsthfuzz\csname r@#1\endcsname00\hfuzz
+  \fi
+}%
+\def\@@magyar at zeropageref#1{%
+  \expandafter\ifx\csname r@#1\endcsname\relax0\else
+    \expandafter\expandafter\expandafter\@@magyar at secondhfuzz\csname r@#1\endcsname00\hfuzz
+  \fi
+}%
+
+%** A space might be discared after the suffix, depending on the suffix. So
+%** please use `\told5+adik{} ' to ensure the space.
+%**   May raise `! Package magyar.ldf Error: Unknown suffix `...' for \told', but
+%** emits unchanged suffix to DVI file.
+%**   \atold\apageref emits double article
+%**   \cite, \acite etc. is allowed, but without comma
+%**   \aref({...}), \aref*, \apageref*, \acite* aren't allowed
+%** \refstruc doesn't work inside it, because \refstruc isn't expandable
+%** @example \told4+a+a+a+a+adik raises strange error
+%** @example no -en is provided for -an/-on, to avoid ambiguity
+%** @example \told4+adik: 0-adik 1-s\xF5 2-odik 3-adik 12-edik 10^8-adik
+%** @example augusztus \told20-a: 1-je 2-a 3-a 4-e 5-e 6-a ... (augusztus 20-a)
+%** @example \told3+as: 0-s(??) 1-es 2-es 3-as 4-es 5-\xF6s 10^6-s
+%** @example \told0+ad: 0-ad 1-ed 2-ed 3-ad 5-\xF6d 10^6-ad
+%** @example \told1000+hoz: 0-hoz 3-hoz 6-hoz 8-hoz 100-hoz 10^6-hoz 10^9-hoz 1-hez 4-hez 7-hez 9-hez 10-hez 1000-hez 2-h\xF6z 5-h\xF6z
+%** @example \told5+an: 5-en 2-en 100-an 10^6-n
+%** @example \told5+on: 5-\xF6n 2-n 3-on 100-on 10^6-n
+%** @example \told0+at: 0-t 2-t 10^6-t 1-et 4-et 7-et 9-et 10-et 1000-et 3-at 8-at 6-ot 10^9-ot 5-\xF6t
+%** @example \told1000+ban: 1000-ben
+%** @example \told7+ba: 7-be
+%** @example \told5+nak: 7-nek
+%** @example \told2+ra: 2-re
+%** @example \told4+nal: 4-n\xE9l
+%** @example \told7+bol: 7-b\xF5l
+%** @example \told5+tol: 5-t\xF5l
+%** @example \told3+rol: 3-r\xF3l
+%** @example \told2+ul: 0-ul 1-\xFCl 2-\xFCl 3-ul
+%** @example \told5+odik+hoz
+%** @example \told{300}+szor
+%** @example -i and -ig don't change have alternate forms
+%** @param #1 something that expands to an integer, or `\count...' or `\toks...'
+\DeclareRobustCommand \@@magyar at told{\@@magyar at xtold 0}
+\DeclareRobustCommand\@@magyar at atold{\@@magyar at xtold a}
+\DeclareRobustCommand\@@magyar at Atold{\@@magyar at xtold A}
+\def\@@magyar at xtold#1#2+{\@@magyar at told@low{#2}#1}
+%** @param #1 something that expands to an integer, or `\count...' or `\toks...'
+%** @param #2 add \az? (0: no, a: lowercase A: uppercase)
+\def\@@magyar at told@low#1#2{%
+  % Dat: a level of braces has already been stripped from #1
+  % Dat: negative sign isn't important, because it is skipped by \@@magyar at classify@none
+  \begingroup\begingroup
+  \@safe at activestrue% allow active `:' inside labels
+  \let\@safe at activesfalse\@empty \let\@safe at activestrue\@empty% inside \b at ... emitted by \cite
+  % vvv Dat: gobbles its arg and `-' below
+  %     `\@@magyar at toldas{42}' must be the very end of #1
+  \let\@@magyar at toldas\@gobbletwo
+  \let\-\relax
+%  \let\@@magyar at save@tilde~%
+  \let~\relax% influenced by \@safe at activestrue
+  \let\refstruc\relax  \let\refstrucparen\relax
+  \let \ref\relax \let \pageref\relax \let \cite\relax % all unexpandable, even for \@@magyar at the
+  \let\aref\relax \let\apageref\relax \let\acite\relax
+  \let\Aref\relax \let\Apageref\relax \let\Acite\relax
+  \let\autoref\relax
+  \let\hbox\@firstofone  % Make \hbox{...} work by removing the braces. TODO(pts): Make \hbox to...{...} work.
+  \let\@@magyar at told@optdot\@empty  % The optional dot disappears.
+  %\set at display@protect% \string. Why?? doesn't seem to screw up \r
+  \set at typeset@protect% \relax.
+  \edef\reserved at c{#1-}%
+  \edef\reserved at c{\def\noexpand\reserved at c{\expandafter\@@magyar at the\reserved at c\@empty}}% `\expandafter' is here so `the' and `number' take place
+  %
+  \def\@@magyar at toldas##1{.##1.}% emit the number
+  \let\romannumeral\number
+  \def\refstruc##1{0}%
+  \def\refstrucparen##1{0}%
+  \let\@safe at activestrue\@empty% babel puts these inside \b at ...: % Dat: \def\b at abook{\@safe at activesfalse 2}% (what is \@safe at actives??)
+  \let\@safe at activesfalse\@empty% \b at DuplanJauneau1986 ->\@safe at activesfalse 15
+  \def\hyper@@link[##1]##2##3##4{##4}% Dat: \def\b at abook{\hyper@@link [cite]{}{cite.sokt}{2}}% with hyperref.sty % BUGFIX at Tue Nov 21 03:15:32 CET 2006
+  %
+  \let\ref\@@magyar at zeroref
+  \let\pageref\@@magyar at zeropageref
+  \let\cite\@@magyar at zerocite
+  \let\eqref\@@magyar at zeroeqref
+  %
+  \let\aref\@@magyar at zeroaref \let\Aref\aref % Dat: supports \aref* and \aref(
+  \let\apageref\@@magyar at zeroapageref \let\Apageref\apageref % Dat: supports \apageref* and \apageref(
+  \let\acite\cite \let\Acite\acite
+  %
+  \let\autoref\ref% Dat: SUXX: ``section 1-gyel''
+  \edef\reserved at a{#1}%
+  \edef\reserved at a{\expandafter\@@magyar at the\reserved at a\@empty}% `\expandafter' is here so `the' and `number' take place
+  %\let~\@@magyar at save@tilde% vvv for ~ below etc.
+  \if0#2\else
+    #2% a or A
+    % vvv Dat: we do \az with \romannumeral changed to \number
+    \expandafter\@@magyar at az@set\expandafter{\reserved at a}\hbox$% Dat: \reserved at a is already expanded, as required by \@@magyar at az@set
+    \nobreakspace% Dat: `~' is wrong here, it has been redefined !!
+  \fi
+  \edef\reserved at a{\noexpand\reserved at c\def\noexpand\reserved at a{\reserved at a}}%
+  %
+  \expandafter\expandafter\expandafter\endgroup\reserved at a% keep \reserved at a and \reserved at c
+  %%\show\reserved at a \show\reserved at c \show\@@magyar at toldas
+  % vvv Dat: shows friendly LaTeX error: \told{\refstruc{refstruc=}}+ban
+  \def\refstruc{\@@magyar at error{Cannot use \string\refstruc\space inside \string\told}\@@magyar at refstruc}%
+  \edef\reserved at a{\expandafter\@@magyar at classify@none\expandafter N\reserved at a\vfuzz}%
+  %%\show\reserved at a
+  \expandafter\@@magyar at ccheck\reserved at a..\vfuzz\reserved at c%
+  %\edef\reserved at a{{\ifcase\expandafter\@gobble\reserved at a\space 0\or1\or2\or
+  %  3\or4\or5\or6\or7\or8\or9\or10\or11\or12\or13\or14\or15\or16\or
+  %  8\or8\else 9\fi}}% 20->8 30->8 40->9 % no need for this anymore
+  \edef\reserved at a{{\number\expandafter\@gobble\reserved at a}}% keeps 17,18,19 for +val
+  \expandafter\edef\expandafter\reserved at b\expandafter{\if}.\fi\@@magyar at fs@
+}
+\def\@@magyar at told@optdot{.}
+%** @in \reserved at a is suffix classification in braces: {0}, {1} ... or {16}
+%** @param #1 \@empty or a char token
+\def\@@magyar at told@cont#1{%
+  \reserved at a% add the suffix class, example: {11}
+  #1%\if/\noexpand#1\else#1\fi% add extra char unless `/'
+  \if{.\fi}% close \edef\reserved at b opened in \@@magyar at told
+  % Now: example \reserved at b: \@@magyar at suffix@aS \@@magyar at suffix@sal {11}
+  % Now: example \reserved at b: \@@magyar at suffix@aS \@@magyar at suffix@val {11}
+  % Dat: \reserved at b is now like \@@magyar at suffix@A \@@magyar at suffix@ban
+  % vvv Dat: \aref in \reserved at c may modify \reserved at b, so we call it
+  %     late by \expandafter
+  \expandafter\reserved at c% print the number and the hyphen
+  \reserved at b% print the suffix
+  \endgroup
+}
+% Dat: \told is an unused \cs in LaTeX and its standard packages
+\ifnum\magyar at opt@@told>1
+  \let \told\@@magyar at told
+  \let\atold\@@magyar at atold
+  \let\Atold\@@magyar at Atold
+\else
+  \expandafter\ifx\csname  told\endcsname\relax \let \told\@@magyar at told\fi
+  \expandafter\ifx\csname atold\endcsname\relax \let\atold\@@magyar at atold\fi
+  \expandafter\ifx\csname Atold\endcsname\relax \let\Atold\@@magyar at Atold\fi
+\fi
+\@gobble
+{^}%
+
+% --- hutoday=
+
+% Dat: latex.ltx has \edef for \today, but we have \def
+\def\SafeToday{\the\year/\two at digits{\the\month}/\two at digits{\the\day}:%
+  \two at digits{\the\count@}:\two at digits{\the\count2}}
+
+\ifnum\magyar at opt@@hutoday=0 \@namedef{date\CurrentOption}{\let\today\SafeToday}\@@magyar at skiplong\fi
+%** Same as what latex.ltx has. Expansion doesn't change it, doesn't contain
+%** accents.
+\@namedef{date\CurrentOption}{%
+  \def\today{%
+    \number\year.~\ifcase\month\or
+    janu\'ar\or febru\'ar\or m\'arcius\or
+    \'aprilis\or m\'ajus\or j\'unius\or
+    j\'ulius\or augusztus\or szeptember\or
+    okt\'ober\or november\or december\fi
+    \space\number\day.\hbox{}}%
+  }
+% vvv Dat: ondate... and \ontoday is specific to magyar.ldf
+\@namedef{ondate\CurrentOption}{%
+  \number\year.~\ifcase\month\or janu\'ar\or febru\'ar\or m\'arcius\or
+  \'aprilis\or m\'ajus\or j\'unius\or j\'ulius\or augusztus\or szeptember\or
+  okt\'ober\or november\or december\fi\space\ifcase\day\or
+    1-j\'en\or  2-\'an\or  3-\'an\or  4-\'en\or  5-\'en\or
+    6-\'an\or  7-\'en\or  8-\'an\or  9-\'en\or 10-\'en\or
+   11-\'en\or 12-\'en\or 13-\'an\or 14-\'en\or 15-\'en\or
+   16-\'an\or 17-\'en\or 18-\'an\or 19-\'en\or 20-\'an\or
+   21-\'en\or 22-\'en\or 23-\'an\or 24-\'en\or 25-\'en\or
+   26-\'an\or 27-\'en\or 28-\'an\or 29-\'en\or 30-\'an\or
+   31-\'en\fi}
+\edef\reserved at a{%
+  \noexpand\addto\expandafter\noexpand\csname extras\CurrentOption\endcsname{%
+  \noexpand\babel at save\noexpand\ontoday
+  \let\noexpand\ontoday\expandafter\noexpand\csname ondate\CurrentOption\endcsname}
+}
+\reserved at a
+\@gobble
+{^}%
+
+% --- refstruc=
+
+\if0\magyar at opt@@refstruc \@@magyar at skiplong\fi
+\def\@@magyar at nonumbers@skipa#1\@@magyar at nonumbers@s{#1\@@magyar at nonumbers@a}
+%** Changes arabic and roman numbers to 1 or i, respectively.
+%** Usage: \typeout{((\@@magyar at nonumbers@a 35.2.iv\hfuzz))} -> ((1.1.i))
+\def\@@magyar at nonumbers@a#1{%
+  \ifx#1\hfuzz \expandafter\@gobble
+  \else\if\noexpand#101% !! Imp: 1<1\string#1
+  \else\if\noexpand#111%
+  \else\if\noexpand#121%
+  \else\if\noexpand#131%
+  \else\if\noexpand#141%
+  \else\if\noexpand#151%
+  \else\if\noexpand#161%
+  \else\if\noexpand#171%
+  \else\if\noexpand#181%
+  \else\if\noexpand#191%
+  \else\if\noexpand#1mi%
+  \else\if\noexpand#1di%
+  \else\if\noexpand#1ci%
+  \else\if\noexpand#1li%
+  \else\if\noexpand#1xi%
+  \else\if\noexpand#1vi%
+  \else\if\noexpand#1ii%
+  \else\if\noexpand#1MI%
+  \else\if\noexpand#1DI%
+  \else\if\noexpand#1CI%
+  \else\if\noexpand#1LI%
+  \else\if\noexpand#1XI%
+  \else\if\noexpand#1VI%
+  \else\if\noexpand#1II%
+  \else\noexpand#1\@@magyar at nonumbers@skipa
+  \fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi \fi
+  \@@magyar at nonumbers@s
+}
+\def\@@magyar at nonumbers@s#1{%
+  \ifx#1\hfuzz \expandafter\@gobble
+  \else\if\noexpand#10%
+  \else\if\noexpand#11%
+  \else\if\noexpand#12%
+  \else\if\noexpand#13%
+  \else\if\noexpand#14%
+  \else\if\noexpand#15%
+  \else\if\noexpand#16%
+  \else\if\noexpand#17%
+  \else\if\noexpand#18%
+  \else\if\noexpand#19%
+  \else\if\noexpand#1m%
+  \else\if\noexpand#1d%
+  \else\if\noexpand#1c%
+  \else\if\noexpand#1l%
+  \else\if\noexpand#1x%
+  \else\if\noexpand#1v%
+  \else\if\noexpand#1i%
+  \else\if\noexpand#1M%
+  \else\if\noexpand#1D%
+  \else\if\noexpand#1C%
+  \else\if\noexpand#1L%
+  \else\if\noexpand#1X%
+  \else\if\noexpand#1V%
+  \else\if\noexpand#1I%
+  \else\noexpand#1\@@magyar at nonumbers@skipa
+  \fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi \fi
+  \@@magyar at nonumbers@s
+}
+
+\let\@@magyar at toldas\@gobble
+\def\@@magyar at strucname@part{r\'esz\@@magyar at toldas{4}}% SUXX: may not contain \-; !! r\xE9sszel (vs. r\xE9szszel)
+\def\@@magyar at strucname@chapter{fejezet\@@magyar at toldas{9}}% !! fejezettel
+\def\@@magyar at strucname@appendix{f\"ug\-gel\'ek\@@magyar at toldas{4}}% !! fuggelekkel
+\def\@@magyar at strucname@section{szakasz\@@magyar at toldas{20}}%
+\def\@@magyar at strucname@subsection{al\-sza\-kasz\@@magyar at toldas{20}}%
+\def\@@magyar at strucname@subsubsection{al\-al\-szakasz\@@magyar at toldas{20}}%
+\def\@@magyar at strucname@subsubsubsection{al\-al\-al\-szakasz\@@magyar at toldas{20}}%
+\def\@@magyar at strucname@paragraph{bekezd\'es\@@magyar at toldas{4}}%
+\def\@@magyar at strucname@subparagraph{albekezd\'es\@@magyar at toldas{4}}%
+\def\@@magyar at strucname@subsubparagraph{alalbekezd\'es\@@magyar at toldas{4}}%
+\def\@@magyar at strucname@figure{\'ab\-ra\@@magyar at toldas{4}}% !! \xE1br\xE1ban etc.
+\def\@@magyar at strucname@table{t\'ab\-l\'azat\@@magyar at toldas{6}}%
+\def\@@magyar at strucname@equation{egyenlet\@@magyar at toldas{7}}%
+\def\@@magyar at strucname@footnote{l\'ab\-jegy\-zet\@@magyar at toldas{7}}%
+\def\@@magyar at strucname@item{elem\@@magyar at toldas{4}}% !! elemmel etc.
+\def\@@magyar at strucname@FancyVerbLine{sor\@@magyar at toldas{8}}% !! sorral
+\def\@@magyar at strucname@theorem{t\'e-tel\@@magyar at toldas{4}}% !! t\xE9tellel
+
+%** Must be expandable.
+%** @param #1 `section' etc.
+%** @expands to its name in English
+\def\@@magyar at strucname#1{#1}
+%** @param #1 `section' etc.
+%** @expands to its name in Hungarian
+\def\@@magyar at strucname@hu#1{\csname @@magyar at strucname@#1\endcsname}
+
+%** Keeps only structure number, discards page number etc.
+\def\@@magyar at refstruc@parse#1#2\vfuzz{%
+  \ifx\relax#1\let\reserved at a\relax
+  \else\def\reserved at a{#1}\fi
+}%
+%** Retrieves the structure name (arg #4) from arg 2 of a \newlabel emitted
+%** by hyperref.sty.
+%** @example \newlabel{fig:vonal}{{1}{1}{my title}{figure.1}{}}
+%**        \@namedef{r at fig:vonal}{{1}{1}{my title}{figure.1}{}}
+%**          -> extract `figure' to \reserved at c
+\def\@@magyar at refstruc@parsehyname#1#2#3#4#5\vfuzz{%
+  \ifx\relax#1%
+  \else\expandafter\@@magyar at refstruc@parsehynamedot#4\vfuzz\fi
+}%
+\def\@@magyar at refstruc@parsehynamedot#1.#2\vfuzz{%
+  \expandafter\ifx\csname @@magyar at strucname@#1\endcsname\relax
+  \else\def\reserved at c{#1}\fi
+}
+
+%** @param #1 name of a count register (e.g c at part)
+\def\@@magyar at refstruc@setcnt#1{%
+  \expandafter\ifx\csname#1\endcsname\relax\expandafter\@tempcnta
+  \else\csname#1\endcsname\fi
+}%
+
+%** @param #1 a label name
+\def\@@magyar at refstruc@ref#1{%
+  \ref{#1}.~%
+}
+
+%** May not touch \reserved at a
+\def\@@magyar at refstruc@split#1+#2\vfuzz#3{%
+  \if\noexpand#30\else\@@magyar at refstruc@ref{#1}\fi
+  \ifx\vfuzz#2%
+    \textbf{??}%
+    \G at refundefinedtrue
+  \else
+    \begingroup
+      \@safe at activestrue% so active `:' etc. will work inside \csname...
+      \edef\reserved at c{\noexpand\@@magyar at refstruc@splitlow
+	\expandafter\ifx\csname r@#1\endcsname\relax\relax\else
+	\expandafter\noexpand\csname r@#1\endcsname\fi}%
+      % ^^^ Dat: would emit `undefined' instead of `\relax' w/o \ifx
+    \expandafter\endgroup\reserved at c{#2}%
+  \fi
+}
+
+%** @param #1 csname \r at foo:bar
+%** @param #2 suffix to add
+\def\@@magyar at refstruc@splitlow#1#2{%
+  \ifx#1\relax
+    \textbf{??+#2}%
+    \G at refundefinedtrue
+  \else
+    \expandafter\@@magyar at refstruc@parse#1..\vfuzz%
+    \@@magyar at refstruc@work#1%
+    \let\@@magyar at save@m\-%
+    \let\-\relax
+    \let\@@magyar at toldas\relax
+    \edef\reserved at c{\expandafter\@@magyar at strucname\expandafter{\reserved at c}}%
+    \let\-\@@magyar at save@m
+    \let\@@magyar at suffix@at\@@magyar at suffix@st% fix the -t suffix
+    \ifx\reserved at b\@empty\else
+      \@@magyar at refstruc@splitb#2\vfuzz% strip `+' from the end of #2
+    \fi
+  \fi
+}
+
+\def\@@magyar at refstruc@splitb#1+\vfuzz{%
+  \expandafter\@@magyar at told\reserved at c+#1{}% fejezet -> fejezetben
+}
+
+%** The +val suffix does not produce the desired result.
+%** @param #1 \ref id or with \told
+%** (@param #2 1 to prefix with 1\ref{...}.~' in Hungarian order)
+%** @example \refstruc{sec:foo}
+%** @example \refstruc{sec:foo+as+an} 
+%** May not touch \reserved at a
+\def\@@magyar at refstruc@name#1{%
+  \begingroup
+  \begingroup
+    \@safe at activestrue% so active `:' etc. will work inside \csname...
+    \edef\reserved at c{\noexpand\@@magyar at refstruc@namelow
+      \expandafter\ifx\csname r@#1\endcsname\relax\relax\else
+      \expandafter\noexpand\csname r@#1\endcsname\fi}%
+    % ^^^ Dat: would emit `undefined' instead of `\relax' w/o \ifx
+  \expandafter\endgroup\reserved at c{#1}%
+}
+
+%** @param #1 csname \r at foo:bar
+%** @param #2 foo:bar
+%** @param #3 1 to prefix with 1\ref{...}.~' in Hungarian order)
+\def\@@magyar at refstruc@namelow#1#2#3{%
+  \ifx#1\relax
+    \@@magyar at refstruc@split#2+\vfuzz#3% ends by +suffix, needs \told
+  \else
+    \expandafter\@@magyar at refstruc@parse#1..\vfuzz% sets \reserved at a to ref target
+    %%\show\reserved at a% first arg of ref, i.e section number, eg. `1.2.3' -- or \relax
+    \if\noexpand#30\else
+      \begingroup% Dat: \ref might redefine \reserved at a, especially in hyperref.sty
+      \@@magyar at refstruc@ref{#2}\endgroup\fi
+    \@@magyar at refstruc@work#1%
+    \expandafter\@@magyar at strucname\expandafter{\reserved at c}%
+  \fi
+  \endgroup
+}
+
+\def\@@magyar at appendix@chapapp{\appendixname}%
+
+%** Input is \reserved at a, output is \reserved at c
+%** @param #1 the control sequence \r at foo:bar
+\def\@@magyar at refstruc@work#1{%
+  \edef\reserved at a{\expandafter\@@magyar at nonumbers@a\reserved at a\hfuzz}%
+  %\expandafter\lowercase\expandafter{\expandafter\def\expandafter\reserved at a\expandafter{\reserved at a}}%
+  % ^^^ Dat: don't do lowercasing, deliberately.
+  % Imp: referring from \@alph sections such as the appendix
+  \@@magyar at refstruc@setcnt{c at part}1
+  \@@magyar at refstruc@setcnt{c at chapter}1
+  \@@magyar at refstruc@setcnt{c at section}1
+  \@@magyar at refstruc@setcnt{c at subsection}1
+  \@@magyar at refstruc@setcnt{c at subsubsection}1
+  \@@magyar at refstruc@setcnt{c at subsubsubsection}1
+  \@@magyar at refstruc@setcnt{c at paragraph}1
+  \@@magyar at refstruc@setcnt{c at subparagraph}1
+  \@@magyar at refstruc@setcnt{c at subsubparagraph}1
+  \let\reserved at c\relax
+  \expandafter\@@magyar at refstruc@parsehyname#1....\vfuzz%
+  \ifx\reserved at c\relax% hyperref.sty and nameref.sty has helped us
+  \def\reserved at c{subsubparagraph}\edef \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{subparagraph}\edef    \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{paragraph}\edef       \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{subsubsubsection}\edef\reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{subsubsection}\edef   \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{subsection}\edef      \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{section}\edef         \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{chapter}\edef         \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{appendix}\edef        \reserved at b{\expandafter\ifx\csname c at chapter\endcsname\relax\else\@Alph\c at chapter\fi}\ifx\reserved at a\reserved at b\else% Imp: do this without changing counters in \appendix
+  \def\reserved at c{part}\edef            \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  %%\show\@chapapp \show\@@magyar at appendix@chapapp
+  \ifx\@chapapp\@@magyar at appendix@chapapp% we're in an appendix referring to a normal chapter
+    \def\thechapter{\@arabic\c at chapter}\fi
+  \def\reserved at c{subsubparagraph}\edef \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{subparagraph}\edef    \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{paragraph}\edef       \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{subsubsubsection}\edef\reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{subsubsection}\edef   \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{subsection}\edef      \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{section}\edef         \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  \def\reserved at c{chapter}\edef         \reserved at b{\csname the\reserved at c\endcsname}\ifx\reserved at a\reserved at b\else
+  %
+  \@latex at error{Unknown structure level for ref \string`\reserved at a';
+    \reserved at b}\@ehc%
+  \def\reserved at c{??}% Dat: must be expandable
+  \let\reserved at b\@empty
+  \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+}
+
+\def\@@magyar at refstruc@hu#1{\@@magyar at refstruc@name{#1}1}%
+% Imp: Undocumented: \refstrucparen can be used instead of \refstruc
+% to format the section number inside parentheses.
+\def\@@magyar at refstrucparen@hu#1{%
+  \begingroup
+  \def\@@magyar at refstruc@ref##1{\told(\ref{##1})+es{}~}%
+  \@@magyar at refstruc@name{#1}1%
+  \endgroup}%
+\def\@@magyar at refstruc#1{\@@magyar at refstruc@name{#1}0~\ref{#1}}%
+\def\@@magyar at refstrucparen#1{\@@magyar at refstruc@name{#1}0~(\ref{#1})}%
+
+\expandafter\addto\csname extras\CurrentOption\endcsname{%
+  \babel at save\@@magyar at refstruc
+  \babel at save\@@magyar at strucname
+  \let\@@magyar at refstruc \@@magyar at refstruc@hu
+  \let\@@magyar at refstrucparen \@@magyar at refstrucparen@hu
+  \let\@@magyar at strucname\@@magyar at strucname@hu
+}
+
+\ifnum\magyar at opt@@refstruc \expandafter\ifx\csname refstruc\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \DeclareRobustCommand\refstruc{\@@magyar at refstruc}%
+  \DeclareRobustCommand\refstrucparen{\@@magyar at refstrucparen}%
+\fi
+\@gobble
+{^}
+
+% --- Printing dates; emitdate=
+
+\ifnum\magyar at opt@@emitdate=0 \@@magyar at skiplong\fi
+%** @param #1 1..12 (month number)
+\def\@@magyar at month@a#1{\two at digits{#1}}%
+\def\@@magyar at month@b#1{\ifcase#1\or janu\'ar\or febru\'ar\or m\'arcius\or
+  \'aprilis\or m\'ajus\or j\'unius\or j\'ulius\or augusztus\or szeptember\or
+  okt\'ober\or november\or december\fi}%
+\def\@@magyar at month@c#1{\ifcase#1\or jan\or feb\or m\'arc\or
+  \'apr\or m\'aj\or j\'un\or j\'ul\or aug\or szept\or
+  okt\or nov\or dec\fi.\hbox{}}%
+\def\@@magyar at month@d#1{\@Roman{#1}}%
+
+\def\@@magyar at four@digits#1{%
+  \ifnum#1<10 000\else\ifnum#1<100 00\else\ifnum#1<1000 0\fi\fi\fi\number#1%
+}
+
+\def\@@magyar at date@a#1#2#3{#1-\@@magyar at month@a{#2}-\two at digits{#3}}
+\def\@@magyar at date@b#1#2#3{#1.~\@@magyar at month@b{#2} \number#3\@@magyar at told@optdot\hbox{}}% Dat: \hbox is to force \frenchspacing
+\def\@@magyar at date@c#1#2#3{#1.~\@@magyar at month@c{#2} \number#3\@@magyar at told@optdot\hbox{}}
+\def\@@magyar at date@d#1#2#3{#1.~\@@magyar at month@d{#2}.\ \number#3\@@magyar at told@optdot\hbox{}}
+\def\@@magyar at date@e#1#2#3{#1.~\@@magyar at month@a{#2}.\ \two at digits{#3}\@@magyar at told@optdot\hbox{}}
+\def\@@magyar at date@f#1#2#3{#1.~\@@magyar at month@b{#2}}
+\def\@@magyar at date@g#1#2#3{#1.~\@@magyar at month@b{#2} \number#3}% Dat: \told{\@@magyar at date@g{1848}{3}{15}}+e{}
+\def\@@magyar at date@h#1#2#3{#1~\@@magyar at month@b{#2}}% Imp: suffixes to months
+\def\@@magyar at date@i#1#2#3{#1/\@@magyar at month@a{#2}/\two at digits{#3}}% not Hungarian
+
+\def\@@magyar at parsedate@a#1-#2-#3!#4\hfuzz{% ISO date: YYYY-MM-DD
+  \ifx\hfuzz#4\hfuzz\else \ifnum1<1\string#1\relax \ifnum1<1\string#2\relax \ifnum1<1\string#3\relax
+  \def\reserved at a{\@@magyar at fixdate{#1}{#2}{#3}}%
+  \fi\fi\fi\fi
+}
+\def\@@magyar at parsedate@b#1/#2/#3!#4\hfuzz{% LaTeX date: YYYY/MM/DD
+  \ifx\hfuzz#4\hfuzz\else \ifnum1<1\string#1\relax \ifnum1<1\string#2\relax \ifnum1<1\string#3\relax
+  \def\reserved at a{\@@magyar at fixdate{#1}{#2}{#3}}%
+  \fi\fi\fi\fi
+}
+\def\@@magyar at parsedate@c#1.#2.#3!#4\hfuzz{% English date: YYYY.DD.MM
+  \ifx\hfuzz#4\hfuzz\else \ifnum1<1\string#1\relax \ifnum1<1\string#2\relax \ifnum1<1\string#3\relax
+  \def\reserved at a{\@@magyar at fixdate{#1}{#3}{#2}}%
+  \fi\fi\fi\fi
+}
+\def\@@magyar at mon@jan{1}%
+\def\@@magyar at mon@feb{2}%
+\def\@@magyar at mon@mar{3}%
+\def\@@magyar at mon@apr{4}%
+\def\@@magyar at mon@maj{5}%
+\def\@@magyar at mon@may{5}% english.ldf
+\def\@@magyar at mon@jun{6}%
+\def\@@magyar at mon@jul{7}%
+\def\@@magyar at mon@aug{8}%
+\def\@@magyar at mon@sze{9}%
+\def\@@magyar at mon@sep{9}% english.ldf
+\def\@@magyar at mon@okt{10}%
+\def\@@magyar at mon@oct{10}% english.ldf
+\def\@@magyar at mon@nov{11}%
+\def\@@magyar at mon@dec{12}%
+\def\@@magyar at parsedate@d#1. #2#3#4#5 #6!#7\hfuzz{% {2003. oktober 25} with \catcodes 12 and 10
+  \ifx\hfuzz#7\hfuzz\else
+    % Dat: now: {#1} is {2003}, {#2#3#4#5} is {oktober}, {#6} is {25}
+    \ifnum1<1\string#1\relax \ifnum1<1\string#6\relax
+      \lowercase{%
+        \expandafter\ifx\csname @@magyar at mon@#2#3#4\endcsname\relax\else
+        %%\errmessage{(#1)(#2#3#4)(#6)}%
+        \edef\reserved at a{\noexpand\@@magyar at fixdate{\number#1}{\csname @@magyar at mon@#2#3#4\endcsname}{\number#6}}\fi
+      }%
+  \fi\fi\fi
+}
+\def\@@magyar at parsedate@e#1#2#3#4 #5, #6!#7\hfuzz{% {October 25, 2003} with \catcodes 12 and 10
+  \ifx\hfuzz#7\hfuzz\else
+    \ifnum1<1\string#5\relax \ifnum1<1\string#6\relax
+      \lowercase{%
+        \expandafter\ifx\csname @@magyar at mon@#1#2#3\endcsname\relax\else
+        \edef\reserved at a{\noexpand\@@magyar at fixdate{\number#6}{\csname @@magyar at mon@#1#2#3\endcsname}{\number#5}}\fi
+      }%
+  \fi\fi\fi
+}
+
+\def\@@magyar at parsedate@f#1/#2/#3:#4!#5\hfuzz{% LaTeX default \today: YYYY/MM/DD:XX:YY
+  \ifx\hfuzz#5\hfuzz\else \ifnum1<1\string#1\relax \ifnum1<1\string#2\relax \ifnum1<1\string#3\relax
+  \def\reserved at a{\@@magyar at fixdate{#1}{#2}{#3}}%
+  \fi\fi\fi\fi
+}
+
+\def\@@magyar at stripdot@lowa#1.\relax{#1\relax}%
+\def\@@magyar at stripdot@lowb#1\relax#2\relax{#1}%
+%** by pts at fazekas.hu at Sun Jul 27 15:17:57 CEST 2003
+%** Expands to #1, with a single optional dot (token `.') at the end removed.
+%** @param #1 a token list not containing `\relax' (sic)
+\def\@@magyar at stripdot#1{\expandafter\@@magyar at stripdot@lowb\@@magyar at stripdot@lowa#1\relax.\relax}%
+
+%** Definies \reserved at a to {{YYYY}{MM}{DD}} (possibly fewer digits). Parsing
+%** is not perfect, but can distinguish between the known formats
+%** @param #1 a date in any format, will be expanded
+\def\@@magyar at parsedate#1{%
+  %\let\@@protect\protect \let\protect\@gobble \afterassignment\restore at protect
+  \begingroup
+    \def\today{\the\year-\the\month-\the\day}% ISO format
+    \let\protect\string
+    \let\'\@firstofone% Dat: (j\'unius, janu\'ar, okt\'ober) date won't contain other accents -- I hope
+    \let~\space
+    % ^^^ change `2003.~okt\'ober 25.' to `2003. oktober 25.'
+    \edef\reserved at b{\def\noexpand\reserved at b{#1}}%
+  \expandafter\endgroup\reserved at b
+  \edef\reserved at b{\expandafter\@@magyar at stripdot\expandafter{\reserved at b}}%
+  %%\show\reserved at b\tracingmacros1
+  % vvv Wizardry: deep, parsing dates
+  \let\reserved at a\@empty \expandafter\@@magyar at parsedate@a\reserved at b!--!\hfuzz
+  \ifx\reserved at a\@empty \expandafter\@@magyar at parsedate@f\reserved at b!//:!\hfuzz \fi
+  \ifx\reserved at a\@empty \expandafter\@@magyar at parsedate@b\reserved at b!//!\hfuzz \fi
+  \ifx\reserved at a\@empty \expandafter\@@magyar at parsedate@c\reserved at b!..!\hfuzz \fi
+  \ifx\reserved at a\@empty \expandafter\@@magyar at parsedate@d\reserved at b!. xyz !\hfuzz \fi
+  \ifx\reserved at a\@empty \expandafter\@@magyar at parsedate@e\reserved at b!xyz , !\hfuzz \fi
+  %%\show\reserved at a
+  \ifx\reserved at a\@empty
+    \@@magyar at error{Unrecognised date: \reserved at b}%
+    %\@@magyar at fixdate{0}{1}{1}}%
+    \def\reserved at a{{0}{1}{1} {\noexpand\reset at font\noexpand\bfseries \string?date\string?}}%
+  \else
+    \reserved at a% calls \@@magyar at fixdate, which sets \reserved at a
+  \fi
+  %%\show\reserved at a
+}%
+%** Definies \reserved at a to {{YYYY}{MM}{DD}} (possibly fewer digits)
+%** @param #1 year (50..99 += 1900, 0..49 += 2000)
+%** @param #2 month (1..12)
+%** @param #3 day of month (1..31), validity of 29..31 not verified
+\def\@@magyar at fixdate#1#2#3{%
+  \edef\reserved at a{\number#1}%
+  \ifnum\reserved at a<0   \def\reserved at a{0}\@@magyar at error{Year too small: #1}\else
+  \ifnum\reserved at a<10  \edef\reserved at a{200\reserved at a}\else
+  \ifnum\reserved at a<50  \edef\reserved at a{20\reserved at a}\else
+  \ifnum\reserved at a<100 \edef\reserved at a{19\reserved at a}\else
+  \ifnum\reserved at a<10000 \else
+                        \def\reserved at a{0}\@@magyar at error{Year too large: #1}%
+  \fi\fi\fi\fi\fi
+  \ifnum#2<1  \@@magyar at error{Month too small: #2}\fi% Imp: reset to 0?
+  \ifnum#2>12 \@@magyar at error{Month too large: #2}\fi
+  \ifnum#3<1  \@@magyar at error{Day of month too small: #3}\fi% Imp: reset to 0?
+  \ifnum#3>31 \@@magyar at error{Day of month too large: #3}\fi
+  \edef\reserved at a{{\reserved at a}{\number#2}{\number#3}}%
+}
+
+%** Usage: \magyar at emitdate{FMT}{DATE} or \magyar at emitdate[SUFFIX]{FMT}{DATE}
+%** @example [\emitdate{b}{October 25, 2003}]
+%** @example %[\emitdate{b}{x-y-z}]% ! Package magyar.ldf Error: Unrecognised date: x-y-z.
+%** @example A mai d\xE1tum: [\emitdate{b}{\today}].
+%** @example [\emitdate[e]{g}{1848.15.3}] a nap, mikor elhangzott a Nemzeti dal.
+%** @example [\emitdate{b}{1956-10-23}]
+%** @example \told{\@@magyar at date@g{1848}{3}{115}}+a{} 
+%** @param SUFFIX any suffix for \told, e.g `e' or `adik+an'
+%** @param DATE date in any format, will be expanded
+%** @param FMT a single letter, specifies the format of the emitted date
+%**   a: 1848-03-15 (ISO d\xE1tumform\xE1tum, 2002-t\xF5l(?) a magyar helyes\xEDr\xE1s r\xE9sze)
+%**   b: 1848.\ m\xE1rcius 15.
+%**   c: 1848.\ m\xE1rc.\ 15.
+%**   d: 1848.\ III.\ 15.
+%**   e: 1848.\ 03.\ 15.
+%**   f: 1848. m\xE1rcius k\xF6zepe
+%**   g: 1848. m\xE1rcius 15[-e reggele]
+%**   h: 1848 m\xE1rcius [h\xF3napj\xE1nak k\xF6zepe, m\xE1rcius\xE1nak k\xF6zepe, m\xE1rcius\xE1ban stb.] birtokos rag
+%** english.ldf: `October 25, 2003' or [UK]: `25th October 2003'
+\def\@@magyar at emitdate{%
+  \@ifnextchar[\@@magyar at emitdate@opt{\@@magyar at emitdate@opt[]}%]
+}
+\def\@@magyar at emitdate@opt[#1]#2#3{%
+  \begingroup
+    \@@magyar at parsedate{#3}%
+    % Imp: error message if \@@magyar at told is undefined
+    %\show\reserved at a
+    \edef\reserved at a{%
+      \ifx\vfuzz#1\vfuzz            \expandafter\noexpand\csname @@magyar at date@#2\endcsname\reserved at a
+      \else \noexpand\@@magyar at told{\expandafter\noexpand\csname @@magyar at date@#2\endcsname\reserved at a}+#1{}\fi
+    }%
+    %\show\reserved at a
+    %%\show~
+    %\show\reserved at a% \told {\@@magyar at date@g {1848}{3}{15}}+e{}
+    \reserved at a
+  \endgroup
+}
+
+\ifnum\magyar at opt@@emitdate \expandafter\ifx\csname emitdate\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \let\emitdate\@@magyar at emitdate
+\fi
+\@gobble
+{^}%
+
+% --- titleskip=
+
+\ifx\magyar at opt@@titleskip\magyar@@unchanged
+  \def\magyar at opt@@titleskip{\enspace}%  for the appendix with appendixdot=no
+\@@magyar at skiplong\fi
+  \expandafter\addto\csname extras\CurrentOption\endcsname{\magyar@@seccntfix}%
+  \let\magyar@@seccntfix\@empty
+  \let\magyar@@default at seccntformat\@seccntformat
+  \AtBeginDocument{%
+    % vvv \ifx added for compatiblity with other packages redefining \@seccntformat _after_ magyar.ldf has been loaded
+    \ifx\@seccntformat\magyar@@default at seccntformat
+      % \@seccntformat affects dot after the section number in the main text.
+      % We don't change the TOC file, because we've changed \numberline. Also
+      % \ps at headings in book.cls already contains a dot.
+      \def\magyar@@seccntfix{%
+        \ifx\@seccntformat\@gobble\else
+          \babel at save\@seccntformat
+          \def\@seccntformat##1{\csname the##1\endcsname.\magyar at opt@@titleskip}%
+        \fi
+      }
+    \fi
+  }
+  \@gobble
+{^}%
+
+% --- footnote=
+
+\if0\magyar at opt@@footnote \@@magyar at skiplong\fi
+  %** Overrides latex.ltx. Expand old contents of \cl@#2 only once.
+  \def\@addtoreset#1#2{%
+    \begingroup
+      \edef\reserved at a{\noexpand\@elt{#1}}%
+      \expandafter\magyar at fo@consra\csname cl@#2\endcsname\gdef
+    \endgroup
+  }
+  %** Similar to \@cons in latex.ltx
+  %** Appends first-level expansion of \reserved at a
+  %** @param #1 a \cs
+  %** @param #2 \def or \gdef
+  \def\magyar at fo@consra{\expandafter\magyar at fo@cons\expandafter{\reserved at a}}%
+  %** @param #1 tokens to append
+  %** @param #2 a \cs
+  %** @param #3 \def or \gdef
+  \def\magyar at fo@cons#1#2#3{\expandafter#3\expandafter#2\expandafter{#2#1}}%
+
+  % vvv Dat: \@definecounter can be called twice, \newcounter cannot
+  \@definecounter{footnote at add}% \newcounter{footnote at add}
+  %** Number of times footnote numbering has been reset
+  \@definecounter{footnote at ch}
+
+  \def\magyar at fo@pickzero#1#2#3\hfuzz#4{%
+    \ifx\relax#1\else \def#4{{#1}{#2}}\fi% pick {#1}{#2}
+  }
+  %** Dat: footnotes inside \begin{minipage} are not affected -- intentionally.
+  %** Will be called by \stepcounter{...} after `\advance\c at footnote1'
+  \def\magyar at fo@resetzero at afterpage{%
+    {% { is better \begingroup, because { works in a tabular
+    \@tempcnta\c at footnote@add
+    \advance\@tempcnta\c at footnote
+    \let\reserved at a\@empty% default
+    % Dat: we ignore \@roman etc. in \thefootnote
+    \expandafter\expandafter\expandafter\magyar at fo@pickzero\csname r at footnote&\the\c at footnote@ch&\the\@tempcnta\endcsname00\hfuzz\reserved at a% this footnote
+    \ifx\reserved at a\@empty \G at refundefinedtrue\fi
+    %
+    \def\magyar at fo@@prevfn{-}% default
+    \advance\@tempcnta\m at ne
+    \expandafter\expandafter\expandafter\magyar at fo@pickzero\csname r at footnote&\the\c at footnote@ch&\the\@tempcnta\endcsname00\hfuzz\magyar at fo@@prevfn% previous footnote
+    \advance\@tempcnta\@ne
+    %
+    \ifx\reserved at a\magyar at fo@@prevfn\else
+      % Restart footnote numbering (from 1) if \label is missing for previous
+      % footnote, or \label reports that prev and this footnotes aren't on the
+      % same page.
+      \global\advance\c at footnote@add\c at footnote
+      \global\advance\c at footnote@add\m at ne
+      \global\c at footnote\@ne
+    \fi
+    \def\@currentlabel{\noexpand\number\c at page}%
+    % ^^^ Dat: \noexpand is here to make \number\c at page expanded during \shipout
+    \ifx\@listdepth\@mplistdepth% inside \begin{minipage}
+      % vvv Dat: expand \thepage both early (minipage) and late (real page)
+      \edef\@currentlabel{\@currentlabel-\thepage}%
+    \fi
+    \edef\reserved at a{\noexpand\label{footnote&\the\c at footnote@ch&\the\@tempcnta}}%
+    % ^^^ Dat: the \label command above produces correct warning (LaTeX
+    %     Warning: Label(s) may have changed. Rerun to get cross-references
+    %     right.), and it also produces `LaTeX Warning: There were undefined
+    %     references.' in case a footnote is removed or changed, and also for
+    %     the very first run. Fine.
+    \reserved at a
+    }%\endgroup
+  }  
+
+  \let\magyar at fo@resetzero\relax
+
+  %\magyar at fo@cons{XY}\cl at footnote\gdef
+  \magyar at fo@cons{\magyar at fo@resetzero}\cl at footnote\gdef
+
+  %\def\magyar at fo@resetadd{%
+  %  \global\advance\c at footnote\c at footnote@add
+  %  \global\c at footnote@add\z@
+  %}
+  \def\magyar at fo@aftergrouprelax#1{%
+    \ifx#1\relax\else
+      \aftergroup#1%
+      \expandafter\magyar at fo@aftergrouprelax
+    \fi
+  }
+
+  \def\magyar at fo@mtostar#1{%
+    \if#1m%
+      *\expandafter\magyar at fo@mtostar
+    \fi
+  }
+  %** Producing `m's based on the idea of David Kastrup.
+  %** The default `*' character is in raised position, and we also move it to
+  %** \@textsuperscript, so it will be double raised. But never mind.
+  \def\magyar at fo@thefootnote at stars{\expandafter\magyar at fo@mtostar\romannumeral\number\c at footnote000A}%
+  \def\magyar at fo@thefootnote at starsspmax{\ifcase\c at footnote\or*\or**\or***\or\dag\or\dag\dag\or\dag\dag\dag\else*\the\c at footnote\fi}%
+  \def\magyar at fo@thefootnote at arabic{\@arabic\c at footnote}
+  \def\magyar at fo@thempfootnote at stars{\expandafter\magyar at fo@mtostar\romannumeral\number\c at mpfootnote000 A}%
+  \def\magyar at fo@thempfootnote at starsspmax{\ifcase\c at mpfootnote\or*\or**\or***\or\dag\or\dag\dag\or\dag\dag\dag\else*\the\c at mpfootnote\fi}%
+  \def\magyar at fo@thempfootnote at arabic{\@arabic\c at mpfootnote}
+
+  % !! indent=article must work within \maketitle for article.cls etc.
+
+  %** Copied from article.cls, added \,.
+  %** Has #1, but partially applied here
+  \def\magyar at fo@indent at articlesp{%
+    \parindent1em % SUXX: impossible to acquire default value
+    % Dat: don't use \@makefnmark here, because it puts the footnote mark
+    %      only to the main text
+    \noindent\hb at xt@1.8em{\hss\@textsuperscript{\normalfont\@thefnmark\,}}%
+  }
+  %** Same as \@makefntext in article.cls
+  %** Has #1, but partially applied here
+  \def\magyar at fo@indent at articlenosp{%
+    \parindent1em % SUXX: impossible to acquire default value
+    % Dat: don't use \@makefnmark here, because it puts the footnote mark
+    %      only to the main text
+    \noindent\hb at xt@1.8em{\hss\@textsuperscript{\normalfont\@thefnmark}}%
+  }
+  \def\magyar@@fo at indent@dimensetup{%
+    \parindent1em % SUXX: impossible to acquire default value
+    %\advance\leftskip1.8em % SUXX: impossible to acquire default value
+    \leftskip\leftmargini % SUXX: impossible to acquire default value
+  }
+  %** Has #1, but partially applied here
+  \def\magyar at fo@indent at hulist{%
+    % Dat: superscript is emitted by \@makefnmark
+    % Dat: \parindent doesn't apply for the 1st par of the footnote
+    \magyar@@fo at indent@dimensetup
+    \ifvmode\noindent\hb at xt@\z@\else\hbox\fi
+    % ^^^ \usepackage[para]{footmisc} emits footnotes in horizontal mode
+      {\hss\@textsuperscript{\normalfont\@thefnmark\,}}%
+  }
+
+  %** Limit the size of the footnote mark (in main text) to \normalsize.
+  %** Overrides latex.ltx
+  \def\magyar at fo@makefnmark{%
+    \hbox{% has \begingroup
+      \edef\reserved at a{\f at size}%
+      {\normalsize\edef\reserved at b{\def\noexpand\reserved at b{\f at size}}\expandafter}\reserved at b
+      \ifdim\reserved at a pt>\reserved at b pt
+           %\normalsize\@textsuperscript{\normalfont\footnotesize\@thefnmark}% Dat: would place index too low
+           \@textsuperscript{\normalfont\scriptsize\@thefnmark}%
+      \else\@textsuperscript{\normalfont\@thefnmark}\fi
+    }%
+  }
+  \let\magyar at fo@@cont at number\@empty
+  \def\magyar at fo@savecont{\global\edef\magyar at fo@@cont at number{\global\c at footnote\the\c at footnote\space}}
+
+  %** \footnoterule, as defined in latex.ltx
+  \def\magyar at fo@defaultrule{\kern-3\p@
+    \hrule \@width 2in \kern 2.6\p@} % the \hrule is .4pt high
+  \def\magyar at fo@fourthrule{\kern-3\p@%\hrule\hrule\hrule
+    \hrule \@width .25\textwidth \kern 2.6\p@} % the \hrule is .4pt high
+  \def\magyar at fo@onelinerule{%
+    \unskip% undo \vskip\skip\footins
+    {\normalsize% Dat: \normalfont is superfluous
+      \vskip1\baselineskip plus.1\baselineskip minus .1\baselineskip}%
+    % ^^^ Dat: plus,minus is necessary to avoid `Overfull \vbox (8.86676pt too high)'
+  }
+  \def\magyar at fo@chooserule{\relax
+    \ifx \@listdepth\@mplistdepth \mpfootnoterule \else
+      \ifnum\split at prev=\z@ \pagefootnoterule \else \splitfootnoterule
+      \fi
+      %%\typeout{\string\split at prev=\split at prev}%
+      \xdef\split at prev{\the\insertpenalties}%
+    \fi
+  }
+
+  % `Szerkeszt\xF5k \xE9s szerz\xF5k k\xE9zik\xF6nyve, p. 116' says this about Hungarian
+  % footnotes. Implementation notes are marked with [...]. See better docs
+  % in magyarldf-doc.tex
+  %
+  % (1) Use numbering and/or stars (in upper index) for footnote marks.
+  %     Numbering is recommended.
+  % [1] Use \footnotestyle{mark=...}
+  % (2) You can put footnotes by the editor with a star, and footnotes by the
+  %     author with numbers.
+  % [2] Use \footnotestyle{huplain} in the preamble, and emit each editorial
+  %     footnote with {\footnotestyle{editor}\footnote{Her note.}}
+  % (3) Don't put \footnoterule if the footnote starts on current page.
+  % [3] Use \footnotestyle{rule=none}. Please make sure that the group lasts
+  %     till \shipout.
+  % (4) Put a \footnoterule (1/3\textwidth or 1/4\textwidth) if footnote is
+  %     continued from previous page.
+  % [4] Not supported. Imp: how to?      
+  % (5) Multiple short footnotes may be put into a single line.
+  % [5] \usepackage[para]{footmisc} or \usepackage{fnpara}
+  % (6) Footnotes for \begin{figure} and \begin{table} must be put just under
+  %     them, not at EOP.
+  % [6] The author should enclose the matrial in a \begin{minipage}
+  % (7) The size of the \footnotemark should not be scaled up.
+  % [7] Use \footnotestyle{marksize=max-normal}
+  % (8) It is possible to use either \parindent or \item when starting a
+  %     footnote.
+  % [8] Use \footnotestyle{indent=hulist} 
+  % (9) The footnotemark must be followed by a thin space (only at BOP).
+  % [9] OK, see \@makefntext
+  % (10) Don't emit too much stars. Recommended: * ** *** + ++ +++
+  % [10] OK, see \footnoterule{mark=stars-max}. `\dag' is emitted instead
+  %      of `+', and `*7' is emitted for the 7th footnote on the page.
+  %
+
+  \@namedef{fos at reset=none}{\let\magyar at fo@resetzero\relax}%
+  %** Similar to \@addtoreset{footnote}{section}, but isn't \global.
+  \@namedef{fos at reset=section}{%
+    \let\magyar at fo@resetzero\relax
+    \magyar at fo@cons{\@elt{footnote}}\cl at section\def
+    \magyar at fo@cons{\@elt{footnote}}\cl at chapter\def
+  }%
+  \@namedef{fos at reset=chapter}{%
+    \let\magyar at fo@resetzero\relax
+    \magyar at fo@cons{\@elt{footnote}}\cl at chapter\def
+  }%
+  %** Next footnote-mark will be `*'. The slots of `*'s of \fos at huplain
+  %** were skipped when changing back to \fos at plain. Restarts numbering from
+  %** 1 (`*'). Usually called as \footnotestyle{resume,reset=page-cont}
+  \@namedef{fos at reset=page}{%
+    \stepcounter{footnote at ch}%
+    \global\c at footnote@add\z@%
+    \global\c at footnote\z@%
+    \let\magyar at fo@resetzero\magyar at fo@resetzero at afterpage
+    %\aftergroup\magyar at fo@resetadd% switched off deliberately
+  }
+  %** editorial footnote on the same page
+  \@namedef{fos at reset=page-cont}{%
+    \aftergroup\magyar at fo@savecont
+    \fos at resume% only \aftergroup
+    \magyar at fo@@cont at number
+    \let\magyar at fo@resetzero\magyar at fo@resetzero at afterpage
+  }
+  \@namedef{fos at reset=page-resume}{%
+    \fos at resume \csname fos at reset=page\endcsname
+  }
+  %** Resume to the previous footnote number at the end of the group. (Default: don't resume)	       
+  %** \footnotestyle{resume,reset=page} is the correct order
+  \def\fos at resume{%
+    \aftergroup\global
+    \aftergroup\c at footnote
+    \expandafter\magyar at fo@aftergrouprelax\the\c at footnote\relax
+    \aftergroup\space
+    %\magyar at fo@resetadd% Dat: not needed because \magyar at fo@resetzero at afterpage won't find prev. ref
+  }
+  %
+  \@namedef{fos at indent=article-sp}{\let\@makefntext\magyar at fo@indent at articlesp}%
+  \@namedef{fos at indent=article-nosp}{\let\@makefntext\magyar at fo@indent at articlenosp}%
+  \@namedef{fos at indent=hulist}{\let\@makefntext\magyar at fo@indent at hulist}%
+  %** This is not a 100% solution, because there might be multiple iterations
+  %** of \footnoterule with different \split at prev values.
+  \@namedef{fos at rule=choose}{% ripped from footmisc.sty
+    \ifx\footnoterule\magyar at fo@chooserule
+      \let\footnoterule\magyar at fo@defaultrule
+    \fi
+    \expandafter\ifx\csname  pagefootnoterule\endcsname\relax \let \pagefootnoterule\footnoterule\fi
+    \expandafter\ifx\csname    mpfootnoterule\endcsname\relax \let   \mpfootnoterule\footnoterule\fi
+    \expandafter\ifx\csname splitfootnoterule\endcsname\relax \let\splitfootnoterule\magyar at fo@fourthrule\fi
+    \expandafter\ifx\csname split at prev\endcsname\relax \gdef\split at prev{0}\fi
+    % ^^^ Dat: \split at prev is named the same in footmisc.sty
+    \let\footnoterule\magyar at fo@chooserule
+  }
+  \@namedef{fos at rule=none}{\let\footnoterule\@empty}%
+  \@namedef{fos at rule=fourth}{\let\footnoterule\magyar at fo@fourthrule}%
+  \@namedef{fos at rule=one-line}{\let\footnoterule\magyar at fo@onelinerule}%
+  \@namedef{fos at marksize=max-normal}{\let\@makefnmark\magyar at fo@makefnmark}%
+  \@namedef{fos at mark=arabic}{\let\thefootnote\magyar at fo@thefootnote at arabic}%
+  \@namedef{fos at mark=stars}{\let\thefootnote\magyar at fo@thefootnote at stars}%
+  \@namedef{fos at mark=stars-max}{\let\thefootnote\magyar at fo@thefootnote at starsspmax}%
+  \@namedef{fos at mpmark=arabic}{\let\thempfootnote\magyar at fo@thempfootnote at arabic}%
+  \@namedef{fos at mpmark=stars}{\let\thempfootnote\magyar at fo@thempfootnote at stars}%
+  \@namedef{fos at mpmark=stars-max}{\let\thempfootnote\magyar at fo@thempfootnote at starsspmax}%
+  %\def\fos at globalmark{\expandafter\global\expandafter\let\csname the\@mpfn\endcsname\endcsname\thefootnote}
+  %\def\fos at globalmpmark{\global\let\thempfootnote\thefootnote}
+
+  \def\fos at plain{\csname fos at reset=none\endcsname\csname fos at mark=arabic\endcsname}
+  \def\fos at huplain  {\csname fos at marksize=max-normal\endcsname \csname fos at reset=none\endcsname\csname fos at mark=arabic\endcsname\csname fos at rule=none\endcsname\csname fos at indent=hulist\endcsname}
+  \def\fos at starplain{\fos at huplain\csname fos at reset=page\endcsname\csname fos at mark=stars-max\endcsname}%
+  %\def\fos at editor{\fos at resume\fos at starplain}%
+  \def\fos at editor{\fos at huplain\csname fos at reset=page-cont\endcsname\csname fos at mark=stars-max\endcsname}%
+  
+  \def\footnotestyle#1{%
+    \@for\reserved at a:=#1\do{%
+      \@ifundefined{fos@\reserved at a}{\@latex at error{Undefined footnote style: \reserved at a}\@ehc}%
+      {\csname fos@\reserved at a\endcsname}%
+    }%
+  }
+
+  \def\editorfootnote#1{\begingroup\footnotestyle{editor}%
+    \footnote{#1}\endgroup}%
+  \def\headingfootnote{%
+    \ifx\protect\@typeset at protect\expandafter\footnote
+    \else\expandafter\@gobble\fi
+    % ^^^ Dat: this test is better, because it makes magyar.ldf compatible
+    %     with nath.sty that says \def\protect{\noexpand} in its redefinition
+    %     of \addtocontents
+    %\ifx\protect\@unexpandable at protect\expandafter\@gobble
+    %\else\expandafter\footnote\fi
+  }
+
+  %** @param #1 an end-csname, example: \endfigure
+  \def\magyar at fo@mp at setup#1{%
+    \let\@footnotetext\@mpfootnotetext
+    \def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c at mpfootnote\z@
+    % ^^^ This line is optional, but strongly recommended. Restart numbering
+    %     for each float, and number with \thempfootnote.
+    % vvv Very tricky use of `#' in expansion.
+    % Dat: \magyar at fo@mp at show is idempotent
+    % vvv Prepend \magyar at fo@mp at show to the definition of \@makecaption
+    \expandafter\def\expandafter\@makecaption\expandafter##\expandafter1%
+      \expandafter##\expandafter2\expandafter{\expandafter\magyar at fo@mp at show%
+      \@makecaption{##1}{##2}%
+    }%
+    %%\show\@currenvir
+    % vvv Dat: this prepending has only local effect.
+    \expandafter\def\expandafter#1\expandafter{%
+      \expandafter\magyar at fo@mp at show#1}%
+    %\expandafter\magyar at fo@mp at prepend\csname\@currenvir\endcsname
+    \setbox\@mpfootins\box\voidb at x
+  }
+  \def\magyar at fo@mp at show{% ripped from latex.ltx (\endminipage)
+    \ifvoid\@mpfootins\else
+      \par\unskip \vskip\skip\@mpfootins
+      \normalcolor \footnoterule
+      \expandafter\ifx\csname mpmakefootnoteparagraph\endcsname\relax
+        \unvbox\@mpfootins
+      \else% fnpara.sty
+        \mpmakefootnoteparagraph
+      \fi
+    \fi
+  }
+
+  %** Only works if \cs of #1 doesn't have macro arguments. It works for
+  %** \figure and \table, because their optional argument `[b]' etc. is not
+  %** a macro argument.
+  %** @example \makeFootnotable{figure}
+  %** @example \makeFootnotable{} -- current instance of current environment
+  \def\makeFootnotable#1{%
+    \if\relax#1\relax
+      \expandafter\magyar at fo@mp at setup\csname end\@currenvir\endcsname
+    \else
+      \expandafter\expandafter\expandafter\magyar at fo@makef at low
+      \expandafter\expandafter\csname #1\endcsname
+      \csname end#1\endcsname
+    \fi
+  }
+  %** @example \magyar at fo@makef at low\table\endtable
+  \def\magyar at fo@makef at low#1#2{\expandafter\def\expandafter#1\expandafter{%
+    \expandafter\magyar at fo@mp at setup\expandafter#2#1}}%
+
+  \if2\magyar at opt@@footnote \fos at huplain\fi
+  \if3\magyar at opt@@footnote \fos at starplain\fi
+  \@gobble
+{^}
+
+% --- mathbrk=
+
+\if0\magyar at opt@@mathbrk \@@magyar at skiplong\fi
+  %** Similar to \@@magyar at fixmathcmd@low, but inserts symbol immediately.
+  %** @param #1 `\mathchar', all catcodes
+  %** @param #2 hex code
+  %** @param #3 ignored
+  %** @param #4 a \cs
+  \def\@@magyar at breakmathcmd@low#1"#2"#3\hfuzz#4{%
+    \def\reserved at a{#1}%
+    \edef\reserved at b{\string\mathchar}%
+    \ifx\reserved at a\reserved at b
+      \mathchar"#2
+      \ifnum"#2<"8000 % redundant sanity check, trueness implied by #1==\mathchar
+	\nobreak\discretionary{}{\hbox{\(\mathchar"#2 \)}}{}%
+      \fi
+    \fi
+  }%
+  %** Dat: robustness is tested and works with nath.sty
+  %** @param #1 a \cs or char of a MathBin or MathRel, e.g `\prec' or `+'
+  \DeclareRobustCommand\MathBrkAll[1]{%
+    \ifcat\noexpand#1\relax
+      \expandafter\@@magyar at breakmathcmd@low\meaning#1""\hfuzz#1%
+    \else
+      \ifnum\mathcode`#1="8000
+        \expandafter\expandafter\expandafter#1% keep original meaning
+      \else
+	\mathchar\the\mathcode`#1\relax% disable \active meaning
+	\ifnum\mathcode`#1<"8000 % redundant sanity check
+	  \nobreak\discretionary{}{\hbox{\(\mathchar\the\mathcode`#1\relax\)}}{}%
+	\fi
+      \fi
+    \fi
+  }
+  \let\MathBrk\relax
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \babel at save\MathBrk
+    \let\MathBrk\MathBrkAll
+  }
+  \@gobble
+{^}
+
+\if2\magyar at opt@@mathbrk\else \@@magyar at skiplong\fi  % mathbrk=fix
+  \def\@@magyar at resetmathchars{%
+    \mathcode`+"202B \catcode`+12
+    \mathcode`-"2200 \catcode`-12
+    \mathcode`*"2203 \catcode`*12
+    \mathcode`/"013D \catcode`/12
+    \mathcode`>"313E \catcode`>12
+    \mathcode`<"313C \catcode`<12
+    \mathcode`="303D \catcode`=12
+    % vvv Dat: leave these chars intact, for compatibility (with nath.sty and others)
+    %\mathcode`:"303A \catcode`:12
+    %\mathcode`;"603B \catcode`;12
+    %\mathcode`,"613B \catcode`,12
+    %\mathcode`!"5021 \catcode`!12
+    %\mathcode`?"503F \catcode`?12
+    %\mathcode`|"026A \catcode`|12
+    %\mathcode`."013A \catcode`.12
+  }
+  %** Dat: don't do `/', because slash is unbreakable
+  \def\@@magyar at domathbins{%
+    \do-\@@magyar at fix@newmcodes at dash
+    \do+\do*\do>\do<\do=}%
+  %** @param #1 a char token with \mathcode != "8000, like +
+  \def\@@magyar at fixmathbinchar#1{%
+    \ifnum\mathcode`#1="8000 \else
+      % Dat: \(...\) is safer than `$...$', because \( has a fixed \catcode
+      %      that works with and w/o nath.sty
+      \begingroup\lccode\string`~\string`#1\lowercase{\endgroup\edef~}{%
+	\mathchar\the\mathcode`#1\relax% Dat: would need \space\space
+        \noexpand\ifx\noexpand\MathBrk\noexpand\MathBrkAll% Hungarian language is active
+          \nobreak\discretionary{}{\hbox{\noexpand\(\mathchar\the\mathcode`#1 \noexpand\)}}{}%
+        \noexpand\fi}%
+      \mathcode`#1"8000
+    \fi
+    \catcode`#112
+  }
+  %** \newmcodes@ defined in amsopn.sty doesn't work (triggered by 
+  %** \DeclareMathOperator{\tg}{tg} $\tg$) because it wants to assign
+  %** \mathchardef\std at minus\mathcode`\-, which is "8000, which is a bad
+  %** matchar. We fix that by prepending \mathcode`-45 to \newmcodes@ .
+  %** This is OK, because \newmcodes@ is protected by a block set up by
+  %** \qopname.
+  \def\@@magyar at newmcodes@fixed{\mathcode`-"45 \magyar@@newmcodes}%
+  \def\@@magyar at fix@newmcodes at dash{%
+    \ifx\newmcodes@\@undefined\else
+      \ifx\newmcodes@\@@magyar at newmcodes@fixed\else  % Protect against double redefinition such as in \begin{align*}\tg\end{align*}
+        \let\magyar@@newmcodes\newmcodes@
+        \let\newmcodes@\@@magyar at newmcodes@fixed
+      \fi
+    \fi
+  }%
+
+  %** @param #1 `\mathchar', all catcodes
+  %** @param #2 hex code
+  %** @param #3 ignored
+  %** @param #4 a \cs
+  \def\@@magyar at fixmathcmd@low#1"#2"#3\hfuzz#4{%
+    % Imp: check \cong and \notin with txfonts and pxfonts. Do they look OK?
+    \def\reserved at a{#1}%
+    \edef\reserved at b{\string\mathchar}%
+    \ifx\reserved at a\reserved at b
+      \ifnum"#2<"8000 % redundant sanity check, trueness implied by #1==\mathchar
+        % Make #4 robust.
+	\edef#4{\noexpand\protect\expandafter\noexpand\csname
+          \expandafter\@gobble\string#4 \endcsname}%
+	% vvv Imp: \def would be better than \edef?
+	\expandafter\edef\csname\expandafter\@gobble\string#4 \endcsname{%
+	  % Dat: \mathchar already produces: `! Missing $ inserted.'
+	  \mathchar"#2
+          \noexpand\ifx\noexpand\MathBrk\noexpand\MathBrkAll% Hungarian language is active
+            \nobreak\discretionary{}{\hbox{\noexpand\(\mathchar"#2 \noexpand\)}}{}%
+          \noexpand\fi
+	}%
+      \fi
+    \fi
+  }%
+  %** Works even if #1 is undefined (but consumes hash memory)
+  %** @param #1 a \cs of a MathBin or MathRel, e.g \prec
+  \def\@@magyar at fixmathcmd#1{%
+    \expandafter\@@magyar at fixmathcmd@low\meaning#1""\hfuzz#1%
+  }
+
+  \let\@@magyar at domathbins@prefix\@empty
+  \def\@@magyar at fixeverymathcmds@appendto#1{%
+    \expandafter\def\expandafter#1\expandafter{#1% append
+      \@@magyar at resetmathchars
+      \let\do\@@magyar at fixmathbinchar
+      \@@magyar at domathbins@prefix\@@magyar at domathbins% only in math mode start
+    }%
+  }
+  \def\@@magyar at fixeverymathcmds@setup{%
+    \expandafter\ifx\csname mathoptions at on\endcsname\relax% no nath.sty
+	 \@@magyar at fixeverymathcmds@appendto\check at mathfonts
+    \else\@@magyar at fixeverymathcmds@appendto\mathoptions at on\fi
+  }
+
+  % The definition of \@tabular contains a $, which calls
+  % \@@magyar at domathbins, which has some unintended side effects of changing
+  % \catcode values and the meaning of the active character : . This magic
+  % prevents the call to \@@magyar at domathbins .
+  %
+  % Test code: \author{a:b} \maketitle
+  % Test code: \def\foo{a:b} \begin{tabular}[t]{c}x\foo y\end{tabular}
+  \def\@@magyar at mathbins@tabularfix#1${%
+    #1\def\@@magyar at domathbins@prefix{%
+      \let\@@magyar at domathbins@prefix\@empty\@gobble}$}%
+  \expandafter\expandafter\expandafter\def
+  \expandafter\expandafter\expandafter\@tabular
+  \expandafter\expandafter\expandafter{%
+    \expandafter\@@magyar at mathbins@tabularfix\@tabular}
+
+  \def\@@magyar at fixmathcmds{%
+    \let\do\@@magyar at fixmathcmd
+    % vvv Binary relations listed in Table 3.4 in lshort.dvi
+    \do\leq\do\le\do\ll\do\prec\do\preceq\do\subset\do\subseteq\do\sqsubset
+    \do\sqsubseteq\do\in\do\vdash\do\mid\do\smile\do\geq\do\ge\do\gg\do\succ
+    \do\succeq\do\supset\do\supseteq\do\sqsupset\do\sqsupseteq\do\ni\do\owns
+    \do\dashv\do\parallel\do\frown\do\notin\do\equiv\do\doteq\do\sim\do\simeq
+    \do\approx\do\cong\do\Join\do\bowtie\do\propto\do\models\do\perp\do\asymp
+    \do\neq\do\ne
+    % vvv Binary operators listed in Table 3.5 in lshort.dvi
+    %\do\cdot% unbreakable
+    \do\pm\do\times\do\cup\do\sqcup\do\vee\do\lor\do\oplus\do\odot\do\otimes
+    \do\bigtriangleup\do\lhd\do\unlhd\do\mp\do\div\do\setminus\do\cap\do\sqcap
+    \do\wedge\do\land\do\ominus\do\oslash\do\bigcirc\do\bigtriangledown\do\rhd
+    \do\unrhd\do\triangleleft\do\triangleright\do\star\do\ast\do\circ\do\bullet
+    \do\diamond\do\uplus\do\amalg\do\dagger\do\ddagger\do\wr
+    \edef\cdot{\noexpand\protect\csname cdot \endcsname}%
+    \expandafter\def\csname cdot \endcsname{\nobreak\mathchar"2201\nobreak}%
+    \def\slash{\nobreak/\nobreak}% only in math-mode start, \nobreak
+    % ^^^ Dat: \slash is fragile in latex.ltx
+  }
+  \AtBeginDocument{\@@magyar at fixmathcmds\@@magyar at fixeverymathcmds@setup}
+  \@gobble
+{^}
+
+% --- mathfactorial=
+
+\if0\magyar at opt@@mathfactorial \@@magyar at skiplong\fi
+  % Imp: weak define? It doesn't conflict with nath.sty -- yet.
+  \def\factorial{\mathchar"5021\mathopen{}\mathinner{}}
+  \@gobble
+{^}
+
+\if2\magyar at opt@@mathfactorial\else \@@magyar at skiplong\fi
+  \expandafter\addto\csname \expandafter\ifx\csname mathoptions at on\endcsname
+   \relax check at mathfonts\else mathoptions at on\fi\endcsname{% detect nath.sty
+    \catcode`!12 \mathcode`!"8000
+    \begingroup\lccode`~`!\lowercase{\endgroup\def~}{\factorial}%
+  }
+  \@gobble
+{^}
+
+% --- mathhucomma=
+
+\if0\magyar at opt@@mathhucomma \@@magyar at skiplong\fi
+  %** Dat: works for all catcodes, even for `end group character 5'
+  %** Inspired by Donald Aresenau
+  %** @param #1 the
+  %** @param #2 character
+  %** @example The sample in your article would be typed 
+  %**   \[  F_{i}(x,y) = y^i + 1,3x \qquad x,y \in A,\ i = 1, 2, 3,\ldots \]
+  \edef\@@magyar at hucomma@lowa#1#2 #3#4 #5#6\hfuzz{%
+    \noexpand\ifnum9<1#5 \noexpand\if#1t\noexpand\if#3c%
+    \noexpand\mathord\noexpand\fi\noexpand\fi\noexpand\fi\mathchar
+    \ifnum\mathcode`,="8000 "613B \else\the\mathcode`, \space\fi% immed expand
+    % Dat: "613B is the punctuation, "013B is ordinary
+  }%
+  %%\show\@@magyar at hucomma@lowa
+  \def\@@magyar at hucomma@lowb{\expandafter\@@magyar at hucomma@lowa\meaning\reserved at a/ / /\hfuzz}%
+  %** Put a \mathord, if it is followed by a digit; otherwise put a normal,
+  \DeclareRobustCommand\HuComma{\futurelet\reserved at a\@@magyar at hucomma@lowb}
+  \@gobble
+{^}
+
+\if2\magyar at opt@@mathhucomma\else \@@magyar at skiplong\fi
+  % !! into \extrasmagyar
+  \expandafter\addto\csname \expandafter\ifx\csname mathoptions at on\endcsname
+   \relax check at mathfonts\else mathoptions at on\fi\endcsname{% detect nath.sty
+    \catcode`,12 \mathcode`,"8000
+    \begingroup\lccode`~`,\lowercase{\endgroup\def~}{\HuComma}%
+  }
+  \@gobble
+{^}
+
+% --- mathmuskips=
+
+% 
+\if1\magyar at opt@@mathmuskips% =latex, as defined in latex.ltx
+  \thickmuskip 5mu plus 5mu
+  \medmuskip   4mu plus 2mu minus 4mu
+  \thinmuskip  3mu
+\fi
+\if2\magyar at opt@@mathmuskips% =hu
+  \thickmuskip 4mu plus 2mu minus 4mu
+  \medmuskip   2mu plus 1.5mu minus 2mu % \medmuskip<\thinmuskip OK
+  \thinmuskip  3mu
+\fi
+
+% --- hynumberline=
+% by pts at fazekas.hu at Tue Nov 21 00:34:37 CET 2006
+%
+% hynumberline=hu adds a dot after the section number in the bookmarks/outline
+% with \hypersetup{bookmarksnumbered=true} in hyperref.sty.
+
+\if0\magyar at opt@@hynumberline \@@magyar at skiplong\fi
+  %** Overrides original definition (\def\Hy at numberline#1{#1 }) in
+  %** pdfmark.def.
+  %** Also possible with:
+  %** \pdfstringdefDisableCommands{\renewcommand*{\numberline}[1]{#1. }}
+  \def\@@magyar@@hynumberline at old#1{#1 }% as defined in pdfmark.def
+  \def\@@magyar@@hynumberline at hu #1{#1. }%
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \ifx  \Hy at numberline\@@magyar@@hynumberline at old
+      \let\Hy at numberline\@@magyar@@hynumberline at hu \fi}%
+\@gobble
+{^}%
+
+% --- mathreal=
+
+\if0\magyar at opt@@mathreal \@@magyar at skiplong\fi
+  %** @param #1 a number with a possible decimal digit, e.g `12' or `-12.3'
+  \def\@@magyar at mathreal@lowa#1{\ensuremath{\@@magyar at mathreal@lowb#1\@gobble.}}%
+  \def\@@magyar at mathreal@lowb#1.{%
+    #1%
+    \@secondoftwo\@gobble% Wizardry: \@secondoftwo may be \@gobbled by token before `.'
+    {\mathchar"013B \@@magyar at mathreal@lowb}%
+  }
+  \DeclareRobustCommand\@@magyar at mathreal{\ensuremath}%
+  \expandafter\expandafter\expandafter\addto
+  \expandafter\expandafter\csname extras\CurrentOption\endcsname\expandafter{%
+    \expandafter\babel at save\csname @@magyar at mathreal \endcsname
+    \expandafter\let\csname @@magyar at mathreal \endcsname \@@magyar at mathreal@lowa}%
+  \ifnum\magyar at opt@@mathreal \expandafter\ifx\csname mathreal\endcsname\relax1\fi>1 % 21, 2, 11, 1
+    \let\MathReal\@@magyar at mathreal
+  \fi
+\@gobble
+{^}%
+
+% --- \documentclass-specific modifications; classmod=
+
+% Callback which redefines \ps at headings and runs it again if needed, when
+% magyar.ldf has an override for the standard \ps at headings, and
+% \pagestyle{headings} is active either explictly (e.g. in article.cls) or
+% by default (e.g. in book.cls).
+\let\@@magyar at setup@psheadings\relax
+
+%** Localized definition which replaces \ps at headings, if appropriate.
+\let\@@magyar at overridden@psheadings\@empty
+
+\ifx\magyar at opt@@classmod\relax\@@magyar at skiplong\fi
+
+%** Appends the first-level expansion of argless macro ##2 to ##1.
+\def\magyar at letappendto#1#2{%
+  \expandafter\expandafter\expandafter\def
+    \expandafter\expandafter\expandafter#1%
+    \expandafter\expandafter\expandafter{%
+    \expandafter#1#2}}%
+
+%** Defines #1 to the concatenation of \partmark ... \subparagraphmark,
+%** \oddfoot, \evenfoot, \oddhead, \evenhead.
+\def\magyar at mark@fingerprint at def#1{%
+  % We have ! here because some macros (such as \partmark) have #1, which
+  % gets expanded by \expandafter
+  \def#1{markfp: }%
+  \ifx\partmark\@undefined
+    \expandafter\def\expandafter\reserved at b\expandafter{%
+      \expandafter{-partmark}}%
+  \else
+    \expandafter\def\expandafter\reserved at b\expandafter{%
+      \expandafter{\partmark!:partmark}}%
+  \fi
+  \magyar at letappendto#1\reserved at b
+  %
+  \ifx\chaptermark\@undefined
+    \expandafter\def\expandafter\reserved at b\expandafter{%
+      \expandafter{-chaptermark}}%
+  \else
+    \expandafter\def\expandafter\reserved at b\expandafter{%
+      \expandafter{\chaptermark!:chaptermark}}%
+  \fi
+  \magyar at letappendto#1\reserved at b
+  %
+  \expandafter\def\expandafter\reserved at b\expandafter{%
+    \expandafter{\sectionmark!:sectionmark}}%
+  \magyar at letappendto#1\reserved at b
+  \expandafter\def\expandafter\reserved at b\expandafter{%
+    \expandafter{\subsectionmark!:subsectionmark}}%
+  \magyar at letappendto#1\reserved at b
+  \expandafter\def\expandafter\reserved at b\expandafter{%
+    \expandafter{\paragraphmark!:paragraphmark}}%
+  \magyar at letappendto#1\reserved at b
+  \expandafter\def\expandafter\reserved at b\expandafter{%
+    \expandafter{\subparagraphmark!}}%
+  \magyar at letappendto#1\reserved at b
+  \expandafter\def\expandafter\reserved at b\expandafter{%
+    \expandafter{\@oddfoot!:oddfoot}}%
+  \magyar at letappendto#1\reserved at b
+  \expandafter\def\expandafter\reserved at b\expandafter{%
+    \expandafter{\@evenfoot!:evenfoot}}%
+  \magyar at letappendto#1\reserved at b
+  \expandafter\def\expandafter\reserved at b\expandafter{%
+    \expandafter{\@evenhead!:evenhead}}%
+  \magyar at letappendto#1\reserved at b
+  \expandafter\def\expandafter\reserved at b\expandafter{%
+    \expandafter{\@oddhead!:oddhead}}%
+  \magyar at letappendto#1\reserved at b
+  % Dat: don't use \@mkboth (\let\@mkboth\markboth)
+}%
+
+%** Branches based on whether the \pagestyle has changed since loading the
+%** class file.
+%** @param #1 class file name, e.g. `book.cls'. Tested with book.cls and
+%**    report.cls.
+%** @param #2 tokens to insert before fingerprinting the current page style.
+%** @param implicit-#3 then-branch
+%** @param implicit-#4 else-branch
+\def\magyar at if@originalpagestyle#1#2{%
+  \begingroup
+  % article.cls calls \pagenumbering, which does a \gdef\thepage and
+  % \global\c at page=1. We'll cancel that below.
+  \let\magyar@@pagestyle at save@thepage\thepage
+  \edef\magyar@@pagestyle at save@c at page{\the\c at page\space}
+  \edef\magyar@@pagestyle at save@c at tocdepth{\the\c at tocdepth\space}
+  % Dat: no \paragraphmark or \subparagraphmark
+  % vvv Dat: already defined in latex.ltx
+  %\providecommand\sectionmark[1]{\relax}
+  %\providecommand\subsectionmark[1]{\relax}
+  #2\magyar at mark@fingerprint at def\@@magyar at now@marks
+  %
+  \def\ProvidesClass##1[##2]{}%
+  \def\NeedsTeXFormat##1[##2]{}% avoid ``can be used only in preamble''
+  \long\def\DeclareOption##1##2{}%
+  \def\ExecuteOptions##1{}%
+  \def\ProcessOptions{}%
+  \def\DeclareOldFontCommand##1##2##3{}%
+  %
+  \def\magyar at gobbleopt[##1]{}%
+  % Dat: \newcommand etc. are not \global. Good.
+  \let\@onlypreamble\@gobble  % In letter.cls .
+  \let\newdimen\@gobble
+  \let\newif\@gobble
+  \let\newskip\@gobble
+  \let\newmuskip\@gobble
+  \let\newcount\@gobble
+  \let\newbox\@gobble
+  \let\newtoks\@gobble
+  \let\newread\@gobble
+  \let\newwrite\@gobble
+  \let\newlaunguage\@gobble
+  \let\newlength\@gobble
+  \def\newcounter##1{\@ifnextchar[\magyar at gobbleopt{}}%
+  \def\setcounter##1##2{\@ifundefined{c@##1}{\@nocounterr{##1}}%
+      {\csname c@##1\endcsname##2\relax}}
+  %** Like \newcommand, but always overrides old values.
+  \def\magyar at defcommand{\@star at or@long\magyar at defcommand@low}
+  \def\magyar at defcommand@low##1{%
+    \begingroup
+      \escapechar\m at ne\xdef\@gtempa{\string##1}%
+    \endgroup
+    \expandafter\let\csname\@gtempa\endcsname\@undefined
+    \@star at or@long\new at command##1%
+  }%
+  \def\newcommand{\magyar at defcommand}%
+  \def\renewcommand{\magyar at defcommand}%
+  \def\magyar at defenvironment##1{%
+    \@ifundefined{##1}{}{%
+      \expandafter\let\csname ##1\endcsname\@undefined
+      \expandafter\let\csname end##1\endcsname\@undefined
+    }%
+    \@star at or@long\new at environment{##1}%
+  }%
+  \def\newenvironment{\magyar at defenvironment}%
+  \def\renewenvironment{\magyar at defenvironment}%
+  %
+  \ps at empty  % Clean \@oddhead as of latex.ltx
+  \let\@mkboth\@gobbletwo
+  \let\@oddhead\@empty
+  \let\@evenhead\@empty
+  \let\@oddfoot\@empty
+  \let\@evenfoot\@empty
+  %
+  \def\input##1 {} % size10.clo etc.
+  \makeatletter \@@input #1 %
+  #2\magyar at mark@fingerprint at def\@@magyar at class@marks
+  %\message{AAA \meaning\@@magyar at now@marks}%
+  %\message{BBB \meaning\@@magyar at class@marks}%
+  \global\let\thepage\magyar@@pagestyle at save@thepage
+  \global\c at page\magyar@@pagestyle at save@c at page
+  \global\c at tocdepth\magyar@@pagestyle at save@c at tocdepth
+  \ifx\@@magyar at now@marks\@@magyar at class@marks
+    \endgroup\expandafter\@firstoftwo
+  \else
+    \endgroup\expandafter\@secondoftwo
+  \fi
+}
+
+%\begingroup
+%\magyar at mark@fingerprint at def\OOO
+%\message{OOO \meaning\OOO}%
+%\endgroup
+
+%** Branches based on whether the specified \pagestyle is active.
+%** @param #1 tokens which change to the \pagestyle specified, e.g.
+%**   `\ps at headings'.
+%** @param implicit-#2 then-branch
+%** @param implicit-#3 else-branch
+\def\magyar at if@currentpagestyle#1{%
+  \begingroup
+  \magyar at mark@fingerprint at def\@@magyar at now@marks
+  #1%
+  \magyar at mark@fingerprint at def\@@magyar at specified@marks
+  \ifx\@@magyar at now@marks\@@magyar at specified@marks
+    \endgroup\expandafter\@firstoftwo
+  \else
+    \endgroup\expandafter\@secondoftwo
+  \fi
+}
+
+%** Redefine \@@magyar at setup@psheadings for #2.cls.
+%** @param #1 is the expanded value of \CurrentOption (`magyar').
+\def\magyar at def@psheadings#1#2{%
+  \def\@@magyar at setup@psheadings{%
+    % SUXX: \show doesn't work here.
+    \ifx\@@magyar at overridden@psheadings\ps at headings
+      \@@magyar at error{assert: \string\let\string\ps at headings\string\@@magyar at overridden@psheadings\space was too early}%
+    \else\ifx\@@magyar at overridden@psheadings\@empty
+      \@@magyar at error{assert: \string\@@magyar at overridden@psheadings\space should be redefined}%
+    \else
+      \magyar at if@originalpagestyle{#2.cls}{\ps at headings}{%
+        % \ps at headings still has its original definition (as of #1.cls).
+        %
+        % For efficiency reasons, we make the following restriction. If the
+        % user does \selectlanguage{...} throughout the document, he should
+        % call \pagetsyle{...} after that to make the pagestyle
+        % language-dependent.
+        %
+        % !! add support for \thispagestyle in the preamble.
+        % !! don't add this if extras gets cleared.
+        \expandafter\addto\csname extras#1\endcsname{%
+          \babel at save\ps at headings
+          \let\ps at headings\@@magyar at overridden@psheadings
+        }%
+        \magyar at if@currentpagestyle{\ps at headings}{%
+          % The current \pagestyle has been selected by the current
+          % \ps at headings, i.e. \pagestyle{headings} is active.
+          \edef\reserved at a{\languagename}%
+          \edef\reserved at a{\expandafter\strip at prefix\meaning\reserved at a}%
+          \edef\reserved at b{#1}%
+          \edef\reserved at b{\expandafter\strip at prefix\meaning\reserved at a}%
+          \ifx\reserved at a\reserved at b
+            % Localize the current \pagestyle to Hungarian `headings'.
+            \@@magyar at overridden@psheadings
+          \fi
+        }{}%
+      }{}%
+    \fi\fi
+  }%
+}
+
+\def\magyar at ulladik{ulladik0}% [Nn]ulladik, `0' at end is intentional
+
+\def\@@magyar at macro@appendixname{\appendixname}
+
+%** \thechapter (possibly with huordinal), dot, space.
+\def\magyar at huordinal@chapterheaddot{%
+  \ifx\@chapapp\@@magyar at appendixname \thechapter\hbox{\magyar at opt@@titleskip}% appendixdot=no
+  \else\ifx\@chapapp\@@magyar at macro@appendixname \thechapter.~%
+  \else\ifnum\magyar at opt@@chapternumber=1 \@huordinal\c at chapter~%
+  \else\ifnum\magyar at opt@@chapternumber=2 \@Huordinal\c at chapter~%
+  \else \thechapter.~%
+  \fi\fi\fi\fi
+}
+
+%** \thepart (possibly with huordinal), dot, space.
+\def\magyar at huordinal@partheaddot{%
+  \ifnum\magyar at opt@@partnumber=1 \@huordinal\c at part~%
+  \else\ifnum\magyar at opt@@partnumber=2 \@Huordinal\c at part~%
+  \else \thepart.~%
+  \fi\fi
+}
+
+%** Emits the rule to the running head. Must put something of zero width
+%** to the horizontal list.
+%** @param #1 0: even page, 1: odd page, 3: page w/o [twoside]
+\def\@@magyar at headrule#1{}
+\def\@@magyar at slshape{}% running head is not slanted
+
+\ifx\magyar at opt@@classmod\@empty
+  \let\@@magyar at ifclassloaded\@ifclassloaded
+\else
+  \def\@@magyar at ifclassloaded#1#2{% force specific class
+    \def\reserved at a{#1}%
+    \ifx\reserved at a\magyar at opt@@classmod #2\fi
+   }
+\fi
+
+\@@magyar at ifclassloaded{amsbook}{%
+  \let\magyar at hunumbers@errmsg\@empty
+  \let\@@magyar at orig@makechapterhead\@makechapterhead
+  \def\@makechapterhead#1{%
+    \begingroup
+    \let\@@magyar at orig@centerline\centerline
+    \def\centerline##1{%
+      \@@magyar at orig@centerline{%
+        \normalsize\mdseries
+        \ifx\chaptername\appendixname  % We're in the appendix.
+          \ifx\@@magyar at appendixname\@empty
+            % print a dot in the appendix only if appendixdot=yes
+            \thechapter.~%
+          \else
+            \thechapter\hbox{\magyar at opt@@titleskip}%
+          \fi
+        \else\ifnum\magyar at opt@@chapternumber=1
+          \uppercase\@xp{\@huordinal\c at chapter}~%
+        \else\ifnum\magyar at opt@@chapternumber=2
+          \uppercase\@xp{\@Huordinal\c at chapter}~%
+        \else\thechapter.~%
+        \fi\fi\fi
+        \uppercase\@xp{\chaptername}%
+      }%
+    }%
+    \@@magyar at orig@makechapterhead{#1}%
+    \endgroup
+  }%
+  \let\@@magyar at orig@chapter\@chapter
+  \def\@chapter{%
+    \let\@@magyar at orig@chapter at typeout\typeout
+    \def\typeout##1{%
+      % Original: \typeout{\chaptername\space\@secnumber}
+      \@@magyar at orig@chapter at typeout{%
+        \ifnum\c at secnumdepth<\z@
+          \chaptername\space
+        \else
+          \thechapter\ifx\chaptername\appendixname\else.\fi
+          \space\chaptername
+        \fi
+      }%
+      \let\typeout\@@magyar at orig@chapter at typeout
+    }%
+    \@@magyar at 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 at 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 at secnumdepth >-2\relax
+         {\fontsize{\@xviipt}{22}\bfseries
+          \ifnum\magyar at opt@@partnumber=1      \@huordinal\c at part~%
+          \else\ifnum\magyar at opt@@partnumber=2 \@Huordinal\c at part~%
+          \else\thechapter.~%
+          \fi\fi
+          \partname
+         } \vskip 20\p@ \fi
+    \fontsize{\@xxpt}{25}\bfseries
+        #1\vfil\vfil\endgroup \newpage\thispagestyle{empty}}
+}{}
+
+\@@magyar at ifclassloaded{book}{%
+  \let\magyar at hunumbers@errmsg\@empty
+  % Headings: inserting dots, changing orders
+  %\def\@@magyar at appendixname{\appendixname}% by appendixdot=
+  \def\@@magyar at overridden@psheadings{%
+    \if at twoside
+      \let\@oddfoot\@empty\let\@evenfoot\@empty
+      \def\@evenhead{\@@magyar at headrule0\thepage\hfil\@@magyar at slshape\leftmark}%
+      \def\@oddhead {\@@magyar at headrule1{\@@magyar at slshape\rightmark}\hfil\thepage}%
+      \let\@mkboth\markboth
+      \def\chaptermark##1{%
+	\markboth {\MakeUppercase{%
+	  \ifnum \c at secnumdepth >\m at ne
+	    \if at mainmatter% Dat: mainmatter only in book.cls, not in report.cls
+              \magyar at huordinal@chapterheaddot
+	      \@chapapp.\magyar at opt@@hdrtitleskip% \ %
+	    \fi
+	  \fi
+	  ##1}}{}}%
+      \def\sectionmark##1{%
+	\markright {\MakeUppercase{%
+	  \ifnum \c at secnumdepth >\z@
+	    \thesection.\magyar at opt@@hdrtitleskip% \ %
+	  \fi
+	  ##1}}}%
+    \else
+      \let\@oddfoot\@empty
+      \def\@oddhead{\@@magyar at headrule3{\@@magyar at slshape\rightmark}\hfil\thepage}%
+      \let\@mkboth\markboth
+      \def\chaptermark##1{%
+	\markright {\MakeUppercase{%
+	  \ifnum \c at secnumdepth >\m at ne
+	    \if at mainmatter
+               \magyar at huordinal@chapterheaddot
+               \@chapapp.\magyar at opt@@hdrtitleskip% \ %
+	    \fi
+	  \fi
+	  ##1}}}%
+    \fi
+  }%
+  \expandafter\magyar at def@psheadings\expandafter{\CurrentOption}{book}%
+  % Part: inserting dot, changing order, toc
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \babel at save\@part
+    \def\@part[#1]#2{% book
+        \ifnum \c at secnumdepth >-2\relax
+          \refstepcounter{part}%
+          \ifnum\magyar at opt@@partnumber>0 \protected at edef\@currentlabel{\@huordinal\c at part}\fi
+          \addcontentsline{toc}{part}{\thepart.\hspace{1em}#1}%
+        \else
+          \addcontentsline{toc}{part}{#1}%
+        \fi
+        \markboth{}{}%
+        {\centering
+         \interlinepenalty \@M
+         \normalfont
+         \ifnum \c at secnumdepth >-2\relax
+	   \huge\bfseries \magyar at huordinal@partheaddot\partname% hu
+           \csname par\endcsname
+           \vskip 20\p@
+         \fi
+         \Huge \bfseries #2\csname par\endcsname}%
+        \@endpart}}
+  % Chapter: dot, changing typeout, toc
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \babel at save\@chapter
+    \def\@chapter[#1]#2{% !! don't \def, but \let, other places, too
+      \ifnum \c at secnumdepth >\m at ne
+         \if at mainmatter
+           \refstepcounter{chapter}%
+           \typeout{\thechapter\ifx\@chapapp\@@magyar at appendixname\else.\fi\space\@chapapp.}%
+           \ifx\@chapapp\@@magyar at appendixname
+             % \@gobble gobbles the dot emitted by \numberline.
+             \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter\protect\@gobble}#1}%
+           \else
+             \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
+           \fi
+           \ifx\@chapapp\@@magyar at appendix@chapapp\else
+             \ifnum\magyar at opt@@chapternumber>0 \protected at edef\@currentlabel{\@huordinal\c at chapter}\fi
+           \fi
+         \else
+           \addcontentsline{toc}{chapter}{#1}%
+         \fi
+      \else
+        \addcontentsline{toc}{chapter}{#1}%
+      \fi
+      \chaptermark{#1}%
+      \addtocontents{lof}{\protect\addvspace{10\p@}}%
+      \addtocontents{lot}{\protect\addvspace{10\p@}}%
+      \if at twocolumn
+        \@topnewpage[\@makechapterhead{#2}]%
+      \else
+        \@makechapterhead{#2}%
+        %\csname par\endcsname
+	\@afterheading % Imp: why doesn't it work?
+      \fi}}
+  \if0\magyar at opt@@chapterhead\else
+    % Chapter: dot, changing order
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      \babel at save\@makechapterhead
+      \def\@makechapterhead#1{%
+        \vspace*{50\p@}%
+        {\parindent \z@ \raggedright \normalfont
+          \ifnum \c at secnumdepth >\m at ne
+            \if at mainmatter
+              \huge\bfseries
+              \magyar at huordinal@chapterheaddot \@chapapp{}%
+              \csname par\endcsname\nobreak
+              \vskip 20\p@
+            \fi
+          \fi
+          \interlinepenalty\@M
+          \Huge \bfseries #1\csname par\endcsname\nobreak
+          \vskip 40\p@
+        }}%
+    }%
+  \fi
+}{}
+
+\@@magyar at ifclassloaded{report}{%
+  \let\magyar at hunumbers@errmsg\@empty
+  %\def\@@magyar at appendixname{\appendixname}% by appendixdot=
+  % Headings: inserting dots, changing orders
+  \def\@@magyar at overridden@psheadings{%
+    \if at twoside
+      \let\@oddfoot\@empty\let\@evenfoot\@empty
+      \def\@evenhead{\@@magyar at headrule0\thepage\hfil\@@magyar at slshape\leftmark}%
+      \def\@oddhead {\@@magyar at headrule1{\@@magyar at slshape\rightmark}\hfil\thepage}%
+      \let\@mkboth\markboth
+      \def\chaptermark##1{%
+	\markboth {\MakeUppercase{%
+	  \ifnum \c at secnumdepth >\m at ne
+            \magyar at huordinal@chapterheaddot
+	    \@chapapp.\magyar at opt@@hdrtitleskip% \ %
+	  \fi
+	  ##1}}{}}%
+      \def\sectionmark##1{%
+	\markright {\MakeUppercase{%
+	  \ifnum \c at secnumdepth >\z@
+	    \thesection.\magyar at opt@@hdrtitleskip% \ %
+	  \fi
+	  ##1}}}%
+    \else
+      \let\@oddfoot\@empty
+      \def\@oddhead{%
+        \@@magyar at headrule3{\@@magyar at slshape\rightmark}\hfil\thepage}%
+      \let\@mkboth\markboth
+      \def\chaptermark##1{%
+	\markright{\MakeUppercase{%
+	  \ifnum \c at secnumdepth >\m at ne
+            \magyar at huordinal@chapterheaddot
+	    \@chapapp.\magyar at opt@@hdrtitleskip% \ %
+	  \fi
+	  ##1}}}%
+    \fi
+  }%
+  \expandafter\magyar at def@psheadings\expandafter{\CurrentOption}{report}%
+  % Chapter: dot, changing typeout, toc
+  % Part...
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \babel at save\@chapter
+    \def\@chapter[#1]#2{%
+      \ifnum \c at secnumdepth >\m at ne
+           \refstepcounter{chapter}%
+           \typeout{\thechapter\ifx\@chapapp\@@magyar at appendixname\else.\fi\space\@chapapp.}%
+           \ifx\@chapapp\@@magyar at appendixname
+             % \@gobble gobbles the dot emitted by \numberline.
+             \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter\protect\@gobble}#1}%
+           \else
+             \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#1}%
+           \fi
+           \ifx\@chapapp\@@magyar at appendix@chapapp\else
+             \ifnum\magyar at opt@@chapternumber>0 \protected at edef\@currentlabel{\@huordinal\c at chapter}\fi
+           \fi
+      \else
+        \addcontentsline{toc}{chapter}{#1}%
+      \fi
+      \chaptermark{#1}%
+      \addtocontents{lof}{\protect\addvspace{10\p@}}%
+      \addtocontents{lot}{\protect\addvspace{10\p@}}%
+      \if at twocolumn
+        \@topnewpage[\@makechapterhead{#2}]%
+      \else
+        \@makechapterhead{#2}%
+        \@afterheading
+      \fi}%
+    \babel at save\@part
+    \def\@part[#1]#2{% report; added at Fri Jul 23 11:45:57 CEST 2004
+      \ifnum \c at secnumdepth >-2\relax
+	\refstepcounter{part}%
+        \ifnum\magyar at opt@@partnumber>0 \protected at edef\@currentlabel{\@huordinal\c at part}\fi
+        \addcontentsline{toc}{part}{\thepart.\hspace{1em}#1}%
+      \else
+	\addcontentsline{toc}{part}{#1}%
+      \fi
+	\markboth{}{}% %%%%% \l at chapter in report.cls
+	{\centering
+	 \interlinepenalty \@M
+	 \normalfont
+	 \ifnum \c at secnumdepth >-2\relax
+	   \huge\bfseries \magyar at huordinal@partheaddot\partname% hu
+	   \csname par\endcsname
+	   \vskip 20\p@
+	 \fi
+	 \Huge \bfseries #2\csname par\endcsname}%
+	\@endpart}%
+  }
+  \if0\magyar at opt@@chapterhead\else
+    % Chapter: dot, changing order
+    \expandafter\addto\csname extras\CurrentOption\endcsname{%
+      \babel at save\@makechapterhead
+      \def\@makechapterhead#1{%
+        \vspace*{50\p@}%
+        {\parindent \z@ \raggedright \normalfont
+          \ifnum \c at secnumdepth >\m at ne
+              \huge\bfseries
+	      \magyar at huordinal@chapterheaddot \@chapapp{}%
+              \vskip 20\p@
+          \fi
+          \interlinepenalty\@M
+          \Huge \bfseries #1\csname par\endcsname\nobreak
+          \vskip 40\p@
+        }}%
+    }%
+  \fi
+}{}
+
+\@@magyar at ifclassloaded{article}{%
+  % article.cls has no \chapter. We'll hook \part below though.
+  \let\magyar at hunumbers@errmsg\@empty
+  % Headings: inserting dots
+  % In order for this to take effect, \pagestyle{plain} should be put below
+  % \begin{document}.
+  \def\@@magyar at overridden@psheadings{%
+    \if at twoside
+        \let\@oddfoot\@empty\let\@evenfoot\@empty
+        % Dat: by pts: \slshape -> \relax
+        \def\@evenhead{\@@magyar at headrule0\thepage\hfil\@@magyar at slshape\leftmark}%
+        \def\@oddhead {\@@magyar at headrule1{\@@magyar at slshape\rightmark}\hfil\thepage}%
+        \let\@mkboth\markboth
+      \def\sectionmark##1{%
+        \markboth {\MakeUppercase{%
+          \ifnum \c at secnumdepth >\z@
+            \thesection.\magyar at opt@@hdrtitleskip
+          \fi
+          ##1}}{}}%
+      \def\subsectionmark##1{%
+        \markright {%
+          \ifnum \c at secnumdepth >\@ne
+            \thesubsection.\magyar at opt@@hdrtitleskip
+          \fi
+          ##1}}%
+    \else
+      \let\@oddfoot\@empty
+      \def\@oddhead{\@@magyar at headrule3{\@@magyar at slshape\rightmark}\hfil\thepage}%
+      \let\@mkboth\markboth
+      \def\sectionmark##1{%
+        \markright {\MakeUppercase{%
+          \ifnum \c at secnumdepth >\m at ne
+            \thesection.\magyar at opt@@hdrtitleskip
+          \fi
+          ##1}}}
+    \fi}%
+  \expandafter\magyar at def@psheadings\expandafter{\CurrentOption}{article}%
+  \expandafter\addto\csname extras\CurrentOption\endcsname{%
+    \babel at save\@part
+    \def\@part[#1]#2{% article % added at Fri Jul 23 11:45:57 CEST 2004
+      \ifnum \c at secnumdepth >\m at ne
+	\refstepcounter{part}%
+        \ifnum\magyar at opt@@partnumber>0 \protected at edef\@currentlabel{\@huordinal\c at part}\fi
+        \addcontentsline{toc}{part}{\thepart.\hspace{1em}#1}%
+      \else
+	\addcontentsline{toc}{part}{#1}%
+      \fi
+      {\parindent \z@ \raggedright
+       \interlinepenalty \@M
+       \normalfont
+       \ifnum \c at secnumdepth >\m at ne
+         \Large\bfseries \magyar at huordinal@partheaddot\partname% hu
+	 \csname par\endcsname\nobreak
+       \fi
+       \huge \bfseries #2%
+       \markboth{}{}\csname par\endcsname}%
+      \nobreak
+      \vskip 3ex
+      \@afterheading}}%
+}{}
+
+\@@magyar at ifclassloaded{letter}{%
+  % letter.cls has no \part or \chapter. No need to hook anything here, but
+  % we make \magyar at hunumbers@errmsg just to pacify
+  % `\PassOptionsToPackage{defaults=prettiest}{magyar.ldf}'.
+  \let\magyar at hunumbers@errmsg\@empty
+  % Headings: inserting dots
+  % In order for this to take effect, \pagestyle{plain} should be put below
+  % \begin{document}.
+  \def\@@magyar at overridden@psheadings{%
+    \if at twoside
+        \let\@oddfoot\@empty\let\@evenfoot\@empty
+        \def\@oddhead{\@@magyar at headrule3\@@magyar at slshape\headtoname{:} \ignorespaces\toname
+                      \hfil \@date
+                      \hfil \thepage.~\pagename}%
+        \let\@evenhead\@oddhead
+    \else
+        \let\@oddfoot\@empty
+        \def\@oddhead{\@@magyar at headrule3\@@magyar at slshape\headtoname{:} \ignorespaces\toname
+                      \hfil \@date
+                      \hfil \thepage.~\pagename}%
+    \fi}%
+  \expandafter\magyar at def@psheadings\expandafter{\CurrentOption}{letter}%
+}{}
+\@gobble
+{^}%
+
+% --- mond=
+
+\if0\magyar at opt@@mond \@@magyar at skiplong\fi
+%** Dat: `--\enspace' would be too much
+%** Use this in the beginning of the paragraph.
+\def\@@magyar at mond{%
+  % Dat: \noindent after \subsection in article.cls
+  % Dat: \indent after \subsection in amsart.cls (\@noskipsecfalse)
+  % vvv Dat: strange: \ifvmode anf \if at noskipsec.
+  \ifvmode\if at noskipsec\leavevmode\fi\par\vskip-\parskip
+  \else\@noskipsecfalse\par\vskip-\parskip\fi
+  \leavevmode--\hbox{ }}
+\ifnum\magyar at opt@@mond \expandafter\ifx\csname mond\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \let\mond\@@magyar at mond
+\fi
+\@gobble
+{^}%
+
+% --- hang=
+
+\if0\magyar at opt@@hang \@@magyar at skiplong\fi
+%** Usage: \hang{-- } Foo\par
+\def\@@magyar at hang#1{%
+  \begingroup
+  \setbox0\hbox{#1}%
+  \advance\linewidth-\wd0 % not \hsize
+  \advance\@totalleftmargin\wd0
+  \edef\reserved at a{\parshape=1 \the\@totalleftmargin\space\space\the\linewidth\space}%
+  \par\noindent\kern-\wd0 \box0 % Dat: \box0 destroys \wd0
+  \expandafter\endgroup\expandafter\begingroup\reserved at a
+  \let\hang@@par\par
+  \def\par{\hang@@par\endgroup}% OK, works even inside \begin{quotation}
+  %\def\par{\endgroup\par}% doesn't work, restores \parshape too early
+  \ignorespaces
+}%
+\ifnum\magyar at opt@@hang \expandafter\ifx\csname hang\endcsname\relax1\fi>1 % 21, 2, 11, 1
+  \let\hang\@@magyar at hang
+\fi
+\@gobble
+{^}%
+
+% vvv hyphenmins=
+
+\ifx\magyar at opt@@hyphenmins\@empty\else
+  \edef\reserved at a{\noexpand\@namedef{\CurrentOption hyphenmins}{\magyar at opt@@hyphenmins}}
+  \reserved at a
+\fi
+
+% !!
+
+%\def\skipfoo #1foo {%
+%  \ifx#1\hfuzz\else
+%    (#1)%
+%    \expandafter\skipfoo
+%  \fi
+%}
+
+
+% vvv cjhebrewfix= % by pts at fazekas.hu at Tue Apr 19 18:26:54 CEST 2005
+%     thanks to Zolt\xE1n Hamar for reporting the problem
+% Dat: the ultimate solution is active=onlycs, but it limits other
+%      functionality
+% Dat: use \def\h{\cjRL} in the preamble to abbreviate \cjRL
+%      wrong: \let\h\cjRL
+%      wrong: \newcommand{\h}[1]{\cjRL{#1}}
+% Dat: cjhebrew uses the following strings for typesetting Hebrew letters:
+%      ' b g d h w z .h .t y k K l m M n N s ` p P .s .S q r ,s +s t * a a:
+%      /a e i o O u U E E: A A: | * : ; --
+% Dat: headings in `\pagestyle{headings} \section{(\cjRL{`l})}' doesn't work
+%      as expected, because \MakeUppercase capitalizes the L, too.
+%      Solution #1:
+%        \DeclareRobustCommand\mycjcommand{\cjRL{`l}}
+%        \section{(\mycjcommand)}
+%      Solution #2: (won't convert any heading to uppercase)
+%        % change the definition of \ps at headings, remove \MakeUppercase
+%        \makeatletter \def\ps at headings{%
+%          \let\@oddfoot\@empty \let\@mkboth\markboth  
+%          \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%  
+%          \def\sectionmark##1{\markright {\iffalse\MakeUppercase\fi{%
+%            \ifnum \c at secnumdepth >\m at ne \thesection\quad \fi##1}}}}
+\if0\magyar at opt@@cjhebrewfix \@@magyar at skiplong\fi
+% Dat: \cjRL{`l} in cjhebrew.sty should typeset two letters, but typesets
+%      only one if ` is \active. Use this code to fix it.
+% Imp: also fix in command arguments etc. Change catcode later.
+\if1\magyar at opt@@cjhebrewfix % =onlyouter
+% Dat: this doesn't work in the argument of \section etc., but it allows
+%      LaTeX commands (\) in the arg of \cjRL
+\def\@@magyar at cjhebrewfix{%
+  \let\@@magyar at orig@cjRL\cjRL
+  \def\cjRL{\begingroup\catcode\string``=12 \@@magyar at cjRL@low}%
+  \def\@@magyar at cjRL@low##1{\@@magyar at orig@cjRL{##1}\endgroup}}
+\else % =yes
+% Dat: this works in the argument of \section etc., but it doesn't allow
+%      LaTeX commands (\) in the arg of \cjRL
+\def\reserved at b{\protect}
+\edef\reserved at b{\expandafter\strip at prefix\meaning\reserved at b}
+%\show\reserved at b
+\edef\reserved at a{%
+  \noexpand\def\noexpand\@@magyar at cjhebrew@skipa##1\reserved at b{%
+  \noexpand\ifx##1\noexpand\hfuzz\noexpand\@empty\noexpand\else
+    ##1%(##1)%
+    \noexpand\expandafter\noexpand\@@magyar at cjhebrew@skipa
+  \noexpand\fi}%
+  \noexpand\def\noexpand\@@magyar at cjhebrew@skipb##1\noexpand\hfuzz{% Dat: this removes all `\protect '
+    \noexpand\@@magyar at cjhebrew@skipa##1\reserved at b\noexpand\hfuzz\reserved at b}}
+\reserved at a
+\def\@@magyar at cjhebrewfix{%
+  \let\@@magyar at orig@cjRL\cjRL
+  %\let\@@magyar at orig@cjRL\bf
+  \DeclareRobustCommand\cjRL[1]{\begingroup
+    \toks@{##1}%
+    %\showthe\toks@
+    \edef\reserved at a{\the\toks@}%
+    \edef\reserved at a{\expandafter\strip at prefix\meaning\reserved at a}%
+    % Dat: we're almost complete here, but 1st we want to remove all
+    %      instances of `\protect ' (catcodes 12 and 10), which were inserted
+    %      into \firstmark, i.e. with \section{A\cjRL{`l}B}, \firstmark
+    %      becomes: `{}{\protect \csname foreignlanguage \endcsname {magyar}{\protect \MakeUppercase {1\hskip 1em\relax A\protect \cjRL  {\protect `l}B}}}'
+    \edef\reserved at a{\expandafter\@@magyar at cjhebrew@skipb\reserved at a\hfuzz}%
+    %\show\reserved at a
+    \expandafter\@@magyar at orig@cjRL\expandafter{\reserved at a}\endgroup}}
+\fi
+\AtBeginDocument{\ifx\cjRL\@undefined\else\@@magyar at cjhebrewfix\fi}
+\@gobble
+{^}%
+
+% vvv varioref=
+
+\if0\magyar at opt@@varioref \@@magyar at skiplong\fi
+\expandafter\addto\csname extras\CurrentOption\endcsname{%
+  \@@magyar at setup@varioref} % Dat: we are we late enough so we override varioref.sty
+% vvv don't apply changes if varioref.sty wasn't loaded 
+\AtBeginDocument{\expandafter\ifx\csname vpagerefrange\endcsname\relax
+  \let\@@magyar at setup@varioref\@empty\fi}
+\def\@@magyar at setup@varioref{% Dat: must be a separate macro for suggestions= not to find our \reftextfaceafter etc.
+  \def\reftextfaceafter {\reftextvario{a t\'ul\-ol\-da\-lon}{a k\"o\-vet\-kez\H{o} ol\-da\-lon}}%
+  \def\reftextfacebefore{\reftextvario{a t\'ul\-ol\-da\-lon}{az el\H{o}\-z\H{o} ol\-da\-lon}}%
+  \def\reftextafter     {a k\"o\-vet\-kez\H{o} ol\-da\-lon}%
+  \def\reftextbefore    {az el\H{o}\-z\H{o} ol\-da\-lon}%
+  \def\reftextcurrent   {ezen az ol\-da\-lon}%
+  \def\reftextfaraway##1{a~\csname @@magyar at az@lowxu\endcsname{\pageref{##1}}.~ol\-da\-lon}%
+  \def\reftextpagerange##1##2{a~\csname @@magyar at az@lowxu\endcsname{\pageref{##1}}%
+    --\pageref{##2}.~ol\-da\-la\-kon}%
+  \def\reftextlabelrange##1##2{{}\csname @@magyar at told\endcsname\ref{##1}+tol{}
+    \ref{##2}-ig}% Dat: `{}' is here for anti-\capitalize
+}
+\@gobble
+{^}%
+
+% vvv fancyhdr=
+%
+% Dat: magyar.ldf has to be loaded first, otherwise it cannot fix
+%      `\usepackage{fancyhdr} \pagestyle{fancy}'
+
+\if0\magyar at opt@@fancyhdr \@@magyar at skiplong\fi
+\expandafter\ifx\csname ps at fancy\endcsname\relax
+  % Emit a warning if \pagestyle{fancy} is used after this.
+  % The original definition: \def\ps at fancy{\@fancyplainfalse\ps@@fancy}
+  \def\@@magyar@@ps at fancy{\@fancyplainfalse\ps@@fancy}%
+\else
+  \addto\ps at fancy{% works for article.cls, report.cls and book.cls
+    \@ifundefined{chapter}{%
+      % article:
+      % > \sectionmark=macro:
+      %#1->\markboth {\MakeUppercase {\ifnum \c at secnumdepth >\z@
+      %\thesection \hskip 1em\relax \fi #1}}{}.
+      \def\sectionmark#1{\markboth{\MakeUppercase{\ifnum \c at secnumdepth>\z@
+        \thesection.\magyar at opt@@hdrtitleskip \fi #1}}{}}%
+      % vvv Imp: do we need \if at twoside to set \subsectionmark here?
+      % #1->\markright {\ifnum \c at secnumdepth >\@ne \thesubsection
+      % \hskip 1em\relax \fi #1}.
+      \def\subsectionmark#1{\markright {\ifnum \c at secnumdepth >\@ne
+        \thesubsection.\magyar at opt@@hdrtitleskip \fi #1}}%
+    }{\def\chaptermark#1{
+        \markboth{\MakeUppercase{\ifnum \c at secnumdepth>\m at ne
+        % report.cls doesn't have \if at mainmatter, so we replace it with \iftrue
+        \@gobble\iftrue  % balance for quick skipping
+        \@@magyar at ifmainmatter  % must be macro if quick skipping
+        \magyar at huordinal@chapterheaddot
+        \@chapapp.\magyar at opt@@hdrtitleskip
+        \fi  % for \if at mainmatter
+        \fi#1}}{}}%
+      \def\sectionmark#1{\markright{\MakeUppercase{\ifnum \c at secnumdepth>\z@
+        \thesection.\magyar at opt@@hdrtitleskip \fi#1}}}}}%
+  \def\@@magyar@@ps at fancy{\relax}% must be done after suggestions=
+\fi
+% This definition must be outside \iffalse.
+\def\@@magyar at ifmainmatter{%
+  \csname \ifx\if at mainmatter\@undefined iftrue\else if at mainmatter\fi
+  \endcsname}
+\@gobble
+{^}%
+
+% vvv ntheoremfix=
+
+%** Fix for the `! Undefined control sequence. \select' error message with
+%** ntheorem.sty
+%**
+%** The reason for the error is that magyar.ldf emits
+%** \select at language{magyar} into .thm files (as well as .toc, .lof, .lot
+%** etc. files), and LaTeX cannot read those files without \makeatletter
+%** because of the @ in the \select at language command.
+%**
+%** Our solution: add \makeatletter somewhere before \@input{\jobname.thm} to
+%** the macro which reads the .thm file (\thm at processlist) in ntheorem.sty .
+\if0\magyar at opt@@ntheoremfix \@@magyar at skiplong\fi
+  \def\magyar@@ntheoremfix{%
+    \expandafter\ifx\csname ver at ntheorem.sty\endcsname\relax\else
+      \ifx\thm at processlist\@undefined\else
+        % This doesn't work, because the body of \thm at processlist contains #
+        %\expandafter\def\expandafter\thm at processlist\expandafter{%
+        %  \expandafter\begingroup\expandafter\makeatletter
+        %  \thm at processlist\endgroup}%
+        \expandafter\@temptokena\expandafter{%
+          \expandafter\begingroup\expandafter\makeatletter
+          \thm at processlist\endgroup}%
+        \edef\thm at processlist{\the\@temptokena}%
+      \fi
+    \fi
+  }
+  \AtBeginDocument{\magyar@@ntheoremfix}
+  \@gobble
+{^}%
+
+% vvv extras=, must be last
+
+\ifnum\magyar at opt@@extras=0
+  % Dat: \extrasmagyar might break compatibility with future LaTeX packages.
+  %      Use this option to turn all of them off, for debugging purposes.
+  \expandafter\let\csname extras\CurrentOption\endcsname\@empty
+  \expandafter\let\csname noextras\CurrentOption\endcsname\@empty
+\fi
+
+% --- Finish
+
+\ldf at finish\CurrentOption% \input \CurrentOption.cfg
+
+% !! doc: (\string!)
+% !! doc: \umlautlow is much more important in OT1 cmr fonts than in T1
+% !! %** @example \xE9rtelmez\xE9s\/be\xE1ll\xEDt\xE1s
+%    \def\per{/\penalty\exhyphenpenalty\hskip\z at skip}
+% !! \itemize identation
+% !! layout.sty
+%\DeclareOption{magyar}{%
+%  \def\Headertext{Fejl\'ec}
+%  \def\Bodytext{A dokumentum teste\qquad}
+%  \def\Footertext{L\'abl\'ec}
+%  \def\MarginNotestext{Sz\'el-\\jegyzet}
+%  \def\oneinchtext{1 inch}
+%  \def\notshown{nem l\'atszik}
+%  }
+% !! vvv this w/ and w/o nathb.sty: $H_{`symm}$, $H_``symm $
+%\let\@@magyar at saved@mathoptions at on\mathoptions at on
+%\def\mathoptions at on{% overrides nath.sty
+%  \catcode``12 % deactivate
+%  \begingroup\lccode`~``\lowercase{\endgroup\def~}{\abbreviation}%
+%  % ^^^ \def`{\abbreviation}, but with active `
+%  \@@magyar at saved@mathoptions at on
+%}
+% !! doc: hegyes`-sz\xF6g\xFB
+% !! option to detect new magyar.ldf from a TeX file
+% !! book.cls \appendix \chapter, sub-numbers into TOC, need dot after `A. f\xFCggel\xE9k'? Gyurgy\xE1k recommends `1. f\xFCggel\xE9k'.
+% !! \MathReal, frenchb.ldf, \nombre
+% !! \told\ref{foo}+ban{}, if \foo expands to empty (no \section etc. in .tex file)
+% !! french.ldf number decimal comma etc.
+% !! \hunnewlabel should store `table', `figure', `section', `equation' etc.
+% !! letter.cls
+% !! should \newlabel emit a `.' ? (now doesn't) -- compatibility
+%    `\aref{ekezetek}.\ t\xE1bl\xE1zat' needs explicit `.'
+% !! alternative solutions for meny-nyi (possibly defining ligatures?)
+% !! baseline grid?
+% !! Bujdos\xF3`--Wettl: http://www.math.bme.hu/~wettl/plcv/pdf/BWfinal.pdf
+% !!   some comments not related to magyar.ldf, but to *hyph.tex etc.
+% !!   add their postpara symbols
+% !!   section title sizes
+% !!   baseline grid
+% !!   rigid \parskip=0pt unless in prospestus or other short doc with \parindent=0pt
+% !!   add their \leftmargini and variations
+% !!   substitute bold-extended fonts with bold fonts
+% !!   no page numbers on blank pages
+% !!   \hsize <= 24cc (or 20cc) => parindent:=1quad else 2quad
+% !!   length of last line of par... (break line)
+% !!   reduce vertical whitespace around \section
+%
+% !! \MathReal{1.25 cm}
+% !! \H,\. in OT1 \texttt
+% !! maybe \index{|run husort.pl}
+% !! virtual fonts to support \umlauthigh and \umlautlow in T1 encoding
+%    fnt_def1: scaled size is relative (2^20==1), design size is absolute (same as in local TFM)
+%    disallowed DVI: bop,eop, >=243
+%    down(2^19) moves down 10/2 pt if the design size is 10pt
+%    dimensions must be <2^24 (160pt, ~5.62cm)
+%    w=x=y=z=0
+% !! \begin{description} \bf -> \em ?, auto-dot
+% !! \def\mdqon{\shorthandon{"}} \def\mdqoff{\shorthandoff{"}} (possibly deactivate `?' etc.)
+% !! fix \initiate at active@char for other languages
+% !! \addto\shorthandsspanish...
+% !! spanish.ldf \es at activate, \if at safe@actives\then
+% !! esperanto.ldf why? \declare at shorthand{system}{^}{\csname normal at char\string^\endcsname}
+% !! add other low accents for umlaut=low: \. (i) and \'
+% !! full amsart.cls compatibility??
+% !! huhyph.tex wrong \showhyphens{azthehe}% az-t-hehe
+% !! huhyph.tex wrong zs-hehe
+% !! huhyph.tex why sza-badstrand, but szbadsg-rand
+% !! \index{foo|hyperpagearg{\textbf}}
+% !! combine \magyar at opt@@titleskip, amstocnumskip and \magyar at post@...
+% !! \begin{textqq} ? combined command and env
+% !! tmagyar.tex \tableofcontents wide \section
+% !! \restoreparindent in \item in \itemize
+%    \edef\restoreparindent{\parindent\the\parindent\relax} in \@listi
+% !! 1848 m\xE1rcius+\xE1nak k\xF6zepe
+% !! should \told insert \, ?? (no, only \told*??)
+% !! \told45{-ed-hez} ??
+% !! \told{45}-ed-hez ??
+% !! \told45\od\hoz \told45+\od\hoz
+% !! \told45+adik+val +ad+val etc.
+% !! \azhuphy
+% !! \huphy{-3331234.5678pF^{-1}} -> $-$3\,331\,234,5678\,pF^{-1}
+% !! \huphy if non-Hungarian is the lang {,}->{.}
+% !! \huphy ifmmode?
+% !! french.ldf \CyrillicGuillemets
+% !! french.ldf \LasyGuillemets
+% !! huplain.bst   editor = "Wizar{\BN dj} V. Oz and Mihalis Yannakakis",
+% !! huplain.bst w/o magyar.ldf
+% !! hyperref.sty bugfix when turning hyperref.sty on, \ref is spoiled:
+%    w/ or w/o magyar.ldf
+%    ! Argument of \@fifthoffive has an extra }.
+%    <inserted text> 
+%                    \par 
+%    l.48 Ld. \ref{tab}
+% !! >    Kipr\xF3b\xE1ltam, s t\xE9nyleg pontosan ugyanaz a f\xE1jl magyar.ldf (texmf f\xE1ban) \xE9s
+%    > magyar-0510.ldf (aktu\xE1lis k\xF6nyvt\xE1rban) n\xE9ven m\xE1s eredm\xE9nyt ad.
+%    (cjhebrew)
+% !! a4wide.sty doesn't compile
+%    \documentclass[12pt,a4paper]{article}
+%    \usepackage{t1enc}                   
+%    \usepackage{times}% Imp: math mode
+%    \usepackage[magyar]{babel}
+%    \usepackage{graphicx}
+%    \usepackage[latin2]{inputenc}
+%    %\usepackage{a4wide}% SUXX: doesn't work with magyar.ldf
+%    \pagestyle{empty}
+%    \begin{document}
+% !! % Imp: magyar.ldf: \textdt{tudja`=e}, \textdt{tudja`-e};
+% !! space in front of `;' is too large with \usepackage{times}
+%    \declare at shorthand{\CurrentOption}{;}{\magyar at thinspaced;}
+% !! doc: `- not suitable in .bib files etc.
+% !! \cite{foo,bar} -> `[2, 1]' increasing order preferred
+% Imp: indent using the maximum footnotemark *** count on the current page
+% Imp: generate ,,harminch\xE1romb\xF3l'' by \told{\@huordinal{33}}+bol etc.
+%
+% Dat: \mathcode`\,="013B     % \xE9s \xEDgy a tizedes t\xF6rtekben matematikai m\xF3dban sem lesz k\xF6z
+% Dat:  \mathchardef\comma="613B  % a vesz\xF5 (,) ami matematikai m\xF3dban elv\xE1laszt\xF3 karakterk\xE9nt haszn\xE1lhat\xF3
+% Dat: additive \PassOptionsToPackage{foo=bar}{magyar.ldf}
+% Dat: for book.cls and article.cls: the user has to run \pagestyle{headings} after \selectlanguage{magyar} -- for performance reasons
+% Dat: doc: \let\@@magyar at setup@psheadings\relax maybe needed in the preamble 
+% Dat: \pagestyle{headings} is forced \AtBeginDocument -- user should change it later
+% Dat: babel.def assumes we have: \textquotedblright \textquoteright \ll \gg
+%      < >
+% Dat: babel.def defines for OT1 and others: \quotedblbase \quotesinglbase
+%      \guillemotleft \guillemotright \guilsinglleft \guilsinglright \ij \IJ
+%      \dj \DJ \SS 
+% Dat: babel.def defines the following robust commands in math and text modes:
+%      \glq \grq \glqq \grqq \flq \frq \flqq \frqq
+% Dat: OT1 encoding respects accents=low (\umlauthigh and \umlautlow), but T1
+%      doesn't -- but we need T1 for hyphenation of accented words
+% Dat: \usepackage{t1enc} is faster than \usepackage[T1]{fontenc}
+% Dat: \languageattribute should be specified in the document preamble, and
+%      not changed again
+% Dat: it is possible to have 1 letter, e.g \declare at shorthand{turkish}{=}{...}
+% Dat: Babel \@activated emits a \PackageInfo entry
+% Dat: (` `) is equivalent to (``), because TeX ignores spaces before macro
+%      arguments
+% Dat: example of the so-called ``dual load'':
+%      \PassOptionsToPackage{frenchspacing=yes}{magyar.ldf}
+%      \PassOptionsToPackage{frenchspacing=no}{hungarian.ldf}
+%      \usepackage[hungarian,magyar]{babel}
+% Dat: argument of \az and \told may not contain \if..., \else and \fi
+% OK: works with article.cls: (mathbrk=fix)
+%    \noindent \xE9s ebb\xF5l a tov\xE1bbi h\xE1rom r\xE9sz ter\xFClete
+%    $\displaystyle{1\over3}-{1\over 4}={1\over 12}$,
+%    $\displaystyle{1\over 2}-{1\over 4}={1\over 4}$ \xE9s
+%    $\displaystyle{1\over 4}+\bigg({1\over 2}-{1\over 3}\bigg)={1\over 4}+{1\over 6}}=\displaystyle{5\over 12}$
+%    ter\xFCletegys\xE9g. 
+% OK: doc in magyarldf-doc.tex: enumeration in math, see $a,\ b$ in nath.sty
+% OK: mathbrk=fix +\\+ (all binary ops and relations) in math, \nobreak\cdot, \nobreak\slash
+% OK: footnote text indented, asterisks on pages
+% OK: Kiss El\xF5d\nobreak\,\nobreak--\,Nagy P\xE1l ...
+% OK: \partname in book.cls (seems to work now)
+% OK: Els\xF5 r\xE9sz
+% OK: smartly disable active chars in preamble
+% OK: \@inpenc at undefined defined and != latin2 => recommend \usepackage[latin2]{inputenc}
+% OK: \encodingdefault != T1 => recommend \usepackage{t1enc}
+% OK: Warning if \l at hungarian vs \l at magyar undefined
+% OK: amsart.cls \listoftables overfull \hbox (\magyar at amslevelfix)
+% OK: dzs-dzs
+% OK: \expandafter\addto\csname extras\CurrentOption\endcsname{\bbl at frenchspacing}
+% OK: provide \magyarhyphenmins
+% OK: compatibility with latex.ltx, theorem.sty, ntheorem.sty, amsthm.sty
+% OK: \PackageWarning if \magyarOptions defined too late
+% OK: like frenchb.ldf \declare at shorthand{french}{;}{
+% OK: \told\ref{hellopart}+es{} r\xE9szt olvasd el.
+% OK: \told appends suffixes to numbers
+% OK: activeacute, activegrave babel options
+% OK: even more parts made conditional
+% OK: \@hunumeral \@huordinal \@Hunumeral \@Huordinal
+% OK: negative numbers \told-5-nek, `m\xEDnusz kettedik' etc.
+% OK: magyar.ldf defaults=hu-min (mathbrk=define) $x+116=\break x-97$ adds space only to BOL; added \nobreak before \discretionary -- and the problem was solved
+% OK: fixed. varioref.sty (2001/09/04 v1.3c) mustn't be loaded with option
+%     [magyar], because that option contains a stupid \AtBeginDocument hook
+%     added to \extrasmagyar
+% OK: Bujdos\xF3`--Wettl: add their {itemize} symbols and {enumerate} styles
+% OK: spacing around excl. marks in math mode  ! closing(5) -> punct(6)
+%     better solution (found in nath.sty): \def!{\mathchar20513\relax\mathopen{}\mathinner{}},
+%     because it doesn't need braces
+% No: \@makecaption in frenchb.ldf -> magyar.ldf
+
+\@@magyar at restcats
+\endinput% of magyar.ldf



More information about the tex-live-commits mailing list