% % magyar.ldf -- LaTeX Language Definition for `magyar' (Hungarian), v1.5b % written and copyright (C) by P\'eter SZAB\'O % (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 been 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öngyi Bujdosó 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@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}[2007/10/19 v1.5 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@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@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@error#1{\noexpand\PackageError{\CurrentOption.ldf}{#1}\noexpand\@ehc} % --- Declare options. % % Dat: \languageattribute{magyar}{...} and \bbl@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@enumarg#1#2{% \expandafter\ifx\csname magyar@opt@#1@@#2\endcsname\relax \@@magyar@error{Invalid arg for option: #1 = #2}% \else \csname magyar@opt@#1@@#2\endcsname \fi } \def\@@magyar@argw@no {0}% \def\@@magyar@argw@weak{1}% \def\@@magyar@argw@yes {2}% \def\magyar@yesweaknoarg#1#2{% \expandafter\ifx\csname @@magyar@argw@#2\endcsname\relax \@@magyar@error{Invalid arg for option: #1 = #2\MessageBreak Must be =no, =yes or =weak}% \else \expandafter\edef\csname magyar@opt@@#1\endcsname{\csname @@magyar@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álni %** 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 %** 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@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@opt@defaults@@over-1.4 {% \magyar@opt@accents@@defaulthigh \magyar@opt@active@@safe \magyar@opt@activeprefix{activeprefix}{babelopt2}% \magyar@opt@activespace@@none \magyar@opt@afterindent@@unchanged \magyar@opt@amslevelfix{amslevelfix}{fix-ams}% \magyar@opt@amsuppercasefix{amsuppercasefix}{fix-ams}% \magyar@opt@amspostsectiondot@@no% change over 1.4 \magyar@opt@amstocnumlang@@all \magyar@opt@amstocnumskip{amstocnumskip}{\enskip}% change over 1.4 \magyar@opt@appendixdot@@yes \magyar@opt@babelmarkfix@@yes \magyar@opt@az{az}{weak}% \magyar@opt@captionfix@@yes \magyar@opt@captions@@hu \magyar@opt@chapternumber@@unchanged \magyar@opt@classmod@@yes \magyar@opt@dottedtocline@@fix \magyar@opt@emitdate{emitdate}{weak}% \magyar@opt@extras@@yes \magyar@opt@chapterhead@@yes \magyar@opt@fancyhdr@@hu% !!! other places, too \magyar@opt@figurecaptions@@hu \magyar@opt@footnote@@yes \magyar@opt@frenchspacing@@unchanged \magyar@opt@hang{hang}{weak}% \magyar@opt@hunnewlabel@@yes \magyar@opt@hunumbers@@yes \magyar@opt@hutoday@@yes \magyar@opt@hyphenation{hyphenation}{huhyph3-or-any}% \magyar@opt@hyphenmins{hyphenmins}{22}% change over 1.4 Dat: Default LaTeX is {23} \magyar@opt@labelenums@@unchanged \magyar@opt@labelitems@@unchanged \magyar@opt@longcaption@@justified \magyar@opt@mathbrk@@define \magyar@opt@mathfactorial@@define \magyar@opt@mathhucomma@@define \magyar@opt@mathmuskips@@unchanged \magyar@opt@hynumberline@@unchanged \magyar@opt@mathreal{mathreal}{weak}% \magyar@opt@mond{mond}{weak}% \magyar@opt@openqq@@maybedown \magyar@opt@partnumber@@unchanged \magyar@opt@postpara{}{unchanged}% \magyar@opt@postsubpara{}{unchanged}% \magyar@opt@refstruc{refstruc}{weak}% \magyar@opt@sectiondot@@safe \magyar@opt@shorthandcs{shorthandcs}{\shu}% \magyar@opt@shortrefcmds@@yes \magyar@opt@showfix@@yes \magyar@opt@suggestions@@yes \magyar@opt@tablecaptions@@hu \magyar@opt@textqq{textqq}{weak}% \magyar@opt@theoremtitle@@hu \magyar@opt@titles{}{\enskip}% change over 1.4 \magyar@opt@toclang@@good \magyar@opt@told{told}{weak}% \magyar@opt@varioref@@hu \magyar@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@opt@defaults@@compat-1.4 {% \magyar@opt@accents@@defaulthigh% OK \magyar@opt@active@@safe% we don't want =problematic \magyar@opt@activeprefix@@grave% OK \magyar@opt@activespace@@none% OK \magyar@opt@afterindent@@unchanged% OK \magyar@opt@amslevelfix@@unchanged% OK \magyar@opt@amsuppercasefix@@unchanged% OK \magyar@opt@amspostsectiondot@@unchanged% OK \magyar@opt@amstocnumlang@@all% OK, irrelevant \magyar@opt@amstocnumskip{amstocnumskip}{}% OK \magyar@opt@appendixdot@@yes \magyar@opt@babelmarkfix@@unchanged \magyar@opt@az{az}{yes}% OK \magyar@opt@captionfix@@unchanged \magyar@opt@captions@@hu% OK \magyar@opt@chapterhead@@yes% OK \magyar@opt@chapternumber@@unchanged% OK \magyar@opt@classmod@@yes% OK \magyar@opt@dottedtocline@@unchanged% OK \magyar@opt@emitdate{emitdate}{no}% OK \magyar@opt@extras@@yes% OK \magyar@opt@fancyhdr@@hu \magyar@opt@figurecaptions@@hu% OK \magyar@opt@footnote@@unchanged% OK \magyar@opt@frenchspacing@@unchanged% OK \magyar@opt@hang{hang}{no}% OK \magyar@opt@hunnewlabel@@yes% OK \magyar@opt@hunumbers@@no% OK \magyar@opt@hutoday@@yes% OK \magyar@opt@hyphenation{hyphenation}{huhyph3-or-any}% OK \magyar@opt@hyphenmins{hyphenmins}{unchanged}% \magyar@opt@labelenums@@unchanged% OK \magyar@opt@labelitems@@unchanged% OK \magyar@opt@longcaption@@justified% OK \magyar@opt@mathbrk@@unchanged% OK \magyar@opt@mathhucomma@@unchanged% OK \magyar@opt@mathfactorial@@unchanged% OK \magyar@opt@mathmuskips@@unchanged% OK \magyar@opt@hynumberline@@unchanged% OK \magyar@opt@mathreal{mathreal}{no}% \magyar@opt@mond{mond}{no}% OK \magyar@opt@openqq@@maybedown% OK \magyar@opt@partnumber@@unchanged% OK \magyar@opt@postpara{}{unchanged}% OK \magyar@opt@postsubpara{}{unchanged}% OK \magyar@opt@refstruc{refstruc}{no}% OK \magyar@opt@sectiondot@@safe% we don't want =problematic \magyar@opt@shorthandcs{shorthandcs}{none}% OK \magyar@opt@shortrefcmds@@yes% OK \magyar@opt@showfix@@yes% OK \magyar@opt@suggestions@@no% OK -- user has explicity requested defaults=compat-1.4 \magyar@opt@tablecaptions@@hu% OK \magyar@opt@textqq{textqq}{no}% OK \magyar@opt@theoremtitle@@hu% OK \magyar@opt@titles{}{\quad}% OK -- ugly, but compatible \magyar@opt@toclang@@good% we don't want weird errors and mischosen languages (would be =badall) \magyar@opt@told{told}{no}% OK \magyar@opt@varioref@@hu% was =unchanged, but varioref.sty (2000) is buggy \magyar@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@opt@defaults@@safest{% \magyar@opt@accents@@defaulthigh \magyar@opt@active@@none \magyar@opt@activeprefix@@none \magyar@opt@activespace@@none \magyar@opt@afterindent@@unchanged \magyar@opt@amslevelfix@@unchanged \magyar@opt@amsuppercasefix{amsuppercasefix}{fix-ams}% \magyar@opt@amspostsectiondot@@unchanged \magyar@opt@amstocnumlang@@all% OK, irrelevant \magyar@opt@amstocnumskip{amstocnumskip}{}% \magyar@opt@appendixdot@@yes \magyar@opt@az{az}{no}% \magyar@opt@babelmarkfix@@yes \magyar@opt@captionfix@@yes \magyar@opt@captions@@unchanged \magyar@opt@chapternumber@@unchanged \magyar@opt@classmod@@unchanged \magyar@opt@dottedtocline@@unchanged \magyar@opt@emitdate{emitdate}{no}% \magyar@opt@extras@@no \magyar@opt@chapterhead@@no \magyar@opt@fancyhdr@@unchanged \magyar@opt@figurecaptions@@unchanged \magyar@opt@footnote@@unchanged \magyar@opt@frenchspacing@@unchanged \magyar@opt@hang{hang}{no}% \magyar@opt@hunnewlabel@@no \magyar@opt@hunumbers@@no \magyar@opt@hutoday@@no \magyar@opt@hyphenation{hyphenation}{huhyph3-or-any}% \magyar@opt@hyphenmins{hyphenmins}{unchanged}% \magyar@opt@labelenums@@unchanged \magyar@opt@labelitems@@unchanged \magyar@opt@longcaption@@unchanged \magyar@opt@mathbrk@@unchanged \magyar@opt@mathhucomma@@unchanged \magyar@opt@mathfactorial@@unchanged \magyar@opt@mathmuskips@@unchanged \magyar@opt@hynumberline@@unchanged \magyar@opt@mathreal{mathreal}{no}% \magyar@opt@mond{mond}{no}% \magyar@opt@openqq@@unchanged \magyar@opt@partnumber@@unchanged \magyar@opt@postpara{}{unchanged}% \magyar@opt@postsubpara{}{unchanged}% \magyar@opt@refstruc{refstruc}{no}% \magyar@opt@sectiondot@@none \magyar@opt@shorthandcs{shorthandcs}{none}% \magyar@opt@shortrefcmds@@no \magyar@opt@showfix@@no \magyar@opt@suggestions@@yes \magyar@opt@tablecaptions@@unchanged \magyar@opt@textqq{textqq}{no}% \magyar@opt@theoremtitle@@unchanged \magyar@opt@titles{}{unchanged}% \magyar@opt@toclang@@unchanged \magyar@opt@told{told}{no}% \magyar@opt@varioref@@unchanged \magyar@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@opt@defaults@@prettiest{% \magyar@opt@accents@@defaulthigh% {low} would have no effect with \usepackage{t1enc} \magyar@opt@active@@safe \magyar@opt@activeprefix{activeprefix}{babelopt2}% \magyar@opt@activespace@@safe \magyar@opt@afterindent@@unchanged% keep =force-no \magyar@opt@amslevelfix{amslevelfix}{fix-ams}% \magyar@opt@amsuppercasefix{amsuppercasefix}{fix-ams}% \magyar@opt@amspostsectiondot@@no \magyar@opt@amstocnumlang@@all \magyar@opt@amstocnumskip{amstocnumskip}{\enskip}% \magyar@opt@appendixdot@@no \magyar@opt@az{az}{yes}% \magyar@opt@babelmarkfix@@yes \magyar@opt@captionfix@@yes \magyar@opt@captions@@hu \magyar@opt@chapternumber@@unchanged \magyar@opt@classmod@@yes \magyar@opt@dottedtocline@@fix \magyar@opt@emitdate{emitdate}{yes}% \magyar@opt@extras@@yes \magyar@opt@chapterhead@@yes \magyar@opt@fancyhdr@@hu \magyar@opt@figurecaptions@@hu \magyar@opt@footnote@@yes \magyar@opt@frenchspacing@@yes \magyar@opt@hang{hang}{yes}% \magyar@opt@hunnewlabel@@yes \magyar@opt@hunumbers@@yes \magyar@opt@hutoday@@yes \magyar@opt@hyphenation{hyphenation}{composite-or-any}% \magyar@opt@hyphenmins{hyphenmins}{22}% Dat: Default LaTeX is {23} \magyar@opt@labelenums{labelenums}{hu-a}% \magyar@opt@labelitems@@hu \magyar@opt@longcaption@@centered \magyar@opt@mathbrk@@fix \magyar@opt@mathhucomma@@fix \magyar@opt@mathfactorial@@fix \magyar@opt@mathmuskips@@hu \magyar@opt@hynumberline@@hu \magyar@opt@mathreal{mathreal}{yes}% \magyar@opt@mond{mond}{yes}% \magyar@opt@openqq@@maybedown \magyar@opt@partnumber@@Huordinal \magyar@opt@postdescription{}{dot}% \magyar@opt@postpara{}{diamond}% \magyar@opt@postsubpara{}{star}% \magyar@opt@refstruc{refstruc}{yes}% \magyar@opt@sectiondot@@safe \magyar@opt@shorthandcs{shorthandcs}{\shu}% \magyar@opt@shortrefcmds@@no \magyar@opt@showfix@@yes \magyar@opt@suggestions@@yes \magyar@opt@tablecaptions@@hu \magyar@opt@textqq{textqq}{yes}% \magyar@opt@theoremtitle@@hu \magyar@opt@titles{}{\enskip}% \magyar@opt@toclang@@good \magyar@opt@told{told}{yes}% \magyar@opt@varioref@@hu \magyar@opt@cjhebrewfix@@yes } %** Matches Hungarian typographic orders most closely -- and most %** simplistically. \dMf magyar@opt@defaults@@hu-min {% \csname magyar@opt@defaults@@over-1.4\endcsname % Dat: no openqq=unchanged (!) \magyar@doopt activespace=safe,amstocnumskip=\enskip,frenchspacing=yes, captions=hu,classmod=yes,figurecaptions=hu, footnote=huplain,frenchspacing=yes,hyphenmins=22, labelenums=hu-d,labelitems=hu,fancyhdr=hu, longcaption=centered,mathbrk=fix,mathhucomma=fix, postpara=diamond,postsubpara=star,postdescription=dot, sectiondot=safe,tablecaptions=hu,theoremtitle=hu, appendixdot=no,hynumberline=hu, titles=\enskip,\hfuzz,% } \let\magyar@opt@defaults\magyar@enumarg \def\magyar@opt@safest@@yes{\magyar@opt@defaults@@safest} \def\magyar@opt@safest@@no{} \let\magyar@opt@safest\magyar@enumarg % Declare normal options. \def\magyar@opt@titles#1#2{\def\magyar@opt@@titleskip{#2}} \def\@@magyar@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@error{Option #4 needs [1-9][1-9], got #1#2}% \fi } \def\magyar@opt@hyphenmins#1#2{% \def\reserved@a{#2}% \ifx\reserved@a\magyar@@unchanged \let\magyar@opt@@hyphenmins\@empty \else \@@magyar@twodigitcheck#2..\hfuzz{#1}{#2}% \def\magyar@opt@@hyphenmins{#2}% \fi } \def\magyar@opt@amstocnumskip#1#2{\def\magyar@opt@@amstocnumskip{#2}} \def\magyar@opt@amstocnumlang@@all{\def\magyar@opt@@amstocnumlang{2}} \def\magyar@opt@amstocnumlang@@hu {\def\magyar@opt@@amstocnumlang{1}} \let\magyar@opt@amstocnumlang\magyar@enumarg \def\magyar@opt@active@@none{\def\magyar@opt@@active{0}} \def\magyar@opt@active@@onlycs{\def\magyar@opt@@active{1}} \def\magyar@opt@active@@safe{\def\magyar@opt@@active{2}} \def\magyar@opt@active@@problematic{\def\magyar@opt@@active{3}} \let\magyar@opt@active\magyar@enumarg \def\magyar@opt@activeprefix@@none {\let\magyar@opt@@activeprefix\relax} \def\magyar@opt@activeprefix@@acute {\def\magyar@opt@@activeprefix{'}} \def\magyar@opt@activeprefix@@grave {\def\magyar@opt@@activeprefix{`}} \def\magyar@opt@activeprefix@@quotedbl{\def\magyar@opt@@activeprefix{"}} \dMf magyar@opt@activeprefix@@babelopt2 {% \@ifpackagewith{babel}{activeacute}% Dat: not expandable {\def\magyar@opt@@activeprefix{'}}% {\def\magyar@opt@@activeprefix{`}}% } \dMf magyar@opt@activeprefix@@babelopt3 {% \@ifpackagewith{babel}{activeacute}% {\def\magyar@opt@@activeprefix{'}}% {\@ifpackagewith{babel}{activegrave}% {\def\magyar@opt@@activeprefix{`}}% {\def\magyar@opt@@activeprefix{"}}}% } \let\magyar@opt@activeprefix\magyar@enumarg \def\magyar@opt@activespace@@none{\def\magyar@opt@@activespace{0}} \def\magyar@opt@activespace@@safe{\def\magyar@opt@@activespace{2}} \def\magyar@opt@activespace@@problematic{\def\magyar@opt@@activespace{3}} \let\magyar@opt@activespace\magyar@enumarg \def\magyar@opt@amspostsectiondot@@no {\def\magyar@opt@@amspostsectiondot{1}} \def\magyar@opt@amspostsectiondot@@unchanged{\def\magyar@opt@@amspostsectiondot{0}} \let\magyar@opt@amspostsectiondot\magyar@enumarg \let\magyar@opt@hyphenation\magyar@enumarg \def\magyar@opt@hyphenation@@huhyphf {\magyar@opt@hyphenation@@phonetic} \def\magyar@opt@hyphenation@@huhyphc {\magyar@opt@hyphenation@@composite} \expandafter\ifx\csname @OFWO\endcsname\relax % Imp: fix --:hyphenation= reporting above \def\magyar@opt@hyphenation@@none {\def\magyar@opt@@hyphenation{}} \dMf magyar@opt@hyphenation@@huhyph3 {\def\magyar@opt@@hyphenation{3rN}} \dMf magyar@opt@hyphenation@@huhyph3-or-any {\def\magyar@opt@@hyphenation{3CmhwN}} \def\magyar@opt@hyphenation@@huhyphn {\def\magyar@opt@@hyphenation{nrN}} \def\magyar@opt@hyphenation@@composite {\def\magyar@opt@@hyphenation{crN}} \dMf magyar@opt@hyphenation@@composite-or-any {\def\magyar@opt@@hyphenation{cCmhwN}} \def\magyar@opt@hyphenation@@any {\def\magyar@opt@@hyphenation{CmhwN}} \def\magyar@opt@hyphenation@@phonetic {\def\magyar@opt@@hyphenation{frN}} \else% report to lafmtgen.pl \typeout{--:hyphenation-=\CurrentOption} \def\magyar@opt@@hyphenation{}% \def\magyar@opt@hyphenation@@none {\def\magyar@opt@@hypr{}} \dMf magyar@opt@hyphenation@@huhyph3 {\def\magyar@opt@@hypr{\typeout{--:hyphenation=magyar3}\typeout{--:hyphenation=magyar}}} % install both for safety \def\magyar@opt@hyphenation@@huhyphn {\def\magyar@opt@@hypr{\typeout{--:hyphenation=magyarn}\typeout{--:hyphenation=magyar}}} \def\magyar@opt@hyphenation@@composite{\def\magyar@opt@@hypr{\typeout{--:hyphenation=magyarc}\typeout{--:hyphenation=magyar}}} \def\magyar@opt@hyphenation@@phonetic {\def\magyar@opt@@hypr{\typeout{--:hyphenation=magyarf}}} \fi \def\magyar@opt@sectiondot@@none{\def\magyar@opt@@sectiondot{0}} \def\magyar@opt@sectiondot@@safe{\def\magyar@opt@@sectiondot{1}} \def\magyar@opt@sectiondot@@problematic{\def\magyar@opt@@sectiondot{2}} \let\magyar@opt@sectiondot\magyar@enumarg \def\magyar@opt@captions@@unchanged{\def\magyar@opt@@captions{0}} \def\magyar@opt@captions@@hu{\def\magyar@opt@@captions{1}} \let\magyar@opt@captions\magyar@enumarg \def\magyar@opt@varioref@@unchanged{\def\magyar@opt@@varioref{0}} \def\magyar@opt@varioref@@hu{\def\magyar@opt@@varioref{1}} \let\magyar@opt@varioref\magyar@enumarg \def\magyar@opt@cjhebrewfix@@unchanged{\def\magyar@opt@@cjhebrewfix{0}} \def\magyar@opt@cjhebrewfix@@onlyouter{\def\magyar@opt@@cjhebrewfix{1}} \def\magyar@opt@cjhebrewfix@@yes{\def\magyar@opt@@cjhebrewfix{2}} \let\magyar@opt@cjhebrewfix\magyar@enumarg \def\magyar@opt@fancyhdr@@unchanged{\def\magyar@opt@@fancyhdr{0}} \def\magyar@opt@fancyhdr@@hu{\def\magyar@opt@@fancyhdr{1}} \let\magyar@opt@fancyhdr\magyar@enumarg \def\magyar@opt@figurecaptions@@unchanged{\def\magyar@opt@@figurecaptions{0}} \def\magyar@opt@figurecaptions@@hu{\def\magyar@opt@@figurecaptions{1}} \def\magyar@opt@figurecaptions@@us{\def\magyar@opt@@figurecaptions{2}} \let\magyar@opt@figurecaptions\magyar@enumarg \def\magyar@opt@tablecaptions@@unchanged{\def\magyar@opt@@tablecaptions{0}} \def\magyar@opt@tablecaptions@@hu{\def\magyar@opt@@tablecaptions{1}} \def\magyar@opt@tablecaptions@@us{\def\magyar@opt@@tablecaptions{2}} \let\magyar@opt@tablecaptions\magyar@enumarg \def\magyar@opt@toclang@@unchanged{\def\magyar@opt@@toclang{0}}% same as =badall \def\magyar@opt@toclang@@badall{\def\magyar@opt@@toclang{0}} \def\magyar@opt@toclang@@badfloat{\def\magyar@opt@@toclang{1}} \def\magyar@opt@toclang@@good{\def\magyar@opt@@toclang{2}} \let\magyar@opt@toclang\magyar@enumarg \def\magyar@opt@mathbrk@@unchanged{\def\magyar@opt@@mathbrk{0}} \def\magyar@opt@mathbrk@@define{\def\magyar@opt@@mathbrk{1}} \def\magyar@opt@mathbrk@@fix{\def\magyar@opt@@mathbrk{2}} \let\magyar@opt@mathbrk\magyar@enumarg \def\magyar@opt@mathfactorial@@unchanged{\def\magyar@opt@@mathfactorial{0}} \def\magyar@opt@mathfactorial@@define{\def\magyar@opt@@mathfactorial{1}} \def\magyar@opt@mathfactorial@@fix{\def\magyar@opt@@mathfactorial{2}} \let\magyar@opt@mathfactorial\magyar@enumarg \def\magyar@opt@mathhucomma@@unchanged{\def\magyar@opt@@mathhucomma{0}} \def\magyar@opt@mathhucomma@@define{\def\magyar@opt@@mathhucomma{1}} \def\magyar@opt@mathhucomma@@fix{\def\magyar@opt@@mathhucomma{2}} \let\magyar@opt@mathhucomma\magyar@enumarg \def\magyar@opt@mathmuskips@@unchanged{\def\magyar@opt@@mathmuskips{0}} \def\magyar@opt@mathmuskips@@latex{\def\magyar@opt@@mathmuskips{1}} \def\magyar@opt@mathmuskips@@hu{\def\magyar@opt@@mathmuskips{2}} \let\magyar@opt@mathmuskips\magyar@enumarg \def\magyar@opt@hynumberline@@unchanged{\def\magyar@opt@@hynumberline{0}} \def\magyar@opt@hynumberline@@latex{\def\magyar@opt@@hynumberline{1}} \def\magyar@opt@hynumberline@@hu{\def\magyar@opt@@hynumberline{2}} \let\magyar@opt@hynumberline\magyar@enumarg \def\magyar@opt@hunnewlabel@@no {\def\magyar@opt@@hunnewlabel{0}} \dMf magyar@opt@hunnewlabel@@only-hu {\def\magyar@opt@@hunnewlabel{1}} \def\magyar@opt@hunnewlabel@@yes{\def\magyar@opt@@hunnewlabel{2}} \let\magyar@opt@hunnewlabel\magyar@enumarg \def\magyar@opt@partnumber@@unchanged{} \def\magyar@opt@partnumber@@huordinal{\def\thepart{\@huordinal\c@part}\let\magyar@needopt@hunumbers\@empty} \def\magyar@opt@partnumber@@Huordinal{\def\thepart{\@Huordinal\c@part}\let\magyar@needopt@hunumbers\@empty} \let\magyar@opt@partnumber\magyar@enumarg \def\magyar@opt@chapternumber@@unchanged{} \def\magyar@opt@chapternumber@@huordinal{\def\thechapter{\@huordinal\c@chapter}\let\magyar@needopt@hunumbers\@empty} \def\magyar@opt@chapternumber@@Huordinal{\def\thechapter{\@Huordinal\c@chapter}\let\magyar@needopt@hunumbers\@empty} \let\magyar@opt@chapternumber\magyar@enumarg \def\magyar@opt@accents@@high{\def\magyar@opt@@umlaut{\umlauthigh}} \def\magyar@opt@accents@@low{\def\magyar@opt@@umlaut{\umlautlow\umlautelow}} \def\magyar@opt@accents@@defaulthigh{\let\magyar@opt@@umlaut\@empty} \let\magyar@opt@accents\magyar@enumarg \def\magyar@opt@longcaption@@centered{\def\magyar@caption@centering{\centering}\def\magyar@caption@newline{\ }} \def\magyar@opt@longcaption@@justified{\def\magyar@caption@centering{\relax}\def\magyar@caption@newline{\ }} \def\magyar@opt@longcaption@@centernewline{\def\magyar@caption@centering{\centering}\def\magyar@caption@newline{\\\relax}} \def\magyar@opt@longcaption@@none{\let\magyar@caption@centering\@empty} \def\magyar@opt@longcaption@@unchanged{\let\magyar@caption@centering\@empty} \let\magyar@opt@longcaption\magyar@enumarg \def\magyar@opt@suggestions@@no {\def\magyar@opt@@suggestions{0}} \def\magyar@opt@suggestions@@yes{\def\magyar@opt@@suggestions{1}} \let\magyar@opt@suggestions\magyar@enumarg \def\magyar@opt@appendixdot@@no {\def\@@magyar@appendixname{\appendixname}} \def\magyar@opt@appendixdot@@yes{\def\@@magyar@appendixname{}} \let\magyar@opt@appendixdot\magyar@enumarg \def\magyar@opt@extras@@no {\def\magyar@opt@@extras{0}} \def\magyar@opt@extras@@yes{\def\magyar@opt@@extras{1}} \let\magyar@opt@extras\magyar@enumarg \def\magyar@opt@chapterhead@@unchanged{\def\magyar@opt@@chapterhead{0}} \def\magyar@opt@chapterhead@@no{\def\magyar@opt@@chapterhead{0}} \def\magyar@opt@chapterhead@@yes{\def\magyar@opt@@chapterhead{1}} \let\magyar@opt@chapterhead\magyar@enumarg \def\magyar@opt@classmod@@no {\let\magyar@opt@@classmod\relax} \def\magyar@opt@classmod@@unchanged{\let\magyar@opt@@classmod\relax} \def\magyar@opt@classmod@@yes {\let\magyar@opt@@classmod\@empty} \def\magyar@opt@classmod#1#2{% \expandafter\ifx\csname magyar@opt@#1@@#2\endcsname\relax \@namedef{magyar@opt@@#1}{#2}% \else \csname magyar@opt@#1@@#2\endcsname \fi } \def\magyar@opt@shorthandcs#1#2{% \def\reserved@a{#2}% \def\reserved@b{none}% \ifx\reserved@a\reserved@b \def\magyar@opt@@shorthandcs{0}% overridable \else \def\magyar@opt@@shorthandcs{1}% \ifcat\hfuzz\noexpand#2\relax% #2 is \shu \shu`tty is `tty \def#2##1{\protect\@@magyar@shorthand}% Dat: ##1 is usually `_12 \else \@namedef{#2}{\protect\@@magyar@shorthand}% \fi \fi } \def\magyar@opt@hunumbers@@no{\def\magyar@opt@@hunumbers{0}} \def\magyar@opt@hunumbers@@yes{\def\magyar@opt@@hunumbers{1}} \let\magyar@opt@hunumbers\magyar@enumarg \let\magyar@opt@az\magyar@yesweaknoarg \let\magyar@opt@told\magyar@yesweaknoarg \let\magyar@opt@textqq\magyar@yesweaknoarg \let\magyar@opt@emitdate\magyar@yesweaknoarg \let\magyar@opt@mathreal\magyar@yesweaknoarg \let\magyar@opt@refstruc\magyar@yesweaknoarg \let\magyar@opt@mond\magyar@yesweaknoarg \let\magyar@opt@hang\magyar@yesweaknoarg \def\magyar@opt@theoremtitle@@unchanged{\def\magyar@opt@@theoremtitle{0}} \def\magyar@opt@theoremtitle@@hu{\def\magyar@opt@@theoremtitle{1}} \let\magyar@opt@theoremtitle\magyar@enumarg \def\magyar@opt@footnote@@unchanged{\def\magyar@opt@@footnote{0}} \def\magyar@opt@footnote@@yes{\def\magyar@opt@@footnote{1}} \def\magyar@opt@footnote@@huplain{\def\magyar@opt@@footnote{2}} \def\magyar@opt@footnote@@starplain{\def\magyar@opt@@footnote{3}} \let\magyar@opt@footnote\magyar@enumarg \def\magyar@opt@hutoday@@no{\def\magyar@opt@@hutoday{0}} \def\magyar@opt@hutoday@@yes{\def\magyar@opt@@hutoday{1}} \let\magyar@opt@hutoday\magyar@enumarg \def\magyar@opt@shortrefcmds@@no{\def\magyar@opt@@shortrefcmds{0}} \def\magyar@opt@shortrefcmds@@yes{\def\magyar@opt@@shortrefcmds{1}} \let\magyar@opt@shortrefcmds\magyar@enumarg \def\magyar@opt@dottedtocline@@fix{\def\magyar@opt@@dottedtocline{1}} \def\magyar@opt@dottedtocline@@unchanged{\def\magyar@opt@@dottedtocline{0}} \let\magyar@opt@dottedtocline\magyar@enumarg \let\magyar@opt@amslevelfix\magyar@enumarg \def\magyar@opt@amslevelfix@@unchanged{\def\magyar@opt@@amslevelfix{0}} \dMf magyar@opt@amslevelfix@@fix-ams {\def\magyar@opt@@amslevelfix{1}} \dMf magyar@opt@amslevelfix@@fix-all {\def\magyar@opt@@amslevelfix{2}} \let\magyar@opt@amsuppercasefix\magyar@enumarg \def\magyar@opt@amsuppercasefix@@unchanged{\def\magyar@opt@@amsuppercasefix{0}} \dMf magyar@opt@amsuppercasefix@@fix-ams {\def\magyar@opt@@amsuppercasefix{1}} \dMf magyar@opt@amsuppercasefix@@fix-all {\def\magyar@opt@@amsuppercasefix{2}} \let\magyar@opt@captionfix\magyar@enumarg \def\magyar@opt@captionfix@@unchanged{\def\magyar@opt@@captionfix{0}} \def\magyar@opt@captionfix@@yes {\def\magyar@opt@@captionfix{1}} \let\magyar@opt@babelmarkfix\magyar@enumarg \def\magyar@opt@babelmarkfix@@unchanged{\def\magyar@opt@@babelmarkfix{0}} \def\magyar@opt@babelmarkfix@@yes {\def\magyar@opt@@babelmarkfix{1}} \let\magyar@opt@showfix\magyar@enumarg \def\magyar@opt@showfix@@unchanged{\def\magyar@opt@@showfix{0}} \def\magyar@opt@showfix@@yes {\def\magyar@opt@@showfix{1}} \def\magyar@opt@labelenums@@unchanged{\def\magyar@opt@@labelenums{0}} \dMf magyar@opt@labelenums@@hu-a {\def\magyar@opt@@labelenums{1}} \dMf magyar@opt@labelenums@@hu-A {\def\magyar@opt@@labelenums{2}} \dMf magyar@opt@labelenums@@hu-d {\def\magyar@opt@@labelenums{3}} \let\magyar@opt@labelenums\magyar@enumarg \def\magyar@opt@labelitems@@unchanged{\def\magyar@opt@@labelitems{0}} \def\magyar@opt@labelitems@@hu {\def\magyar@opt@@labelitems{1}} \let\magyar@opt@labelitems\magyar@enumarg \def\magyar@opt@openqq@@unchanged{\def\magyar@opt@@openqq{0}} \def\magyar@opt@openqq@@up{\def\magyar@opt@@openqq{1}} \def\magyar@opt@openqq@@down{\def\magyar@opt@@openqq{2}} \def\magyar@opt@openqq@@maybedown{\def\magyar@opt@@openqq{3}} \let\magyar@opt@openqq\magyar@enumarg \def\magyar@opt@frenchspacing@@unchanged{\def\magyar@opt@@frenchspacing{0}}% same as =no \def\magyar@opt@frenchspacing@@no {\def\magyar@opt@@frenchspacing{1}} \def\magyar@opt@frenchspacing@@yes{\def\magyar@opt@@frenchspacing{2}} \let\magyar@opt@frenchspacing\magyar@enumarg \dMf magyar@opt@afterindent@@force-no {\def\magyar@opt@@afterindent{0}} \dMf magyar@opt@afterindent@@force-yes {\def\magyar@opt@@afterindent{1}} \dMf magyar@opt@afterindent@@unchanged {\def\magyar@opt@@afterindent{9}} \let\magyar@opt@afterindent\magyar@enumarg \def\magyar@opt@postpara#1#2{% \def\reserved@a{#2}% \ifx#2\magyar@@unchanged \let\magyar@opt@@paragraphs\@undefined \else \expandafter\def\csname magyar@opt@@#1\endcsname{#2}% \let\magyar@opt@@paragraphs\@empty \fi } \let\magyar@opt@postsubpara\magyar@opt@postpara \let\magyar@opt@postdescription\magyar@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@doopt foo=bar,foo2=bar2,\hfuzz,% \def\magyar@doopt#1,{% \if,\noexpand#1,% ignore multiple commas (#1 is empty) \expandafter\magyar@doopt \else \csname fi\endcsname% don't count as `\fi' when being skipped \magyar@doopt@low#1,=,% \fi } \@gobble\iftrue% \def\magyar@doopt@low contains `\fi'. Make it skippable. %** @param #1 is here for gobbling space tokens \def\magyar@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@doopt@missingkey#2% #2 already contains comma at end \else \magyar@doopt@missingval#1#2\fi \fi \expandafter\expandafter\expandafter\magyar@doopt \fi \else% Normal \expandafter\ifx\csname magyar@opt@#1#2\endcsname\relax \@@magyar@error{Unknown option: #1#2 (= #3)}% \else \csname magyar@opt@#1#2\endcsname{#1#2}{#3}% \fi \expandafter\magyar@doopt \fi } \def\magyar@doopt@missingkey#1,{% \@@magyar@error{Key missing for value: #1}% } \def\magyar@doopt@missingval#1,{% \@@magyar@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@doopts{foo=bar, } %** @param #1 comma-separated optoinname=value pairs %\def\magyar@doopts#1{\magyar@doopt #1,\hfuzz,}% \def\magyar@dooptions{% \expandafter\ifx\csname opt@\CurrentOption.ldf.sty\endcsname\relax\else % Usage: \PassOptionsToPackage{foo=bar}{magyar.ldf} \expandafter\expandafter\expandafter \magyar@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@doopt\csname\CurrentOption Options\endcsname,\hfuzz,% \expandafter\let\csname \CurrentOption Options\endcsname\relax \fi } \def\magyar@do@option@low#1#2=#3=,\vfuzz{% \ifx#1\hfuzz\else %%\typeout{(#1#2)=(#3)}% % vvv wastes some heap (\csname), but never mind \fi } \magyar@opt@defaults{defaults}{over-1.4} \def\magyar@opt@@hdrtitleskip{\enskip}% !!! option for that \magyar@dooptions% in \magyarOptions \ifnum\magyar@opt@@openqq=3 % =maybedown \ifnum\magyar@opt@@active=0 \def\magyar@opt@@openqq{0}% =unchanged \else \def\magyar@opt@@openqq{2}% =down \fi \fi \expandafter\ifx\csname magyar@needopt@hunumbers\endcsname\relax\else \ifnum\magyar@opt@@hunumbers=0 \@@magyar@error{(chapter|part)number=... implies hunumbers=yes}% \fi \fi \if0\magyar@opt@@shorthandcs\else \if\magyar@opt@@active0% \@@magyar@error{active=none implies shorthandcs=none}% \fi \fi % Imp: undef \magyar\@opt@* to save memory \@gobble\iftrue %** Usage: `\if...\else\@@magyar@skiplong\fi ... \@gobble{^}', where {^} is in %** its own line \def\@@magyar@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@opt@@hypr\endcsname \let\magyar@sugg@pa\@gobble %\show\magyar@opt@@hyphenation \ifx\magyar@opt@@hyphenation\@empty % Hungarian words won't be hyphenated automatically \expandafter\chardef\csname l@\CurrentOption\endcsname255 \@@magyar@skiplong\fi % Define a warning, will be printed later. \def\@@magyar@suggpa@req@def{% \def\magyar@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@suggpa@all@def{% \def\magyar@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@hyphenation@last#1\@@magyar@hyphenation@next#2\hfuzz{#1}% \def\@@magyar@hyphenation@defcs#1#2{\ifx#1#2\else\chardef#1#2\fi}% Dat: \chardef\foo\foo doesn't work \def\@@magyar@hyphenation@def#1{% \expandafter\ifx\csname l@#1\endcsname\relax\else \expandafter\expandafter\expandafter\@@magyar@hyphenation@defcs \expandafter\expandafter\csname l@\CurrentOption\endcsname \csname l@#1\endcsname \@@magyar@hyphenation@last\fi}% \def\@@magyar@hyphenation@next#1{% \ifx#1\hfuzz \else\if#1N% none % Turn of hyphenation. \expandafter\chardef\csname l@\CurrentOption\endcsname255 \@@magyar@hyphenation@last \else\if#1C% use l@\CurrentOption if defined \expandafter\ifx\csname l@\CurrentOption\endcsname\relax\else \@@magyar@hyphenation@last \fi \else\if#1w% print the all-missing-warning \@@magyar@suggpa@all@def \else\if#1r% print the req-missing-warning \@@magyar@suggpa@req@def \else\if#1h\@@magyar@hyphenation@def{hungarian}% \else\if#1m\@@magyar@hyphenation@def{magyar}% \else\if#13\@@magyar@hyphenation@def{magyar3}% \else\if#1c\@@magyar@hyphenation@def{magyarc}% \else\if#1f\@@magyar@hyphenation@def{magyarf}% \else\if#1n\@@magyar@hyphenation@def{magyarn}% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\@@magyar@hyphenation@next % Dat: no \adddialect\l@magyar... - it's only a chardef }% %\tracingmacros1 \show\magyar@opt@@hyphenation \expandafter\@@magyar@hyphenation@next\magyar@opt@@hyphenation\hfuzz %\show\l@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@suggpa@all@def\@undefined \let\@@magyar@suggpa@req@def\@undefined \@gobble {^} % --- accents= \ifx\magyar@opt@@umlaut\@empty\else% !! test this % Dat: this only affects \" \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@save\"\umlautlow \magyar@opt@@umlaut} \fi % --- theorem title number ordering and the dot; theoremtitle= % % Dat: \ref{mytheorem} never appends a dot \if0\magyar@opt@@theoremtitle \@@magyar@skiplong\fi % for theorem.sty and ntheorem.sty % Define your \newtheorem commands in the preamble, before \theoremstyle \def\magyar@th@magyar{% \def\@begintheorem##1##2{% \item[\hskip \labelsep{\theorem@headerfont ##2.\ ##1.}]}% \def\@opargbegintheorem##1##2##3{% \item[\hskip \labelsep{\theorem@headerfont ##2.\ ##1\ (##3).}]}% } % vvv Dat: theorem.sty needs \th@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@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@setup@theoremstyle#1{% \expandafter\ifx\csname theorem@headerfont\endcsname\relax \let\magyar@th@magyar\@undefined \else %\expandafter\let\csname th@#1-plain\endcsname\magyar@th@magyar% Dat: moved to earlier % vvv Dat: activate the Hungarian theorem style by default. \def\theorem@headerfont{\bf}% \edef\reserved@a{\the\theorem@style}% \def\reserved@b{plain}% \ifx\reserved@a\reserved@b \expandafter\theorem@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@setup@theoremstyle\expandafter{\CurrentOption}} \expandafter\addto\csname extras\CurrentOption\endcsname{% %%\show\theorem@headerfont \expandafter\ifx\csname thm@swap\endcsname\relax \expandafter\ifx\csname theorem@headerfont\endcsname\relax% no theorem.sty \babel@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@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@save\thmhead \babel@save\swappedhead %** \swapnumbers. \newtheorem{...}{...} already inserts the trailing dot % \def\thm@swap{S}% no effect :-( %** overrides amsart.cls \def\thmhead#1#2#3{% \thmnumber{\@upn{#2}\@ifnotempty{#1}{.~}}% \thmname{#1}% \thmnote{ {\the\thm@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@opt@@textqq \@@magyar@skiplong\fi \def\magyar@textqq@level{0} %** Provide a placeholder for language-unspecific \textqq \def\@@magyar@textqq@nolang#1{% \ifcase\magyar@textqq@level \def\magyar@textqq@level{1}% \textquotedblleft#1\textquotedblright \def\magyar@textqq@level{0}% \or \textquoteleft#1\textquoteright \fi } \def\@@magyar@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@textqq@level \def\magyar@textqq@level{1}% % Dat: \hskip instead of \kern to allow hyphenation \quotedblbase\nobreak\hskip-.06em\nobreak#1\kern\z@\textquotedblright% skip OK for the CM and EC fonts \def\magyar@textqq@level{0}% \or \def\magyar@textqq@level{2}% \guillemotright\nobreak\hskip-.07em\nobreak#1\kern-0.05em\guillemotleft% skip OK for CM and EC fonts \def\magyar@textqq@level{1}% \or \def\magyar@textqq@level{3}% \textquoteright\nobreak#1\kern\z@\textquoteright \def\magyar@textqq@level{2}% \else \quotedblbase\nobreak\hskip-.06em#1\kern\z@\textquotedblright% skip OK for the CM and EC fonts \fi }}% \catcode`\ =11\relax% make space a letter \ifnum\magyar@opt@@textqq\expandafter\ifx\csname\@gobble.textqq\endcsname\relax1\fi>1\relax% 21, 2, 11, 1 \def\textqq{\protect\textqq }% \MakeRobust \def\@@magyar@textqq{\protect\textqq }% \let\textqq \@@magyar@textqq@nolang% \expandafter\addto\csname\@gobble.extras\CurrentOption\endcsname% {\babel@save\textqq \let\textqq \@@magyar@textqq@hu}% \else% \def\@@magyar@textqq{\protect\@@magyar@textqq }% \MakeRobust \let\@@magyar@textqq \@@magyar@textqq@nolang% \expandafter\addto\csname\@gobble.extras\CurrentOption\endcsname% {\babel@save\@@magyar@textqq \let\@@magyar@textqq \@@magyar@textqq@hu}% \fi% \catcode`\ =10\relax% back to space again \@gobble {^}% % --- Definite articles (\az, \pageref -> \apageref etc.) \if0\magyar@opt@@az \@@magyar@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@az@vfuzzedef#1{% \begingroup \@safe@activestrue% allow active `:' inside labels; \def\hyper@@link[##1]##2##3##4{##4}% Dat: \def\b@abook{\hyper@@link [cite]{}{cite.sokt}{2}}% with hyperref.sty \let\romannumeral\number% by pts@fazekas.hu at Mon Oct 27 23:44:06 CET 2003 % Dat: deliberately no \autoref for hyperref.sty !! (why??) \let\ref\@@magyar@zeroref \let\pageref\@@magyar@zeropageref \let\cite\@@magyar@zerocite \let\eqref\@@magyar@zeroeqref % ^^^ fix so \az{\ref{...}} works \let\refstruc\@@magyar@zerorefplus \def\setbox ##1{}% to get rid of accents and special letters \def\hbox ##1{}% \def\accent ##1 ##2{##2}% \def\add@accent ##1##2{##2}% \def\@text@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@activestrue\@empty% babel puts these inside \b@...: % Dat: \def\b@abook{\@safe@activesfalse 2}% (what is \@safe@actives??) \let\@safe@activesfalse\@empty \edef\vfuzz{\noexpand\def\noexpand\vfuzz{#1}}% \expandafter\endgroup\vfuzz } %** Makes \az etc. not emit the definite article. %** Unused. \def\@@magyar@noaz{% \def\@@magyar@az@lowt{\@ifstar\@gobble\@firstofone}% \def\az{\@@magyar@az@lowt}% \let\Az\az \def\aref{\@ifstar\@gobble\@@magyar@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@az@lowt{\@ifstar{\@@magyar@az@lowy}{\@ifnextchar+\@@magyar@az@lowz\@@magyar@az@lowx}} \def\@@magyar@az@lowz#1#2#3{\@@magyar@az@lowy{#2{#3}}~#2{#3}} %** Used by new varioref.sty \def\@@magyar@az@lowxu{\unskip\@@magyar@az@lowx}% \def\@@magyar@az@lowx#1{\@@magyar@az@lowy{#1}~#1} \def\@@magyar@az@lowy#1{{% \begingroup %\def\protect{\noexpand\protect\noexpand}% \set@display@protect% screws up \r \@@magyar@az@vfuzzedef{#1}% %%\show\vfuzz \expandafter\endgroup\expandafter \set@display@protect\expandafter% fixes \r; why?? \@@magyar@az@set\expandafter{\vfuzz}\hbox$% }} \def\@@magyar@firstarg#1#2\hbox${#1}% %** \Aref({e:foo}) -> `az~(5)'; \aref*{e:foo}: `az' \def\@@magyar@az@lowa{\@ifnextchar({\@@magyar@az@lowb}{\@@magyar@az@lowb\@empty}} \def\@@magyar@az@lowb#1#2{\@@magyar@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@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@r@#2}{% \@ifundefined{r@#2}{\let\reserved@a\@empty}{\expandafter\let\expandafter\reserved@a\csname r@#2\endcsname}% }{\expandafter\let\expandafter\reserved@a\csname @@magyar@r@#2\endcsname}% \ifx\reserved@a\@empty\endgroup\else% a speed boost \ifx#1\@secondoftwo\relax % Dat: remove the 1st {...} arg inside \reserved@a \expandafter\expandafter\expandafter\def\expandafter\expandafter \expandafter\reserved@a\expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter\@gobble\reserved@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@a\expandafter\expandafter\expandafter{% \expandafter\expandafter\expandafter\@@magyar@firstarg\reserved@a{}\hbox$}% \expandafter\@@magyar@az@vfuzzedef\expandafter{\reserved@a}% \expandafter\endgroup\expandafter\@@magyar@az@set\expandafter{\vfuzz}\hbox$% \fi } \def\@@magyar@az@lowd#1{\@@magyar@az@ref\@secondoftwo{#1}~\pageref{#1}} \def\@@magyar@acite@lowb{\@ifnextchar [{\@@magyar@acite@lowa}{\@@magyar@acite@lowa[]}} \def\@@magyar@acite@lowa[#1]#2{% \@@magyar@acite@lowd{#2}~% \ifx\vfuzz#1\vfuzz\cite{#2}\else\cite[#1]{#2}\fi } \def\@@magyar@acite@lowd#1{\@@magyar@acite@lowc#1,\hbox$} \def\@@magyar@acite@lowc#1,#2\hbox#3${% \begingroup \@ifundefined{@@magyar@b@#1}{% \@ifundefined{b@#1}{\def\vfuzz{}}{% \@@magyar@az@vfuzzedef{% \expandafter\expandafter\expandafter\@@magyar@b@number \expandafter\expandafter\expandafter{\csname b@#1\endcsname}}}% } {\@@magyar@az@vfuzzedef{\csname @@magyar@b@#1\endcsname}}% \expandafter\endgroup\expandafter \@@magyar@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ű' emits `Az Sz betű'; `\az{szólam}' is also OK %** @param #1#2#3 doesn't contain \hbox (but may contain space) %** @param #1 #2 #3 never lower case \def\@@magyar@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@azuc@pre#1#2#3#4\hbox${% \uppercase{\@@magyar@azuc#1#2#3}% Dat: we map a..z -> A..Z } %** Also defined elsewhere. %** @param #2 \else...\else...\fi...\fi etc. \def\@@magyar@swaprelax#1#2\relax{#2#1} \def\@@magyar@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@eatddd#1#2#3#4{% % Wizardry: \@@magyar@eatddd throws away #1 (\@@magyar@ignorehbox@pre) \ifnum9<1\string#2 \ifnum9<1\string#3 \ifnum9<1\string#4 % test for digits \@@magyar@swaprelax\@@magyar@eatddd\fi\fi\else z\fi \relax\@@magyar@ignorehbox@pre } % vvv Wizardry: ignore everything (second number?) after first space \def\@@magyar@eatddd@pre#1 #2\hbox${\@@magyar@eatddd.#1[][]\hbox$}% \@gobble\iftrue \def\@@magyar@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@azrb#1{% \ifx\hfuzz#1\@@magyar@azrb@stop\fi \expandafter\@@magyar@azrb\expandafter{% \ifcat{\noexpand#1\hfuzz\iffalse}\fi\expandafter \@@magyar@azrb\else\hfuzz}\@@magyar@azrb@nob{#1}\fi} \def\@@magyar@azrb@nob#1#2{#2% #2 is \fi \ifx\hfuzz#1\hfuzz\expandafter\@firstoftwo \expandafter\@@magyar@azrb\fi\@@magyar@azrb@nobone#1} \def\@@magyar@azrb@nobone#1{\noexpand#1\@@magyar@azrb}% \def\@@magyar@aznospace#1{% \if\hfuzz\noexpand#1\expandafter\@@magyar@aznospace\else % a \cs, ignored -- may be \relax \expandafter\@@magyar@aznospace@short\expandafter#1% \fi } %** @param #1 might not be \cs -- and isn't empty \def\@@magyar@aznospace@short#1{% \if5\noexpand#1z% Dat: emit `az 5' \@@magyar@swaprelax\@@magyar@ignorehbox@pre \else\if1\noexpand#1% % Dat: properly handle `az 1001 éjszaka', `az 1234567 éves bolygó' \@@magyar@swaprelax\@@magyar@eatddd@pre \else\ifnum1<1\noexpand#1 % a different digit, emit `a ' \@@magyar@swaprelax\@@magyar@ignorehbox@pre \else\if-\noexpand#1% \az{-5} yields `a~-5' \@@magyar@swaprelax\@@magyar@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@swaprelax\@@magyar@aznospace \else \@@magyar@swaprelax{\@@magyar@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@az@set#1#2\hbox${% by pts % ^^^ Dat: we have `$' instead of `!' because of catcode changes (shouldn't affect) \edef\reserved@a{\@@magyar@azrb#1\hfuzz}% \expandafter\@@magyar@aznospace\reserved@a[b][][] \hbox$% % ^^^ Wizardry: [b][][] is a smart sentinel for \@@magyar@azuc and `b' for % \@@magyar@aznospace@short. First `[' is there for aesthetics. Space % is there for \@@magyar@eatddd@pre. \hbox$ is something that will not % occur in normal text. } \ifnum\magyar@opt@@az \expandafter\ifx\csname az\endcsname\relax1\fi>1 % 21, 2, 11, 1 \DeclareRobustCommand\az{a\@@magyar@az@lowt}\fi \ifnum\magyar@opt@@az \expandafter\ifx\csname Az\endcsname\relax1\fi>1 % 21, 2, 11, 1 \DeclareRobustCommand\Az{A\@@magyar@az@lowt}\fi \ifnum\magyar@opt@@az \expandafter\ifx\csname aref\endcsname\relax1\fi>1 % 21, 2, 11, 1 \DeclareRobustCommand\aref{a\@ifstar{\@@magyar@az@ref\@firstoftwo}{\@@magyar@az@lowa}}\fi \ifnum\magyar@opt@@az \expandafter\ifx\csname Aref\endcsname\relax1\fi>1 % 21, 2, 11, 1 \DeclareRobustCommand\Aref{A\@ifstar{\@@magyar@az@ref\@firstoftwo}{\@@magyar@az@lowa}}\fi \ifnum\magyar@opt@@az \expandafter\ifx\csname apageref\endcsname\relax1\fi>1 % 21, 2, 11, 1 \DeclareRobustCommand\apageref{a\@ifstar{\@@magyar@az@ref\@secondoftwo}{\@@magyar@az@lowd}}\fi \ifnum\magyar@opt@@az \expandafter\ifx\csname Apageref\endcsname\relax1\fi>1 % 21, 2, 11, 1 \DeclareRobustCommand\Apageref{A\@ifstar{\@@magyar@az@ref\@secondoftwo}{\@@magyar@az@lowd}}\fi \ifnum\magyar@opt@@az \expandafter\ifx\csname acite\endcsname\relax1\fi>1 % 21, 2, 11, 1 \DeclareRobustCommand\acite{a\@ifstar{\@@magyar@acite@lowd}{\@@magyar@acite@lowb}}\fi \ifnum\magyar@opt@@az \expandafter\ifx\csname Acite\endcsname\relax1\fi>1 % 21, 2, 11, 1 \DeclareRobustCommand\Acite{A\@ifstar{\@@magyar@acite@lowd}{\@@magyar@acite@lowb}}\fi \@gobble {^} % --- hunnewlabel= \if0\magyar@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@skiplong\fi % vvv commented out by pts@fazekas.hu at Fri Aug 1 01:24:59 CEST 2003 % [pts] Code commented out causes the strange `Package hyperref Warning: No % destination for bookmark of \addcontentsline.'. Strange, the original % definition in latex.ltx seems to do the same. So why we would need this % redefinition? Old magyar.ldf doc says: \refstepcounter must be redefined % in order to have \@currentlabel unexpanded. But why? %. An example when to problem occurs: % \documentclass{book} % \usepackage[english,magyar]{babel} % \usepacakge{hyperref} % \begin{document}\section{foo}\end{document} %\expandafter\addto\csname extras\CurrentOption\endcsname{% % \babel@save\refstepcounter % \def\refstepcounter#1{\stepcounter{#1}% % \def\@currentlabel{\csname p@#1\endcsname\csname the#1\endcsname}}% %} % \label is redefined to write another line to aux file: % \hunnewlabel{...}{...} where the roman numerals are replaced by their % arabic representations. The name \hunnewlabel is a legacy. %** Make its expansion short so \ifx would be fast down in noextras... \def\@@magyar@labela{\@@magyar@labelb}% \def\@@magyar@labelb#1{% \@@magyar@orig@label{#1}% output \newlabel to \@auxout % Hacked in detail by pts@fazekas.hu at Thu Jul 31 23:01:04 CEST 2003 % [pts] % Now output \hunnewlabel: similar to \newlabel{sectionStructNr}{pageNr}, % but roman numbers are converted to arabic, so \aref and \apageref work. \begingroup % vvv We mustn't wait \shipout for \@currentlabel, but we should for % \thepage, in case of \pagenumbering{roman}. But its effect is immediate, % (42 -> xlii), only \c@page might be incorrect. \edef\reserved@a{{\@currentlabel}{\thepage}}% % Now \@currentlabel is something like % `\csname p@subsubsection\endcsname \csname thesubsubsection\endcsname' % \p@subsubsection is usually empty, and \thesubsubsection begins with % \thesubsection etc. while the first real expansion is usually % \@arabic\c@chapter. We want to change \@roman, \@Roman, \romannumeral % and \@arabic to \number, while keep \@alph and \@Alph intact. A % subsection number `iv.v.6' can be converted to `4.v.6' or `4.5.6' -- we % do the later. \let\romannumeral\number \let\@roman\@arabic% Dat: latex.ltx defines \def\@arabic#1{\number #1} \let\@Roman\@arabic \let\protect\@unexpandable@protect % so \H and other accents won't expand in the section title \edef\reserved@b{\@currentlabel}% \edef\reserved@c{{\@currentlabel}{\thepage}}% arabic instead of roman \ifx\reserved@a\reserved@c \let\reserved@b\@gobble \else % Emit \hunnewlabel only if \@currentlabel or \thepage contained roman % numbers. % % Converting the page number (\thepage) is trickier than a simple \edef, % because \@roman\c@page has to be converted to \noexpand\number\c@page, % so \protected@write will expand it to \number\c@page, and a whatsit % node will be created, and \number\c@page will be expanded to 42 when % the page is shipped out to the DVI. Luckily \@alph and \@Alph don't % contain \number. Also note that \rommanumeral, \@roman and \@Roman has % already been redefined. % We don't want to say `\let\thepage\relax' here, because we want to % expand the _formatting_ of \thepage, but not the number. \def\number{\noexpand\noexpand\noexpand\number}% \let\romannumeral\number \def\@arabic##1{\noexpand\noexpand\noexpand\number##1}% Dat: macro expansion eats a brace; no space in latex.ltx \def\@alph{\noexpand\noexpand\noexpand\@alph}% \def\@Alph{\noexpand\noexpand\noexpand\@Alph}% \def\@huordinal{\noexpand\noexpand\noexpand\@huordinal}% \def\@Huordinal{\noexpand\noexpand\noexpand\@Huordinal}% \def\@hunumeral{\noexpand\noexpand\noexpand\@hunumeral}% \def\@Hunumeral{\noexpand\noexpand\noexpand\@Hunumeral}% % Imp: other numbering schemes... \edef\reserved@b##1{\noexpand\protected@write\@auxout{}{% \string\hunnewlabel{##1}{{\reserved@b}{\thepage}}% }}% \fi \expandafter\endgroup\reserved@b{#1}% clever hack to pass arg unexpanded }% \expandafter\addto\csname extras\CurrentOption\endcsname{% %%\message{--EXTRAS--}\show\label \ifx\label\@@magyar@labela\else \let\@@magyar@orig@label\label \let\label\@@magyar@labela \fi } \expandafter\addto\csname noextras\CurrentOption\endcsname{% %%\message{--NO--}% \ifx\label\@@magyar@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@language{magyar}} % 2. \usepackage{hyperref}% \AtBeginDocument{\RequirePackage{nameref}} % 3. \begin{document}: % 4. \input \jobname.aux % 5. \AtBeginDocument hooks: % 6. \select@language{magyar} % 7. \extrasmagyar % 8. \let\@@magyar@orig@label\label % 9. \RequirePackage{nameref}: % 10. \def\label#1{...} \if1\magyar@opt@@hunnewlabel % only hunnewlabel=only-hu \let\label\@@magyar@orig@label \fi \fi % \let\@@magyar@orig@label\relax % Dat: commenting out this makes it possible to load magyar.ldf twice } \def\hunnewlabel#1#2{% \def\reserved@a{#2}% \expandafter\ifx\csname r@#1\endcsname\reserved@a% hun and normal labels are the same \relax% \message{No need for def: #1}% \else \global\expandafter\let\csname @@magyar@r@#1\endcsname\reserved@a% \fi } \@gobble {^} % --- captions= \if0\magyar@opt@@captions\@@magyar@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árium, (magyarázatos) szójegyzék % 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@opt@@tablecaptions\@@magyar@skiplong\fi % Wee need `1. táblázat' instead of `Table 1' \if1\magyar@opt@@tablecaptions \def\@@magyar@fnum@table{\thetable.~\tablename}% \else \def\@@magyar@fnum@table{\tablename\nobreakspace\thetable}\fi \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@save\fnum@table\let\fnum@table\@@magyar@fnum@table} \@gobble {^} % --- Changing the order of the figure numbers; figurecaptions= \if0\magyar@opt@@figurecaptions\@@magyar@skiplong\fi \if1\magyar@opt@@figurecaptions \def\@@magyar@fnum@figure{\thefigure.~\figurename}% \else \def\@@magyar@fnum@figure{\figurename\nobreakspace\thefigure}\fi \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@save\fnum@figure\let\fnum@figure\@@magyar@fnum@figure} \@gobble {^} % --- dottedtocline= \if0\magyar@opt@@dottedtocline\@@magyar@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@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@th \mkern \@dotsep mu\hbox{.}\mkern \@dotsep mu\)}\hfill \nobreak \setbox\@tempboxa\hbox{\normalfont \normalcolor #5}% ****pts**** \ifdim\wd\@tempboxa<\@pnumwidth\setbox\@tempboxa\hb@xt@\@pnumwidth{\hfil\unhbox\@tempboxa}\fi \box\@tempboxa \par}% \fi} \@gobble {^}% % --- amslevelfix= % detect ams{ldoc,dtx,art,book,proc}.sty \ifnum1<0% \magyar@opt@@amslevelfix \expandafter\ifx\csname setTrue\endcsname\relax\else 1\fi \expandafter\ifx\csname allowttyhyphens\endcsname\relax\else 1\fi \space\else\@@magyar@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@amslevelfix#1#2#3#4#5#6#7\vfuzz{% \def\reserved@a{#6}% \ifx\@tocline#2\ifx\reserved@a\@empty% \def#1{\@tocline{#3}{#4}{#5}{\parindent}{}}% \fi\fi } \expandafter\magyar@amslevelfix\expandafter\l@table \l@table ,,,,,,,\vfuzz \expandafter\magyar@amslevelfix\expandafter\l@figure\l@figure,,,,,,,\vfuzz \@gobble {^}% % --- amsuppercasefix= % Fix for small \'\i in capitalized title (no fix needed for \'i and í): % \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@opt@@amsuppercasefix \expandafter\ifx\csname altucnm\endcsname\relax\else 1\fi \space\else\@@magyar@skiplong\fi \AtEndOfPackage{\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@opt@@babelmarkfix\relax \space\else\@@magyar@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@nobreak\iffalse \@gobble\fi\@gobble\fi % Dat: \@gobble: make skippable \def\@@magyar@@marktest@noexp{{\noexpand\@empty BA}{\noexpand\@empty BB}} \expandafter\org@markboth\@@magyar@@marktest@noexp % ^^^ Dat: since we call \org@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@noexp % OK, now test for \markboth, as defined in Babel 3.8 \def\org@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@restore@actives CA}..\noexpand \foreignlanguage {\languagename }{\noexpand \bbl@restore@actives CB} \def\reserved@a#1#2\hfuzz${#1}% \expandafter\expandafter\expandafter\ifx \expandafter\expandafter\expandafter\noexpand \expandafter\reserved@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@a\@empty \zzzzzz \def\reserved@a{% \let\markright\org@markright \bbl@redefine\markright##1{% \toks@{##1}% \edef\bbl@tempa{% \noexpand\org@markright{% \noexpand\foreignlanguage{\languagename}{\the\toks@}}}% \bbl@tempa } \let\markboth\org@markboth \bbl@redefine\markboth##1##2{% \toks@{##1}\toks8{##2}% \edef\bbl@tempa{% \noexpand\org@markboth{% \noexpand\foreignlanguage{\languagename}{\the\toks@}}{% \noexpand\foreignlanguage{\languagename}{\the\toks8}}}% \bbl@tempa }% }% \else \let\reserved@a\@empty \fi \else \let\reserved@a\empty \fi %\show\reserved@a \let\reserved@a\@empty \global\let\@@magyar@@marktest\@undefined \global\let\@@magyar@@marktest@noexp\@undefined \expandafter\endgroup\reserved@a \@gobble {^}% % --- showfix= % % Fix stupid \def\show{...} in AtBeginDocument in ucsencs.def by restoring the original % definition. \ifnum0<0% \magyar@opt@@showfix\relax \space\else\@@magyar@skiplong\fi \def\magyar@stripcolon#1:#2\vfuzz{#2}% \def\magyar@show@begin@fix{% \edef\reserved@a{\expandafter\magyar@stripcolon\meaning\show:\vfuzz}% \ifx\reserved@a\@empty\else % \show is a macro \let\show\@@magyar@orig@show \fi } \edef\reserved@a{\expandafter\magyar@stripcolon\meaning\show:\vfuzz}% \ifx\reserved@a\@empty % \show is not a macro \let\@@magyar@orig@show\show \expandafter\gdef\expandafter\@preamblecmds\expandafter{% \expandafter\magyar@show@begin@fix\@preamblecmds}% %\show\@begindocumenthook %\AtBeginDocument{\magyar@show@begin@fix}% \fi \@gobble {^}% % --- captionfix= % % Fix ``1. ábra'' 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@lfmt\caption@lfmt@simpleMagyar % \if0\magyar@opt@@captionfix\@@magyar@skiplong\fi \def\@@magyar@captionfix{\@ifundefined{caption@lfmt}{}{% % Dat: only in preamble: \DeclareCaptionLabelFormat{simpleMagyar}{#2.\bothIfSecond{\nobreakspace}{#1}} \def\caption@lfmt@simpleMagyar##1##2{##2.\bothIfSecond{\nobreakspace}{##1}}% }} \AtBeginDocument{\@@magyar@captionfix} \expandafter\addto\csname extras\CurrentOption\endcsname{% \ifx\caption@lfmt\caption@lfmt@default % Imp: not if both undefined \ifx\caption@lfmt@simpleMagyar\@undefined\else \babel@save\caption@lfmt \let\caption@lfmt\caption@lfmt@simpleMagyar \fi \fi} \@gobble {^}% % --- shortrefcmds= \if0\magyar@opt@@shortrefcmds\@@magyar@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@caption@centering\@empty\@@magyar@skiplong\fi \def\magyar@caption@hsizecheck{\hsize} % We don't emit the two dots of `1. táblázat.' here, because % has already been emitted by \fnum@table etc. % We apply some formatting depending on the longcaption= option. % Dat: Gyurgyák, p95. says: `11. ábra. Hajtási változatok.' \let\@@magyar@do@makecaption\relax% before .toc \expandafter\addto\csname extras\CurrentOption\endcsname{% \@@magyar@do@makecaption} \def\@@magyar@do@makecaption@captiontwo@yes{% % Dat: package caption2 is loaded; assume \def\captionlabeldelim{.} } \def\@@magyar@do@makecaption@captiontwo@no{% %** @param #1 \fnum@table or \fnum@figure \def\@makecaption##1##2{% \vskip\abovecaptionskip \sbox\@tempboxa{##1.\ ##2}% Dat: `: ' changed to `. ' to match Hungarian typography \ifdim \wd\@tempboxa>\magyar@caption@hsizecheck\relax {\magyar@caption@centering ##1.\magyar@caption@newline ##2\csname par\endcsname}% \else \global \@minipagefalse \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% \fi \vskip\belowcaptionskip}} \AtBeginDocument{% \expandafter\ifx\csname captionlabeldelim\endcsname\relax \expandafter\ifx\csname caption@lsep@period\endcsname\relax \let\@@magyar@do@makecaption\@@magyar@do@makecaption@captiontwo@no \else % Dat: caption3.sty is loaded, and it has caption@lsep defined % Dat: \show\caption@lsep@colon % \long\def\caption@lsep@colon{: } % Dat: \show\caption@lsep %\def\caption@lsep{\caption@lsep@colon} \def\caption@lsep{\caption@lsep@period}% Imp: ability to override \let\@@magyar@do@makecaption\@@magyar@do@makecaption@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@a{:}% \ifx\reserved@a\captionlabeldelim \def\captionlabeldelim{.}\fi \let\@@magyar@do@makecaption\@@magyar@do@makecaption@captiontwo@yes \fi} \@gobble {^}% % --- labelenums= \if0\magyar@opt@@labelenums \@@magyar@skiplong\fi \providecommand\@greekalph[1]{\relax\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@enumv\endcsname\relax \@definecounter{enumv}% call this before \def\theenumv \fi \if3\magyar@opt@@labelenums \def\theenumi {\@arabic \c@enumi} \def\labelenumi {\theenumi.} \def\theenumii {\@alph \c@enumii} \def\labelenumii {\itshape\theenumii)} \def\theenumiii{\@greekalph\c@enumiii}\def\labelenumiii{\itshape\theenumiii)} \def\theenumiv {\@Alph \c@enumiv} \def\labelenumiv {\itshape\theenumiv)} \def\theenumv {\@Roman \c@enumv} \def\labelenumc {\theenumv.} % Dat: I'm not sure \else \def\theenumi{\@Roman\c@enumi} \def\labelenumi{\theenumi.} \def\theenumii{\@arabic\c@enumii} \def\labelenumii{\theenumii.} % !! correct \ref style for \the \if1\magyar@opt@@labelenums % hu-a \def\theenumiii{\@alph\c@enumiii} \def\labelenumiii{\itshape\theenumiii)} \def\theenumiv{\@greekalph\c@enumiv} \def\labelenumiv{\itshape\theenumiv)} \def\theenumv{\@Alph\c@enumv} \def\labelenumv {\itshape\theenumv)} \else% hu-A \def\theenumiii{\@Alph\c@enumiii} \def\labelenumiii{\itshape\theenumiii)} \def\theenumiv{\@alph\c@enumiv} \def\labelenumiv{\itshape\theenumiv)} \def\theenumv{\@greekalph\c@enumv} \def\labelenumv {\itshape\theenumv)} \fi \fi \def\reserved@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@a\enumerate \def\enumerate{% no \@enumdepth>3 \advance\@enumdepth\@ne \expandafter\ifx\csname labelenum\romannumeral\the\@enumdepth\endcsname\relax \@toodeep\advance\@enumdepth\m@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@opt@@labelitems \@@magyar@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@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@a\itemize \def\itemize{% no \@itemdepth>3 \advance\@itemdepth\@ne \expandafter\ifx\csname labelitem\romannumeral\the\@itemdepth\endcsname\relax \@toodeep\advance\@enumdepth\m@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@opt@@paragraphs\endcsname\relax\@@magyar@skiplong\fi % Dat: We make sure that hspaces emitted by \magyar@post@... are unstretchable \def\magyar@post@dot{.\enskip}% \def\magyar@post@bfdot{\textbf.\enskip}% \let\magyar@post@quad\quad% not recommended in Hungarian \let\magyar@post@enskip\enskip% not recommended in Hungarian \def\magyar@post@em{\hskip1em\relax}% \let\magyar@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@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@post@star{\enskip\({}^*\)\enskip}% \def\magyar@post@endash{ -- }% \def\magyar@post@semicolon{:\enskip}% \def\magyar@first#1#2\vfuzz{\noexpand#1}% %** Calls \magyar@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@post@...) %** @param #4 paragraph title text \def\magyar@pf@lowa#1#2#3#4{% \if#1*\relax \bbl@afterelse\magyar@pf@lowb*% \else \bbl@afterfi \magyar@pf@lowb{[#4]}% \fi {#2}{#3}{#4}% }% % !! a less obscure way for \paragraph, without -1sp etc. %** Calls \magyar@pf@lowb, and never emits code resulting from #3 to TOC %** @param #1 \@startsection{...}{...}... call %** @param #2 \paragraph or \subparagraph (selects one of \magyar@post@...) %** @param #3 paragraph title text %** @param #4 [...] arg to \paragraph \def\magyar@pf@lowc#1#2#3[#4]{% \magyar@pf@lowb{[#4]}{#1}{#2}{#3}% }% %** Calls \magyar@post@paragraph and \magyar@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@pf@lowb#1#2#3#4{% #2#1{#4\csname magyar@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@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). %** @param #1 \paragraph or \subparagraph \def\magyar@paragraphfix#1{% \expandafter\magyar@pf@lowd\expandafter#1#1\hfuzz........\vfuzz } \def\magyar@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@a\expandafter{\magyar@first#9\vfuzz}% %\def\reserved@a{#9}\ifx\reserved@a\@empty \if\reserved@a\hfuzz\ifx#2\@startsection\if-\magyar@first#7\vfuzz \def#1{\@ifstar {\magyar@pf@lowa *{#2{#3}{#4}{#5}{#6}{-1sp}{#8}}#1}% {\@ifnextchar[%] {\magyar@pf@lowc{#2{#3}{#4}{#5}{#6}{-1sp}{#8}}#1}% {\magyar@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@opt@@postpara\endcsname\relax\else \magyar@paragraphfix\paragraph \expandafter\let\expandafter\magyar@post@paragraph\csname magyar@post@\magyar@opt@@postpara\endcsname \ifx\magyar@post@paragraph\relax \@@magyar@error{Invalid arg for option: postpara = \magyar@opt@@postpara}% \fi \fi \expandafter\ifx\csname magyar@opt@@postsubpara\endcsname\relax\else \magyar@paragraphfix\subparagraph \expandafter\let\expandafter\magyar@post@subparagraph\csname magyar@post@\magyar@opt@@postsubpara\endcsname \ifx\magyar@post@subparagraph\relax \@@magyar@error{Invalid arg for option: postsubpara = \magyar@opt@@postsubpara}% \fi \fi \expandafter\ifx\csname magyar@opt@@postdescription\endcsname\relax\else \expandafter\let\expandafter\magyar@post@description\csname magyar@post@\magyar@opt@@postdescription\endcsname \ifx\magyar@post@description\relax \@@magyar@error{Invalid arg for option: postdescription = \magyar@opt@@postdescription}% \fi \def\magyar@@descriptionfont{\normalfont\bfseries}% \def\descriptionlabel#1{\hskip\labelsep{\magyar@@descriptionfont#1}\magyar@post@description\hskip-\labelsep}% \fi \@gobble {^}% % --- afterindent= \ifnum\magyar@opt@@afterindent>8 \@@magyar@skiplong\fi \ifnum\magyar@opt@@afterindent<1 % force-no \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@save\@afterindenttrue \let\@afterindenttrue\@afterindentfalse }% \else% force-yes \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@save\@afterindentfalse \let\@afterindentfalse\@afterindenttrue }% \fi \@gobble {^} % --- default \frenchspacing; frenchspacing= \if0\magyar@opt@@frenchspacing \@@magyar@skiplong\fi \if1\magyar@opt@@frenchspacing% =no \def\@@magyar@antifrenchspacing{% only does some caching \ifnum\the\sfcode`\.=\@m \nonfrenchspacing \let\@@magyar@nonfrenchspacing\frenchspacing \else \let\@@magyar@nonfrenchspacing\relax \fi} \let\@@magyar@nonantifrenchspacing\frenchspacing \expandafter\addto\csname extras\CurrentOption\endcsname{\@@magyar@antifrenchspacing} \expandafter\addto\csname noextras\CurrentOption\endcsname{\@@magyar@nonantifrenchspacing} \else \expandafter\addto\csname extras\CurrentOption\endcsname{\bbl@frenchspacing} \expandafter\addto\csname noextras\CurrentOption\endcsname{\bbl@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@opt@@sectiondot \@@magyar@skiplong\fi \ifnum\magyar@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@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@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@save\@sect \def\@sect#1#2#3#4#5#6[#7]#8{% \ifnum #2>\c@secnumdepth \let\@svsec\@empty \else \refstepcounter{#1}% \protected@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@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@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@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}}} % 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@striplastdot@lowa#1.\relax{#1\relax}% \def\magyar@striplastdot@lowb#1\relax#2\relax{#1}% %** \@tempdima is set by \@dottedtocline, called by \l@section \def\magyar@numberline#1\vfuzz{\hb@xt@\@tempdima{#1.\hfil}}% \def\@@magyar@numberline@pre#1{% \expandafter\expandafter\expandafter\magyar@numberline \expandafter\magyar@striplastdot@lowb\magyar@striplastdot@lowa#1\relax.\relax\vfuzz }% \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@save\numberline %** Overrides latex.ltx \let\numberline\@@magyar@numberline@pre } \fi \@gobble {^} % --- amspostsectiondot= \if0\magyar@opt@@amspostsectiondot \@@magyar@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@amssect@fixa#1\global\@nobreaktrue\@xsect#2\hfuzz#3{% \ifx\hfuzz#2\hfuzz\else% found \@@magyar@amssect@fixb#3\fi} %** @param #1 a \cs, e.g \@sect \def\@@magyar@amssect@fixb#1{% \expandafter\let\csname @@magyar@amssect@saved\string#1\endcsname#1% \edef#1{\noexpand\expandafter\noexpand\@@magyar@amssect@low \expandafter\noexpand\csname @@magyar@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@amssect@low##1\global\@nobreaktrue{% ##1% \expandafter\def\expandafter\@svsechd\expandafter{% \expandafter\let\expandafter\@addpunct\expandafter\@gobble \@svsechd}% \global\@nobreaktrue }% } \expandafter\@@magyar@amssect@fixa\@sect[][][][][][][][]\global\@nobreaktrue\@xsect\hfuzz\@sect \expandafter\@@magyar@amssect@fixa\@sect[][][][][][][][]\global\@nobreaktrue\@xsect\hfuzz\NR@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@opt@@amstocnumskip \@@magyar@skiplong\fi % Similar to titleskip=, but AMS classes don't look at \@seccntformat \def\@@magyar@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@amstocnumskip@defs{% \ifx\tocsubsection\@undefined\else \ifx\tocsubsection\tocparagraph %** Overrides amsart.cls etc. Only for Hungarian \section{}s. Changes \quad to %** \magyar@opt@@amstocnumskip in the definition. \def\tocsection##1##2##3{% %%\typeout{--##3--}% \indentlabel{\@ifnotempty{##2}{\ignorespaces##1 ##2.\magyar@opt@@amstocnumskip}}##3% }% %** Overrides amsart.cls etc. Only for Hungarian \section{}s. Changes \quad to %** \magyar@opt@@amstocnumskip in the definition. \def\tocappendix##1##2##3{\indentlabel{##1\@ifnotempty{##2}{ ##2}.\magyar@opt@@amstocnumskip}##3}% \fi \fi }% \AtBeginDocument\@@magyar@amstocnumskip@lets % must be before @defs \if2\magyar@opt@@amstocnumlang \AtBeginDocument\@@magyar@amstocnumskip@defs %\let\@@magyar@amstocnumskip@defs\@undefined% for use by the user \else \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@save\tocsection \babel@save\tocappendix \@@magyar@amstocnumskip@defs } \fi \@gobble {^}% % --- Fixup Babel language selection glitches; toclang= % There are fundamental problem of emitting \select@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@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@main@language', from which an % \immediate is missing, so the \select@language is emitted to the .aux file % after the first float has been typeset. A better solution would be % `\select@language{\languagename}', which forcibly activates the default % language. % % Problem (4): \ps@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@opt@@toclang=0 \@@magyar@skiplong\fi \ifnum\magyar@opt@@toclang>1 % Solve problems (2) and (4). Timing is critical. \select@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@setup@psheadings might just be run \AtBeginDocument, it doesn't % need \@preamblecmds -- but it must be after \select@language. % % \@preamblecmds is expanded after \@begindocumenthook \expandafter\gdef\expandafter\@preamblecmds\expandafter{\@preamblecmds \@@magyar@setup@psheadings% Solve problem (4). Before \selectlanguage. \select@language{\languagename}% force initial language }% % Solve problem (1) and assist solving problem (2) by not emitting % \select@language twice. \def\bbl@set@language#1{% \edef\@Lang@tmp{% \ifcat\noexpand\noexpand\noexpand#1% a control sequence \expandafter\expandafter\expandafter\@gobble\expandafter\string \fi #1% }% \ifx\languagename\@Lang@tmp\else \let\languagename\@Lang@tmp \select@language{\languagename}% \fi }% % Solve problem (3). \long\def\addtocontents#1#2{% % Dat: \noexpand should be avoided in \protected@write \protected@write\@auxout {\let\label\@gobble \let\index\@gobble \let\glossary\@gobble \let\select@language\relax}% {\string\@writefile{#1}{\string\select@language{\languagename} #2}}} \else % Solve problems (2) and (4). \AtBeginDocument{% \if@filesw \immediate\write\@mainaux{% \string\select@language{\languagename}% \string\@writefile{toc}{\string\select@language{\languagename}}% \string\@writefile{lof}{\string\select@language{\languagename}}% \string\@writefile{lot}{\string\select@language{\languagename}}% }\fi \@@magyar@setup@psheadings% Solve problem (4). Before \selectlanguage. \select@language{\languagename}% force initial language } % Solve problem (1) and assist solving problem (2) by not emitting % \select@language twice. \def\bbl@set@language#1{% \edef\@Lang@tmp{% \ifcat\noexpand\noexpand\noexpand#1% a control sequence \expandafter\expandafter\expandafter\@gobble\expandafter\string \fi #1% }% \ifx\languagename\@Lang@tmp\else \let\languagename\@Lang@tmp \select@language{\languagename}% \if@filesw \protected@write\@auxout{}{% \string\select@language{\languagename}% \string\@writefile{toc}{\string\select@language{\languagename}}% \string\@writefile{lof}{\string\select@language{\languagename}}% \string\@writefile{lot}{\string\select@language{\languagename}}% \fi}% \fi }% % Don't solve problem (3). \fi \@gobble {^}% % --- suggestions= \ifnum\magyar@opt@@suggestions=0 \@@magyar@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@stringwarning\reftextpagerange % on pages~\pageref{#1}--\pageref{#2}}% % \def\reftextlabelrange#1#2{\vref@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@ignorehbox@pree#1\hbox$#2{}% %\def\@@magyar@grep@reftextcurrent#1\def\reftextcurrent#2\hbox$ \def\@@magyar@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@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@grep@reftextbegin#1\hfuzz\hfuzz\hfuzz#8\hbox${#9}% \fi } \def\magyar@sugg@vr#1{% \expandafter\expandafter\expandafter\@@magyar@grep@reftextcurrent \csname extras#1\endcsname\hbox${#1}\@@magyar@ignorehbox@pree \def\reftextlabelrange23456\AtBeginDocument78\hbox${#1}% } \def\magyar@sugg@to#1{% \def\reserved@a{T1} \edef\reserved@b{\encodingdefault}% \encodingdefault is \long for t1enc.sty, but not for fontenc.sty \ifx\reserved@a\reserved@b\else \@latex@warning@no@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@sugg@ie@lowb#1{\@latex@warning@no@line{Please use \string\usepackage[latin2]{inputenc} with\MessageBreak \string\usepackage[#1]{babel}}}% %** @param #1 \@inpenc@undefined@ %** @param #2 input encoding name \def\magyar@sugg@ie@low#1#2#3\vfuzz#4{% \def\reserved@b{#2}% \def\reserved@a{latin2}% \ifx\reserved@a\reserved@b\else \def\reserved@a{utf8}% \ifx\reserved@a\reserved@b\else \def\reserved@a{cp1250}% \ifx\reserved@a\reserved@b\else \magyar@sugg@ie@lowb{#4}% \fi \fi \fi } \def\magyar@sugg@ie#1{% % Dat: don't print warning for missing \usepackage \expandafter\ifx\csname @inpenc@undefined\endcsname\relax \magyar@sugg@ie@lowb{#1}% \else % from inputenc.sty: \edef\@inpenc@undefined{\noexpand\@inpenc@undefined@{#1}}% % > \@inpenc@undefined=macro: % ->\@inpenc@undefined@ {latin2}. \expandafter\magyar@sugg@ie@low\@inpenc@undefined....\vfuzz{#1}% \fi }% \def\magyar@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@fancy{\relax}%\@fancyplainfalse\ps@@fancy}% \def\magyar@sugg@fh#1{% \ifx\ps@fancy\@@magyar@@ps@fancy \PackageWarningNoLine{#1.ldf}{No effect on fancyhdr.sty,\MessageBreak please load it before \string\usepackage[#1]{babel}}% \fi }% \def\magyar@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@a{\noexpand\AtBeginDocument{% \noexpand\magyar@sugg@pa{\CurrentOption}% \noexpand\magyar@sugg@af{\CurrentOption}% \noexpand\magyar@sugg@ap{\CurrentOption}% \noexpand\magyar@sugg@to{\CurrentOption}% \noexpand\magyar@sugg@ie{\CurrentOption}% \noexpand\magyar@sugg@vr{\CurrentOption}% \noexpand\magyar@sugg@fh{\CurrentOption}% }}\reserved@a \@gobble {^}% % --- Active characters and shorthands; active=, activeprefix=, activespace= \ifnum0=\magyar@opt@@activespace\magyar@opt@@active\space \def\@@magyar@declare@shorthandx#1#2{% \expandafter\def\csname @@magyar@shorthand@\string#1\endcsname{#2}% } \@@magyar@skiplong\fi \def\magyar@activate@shorthands{% \edef\reserved@a{% \noexpand\addto\expandafter\noexpand\csname extras\CurrentOption\endcsname {\noexpand\languageshorthands{\CurrentOption}}% } \reserved@a \let\magyar@activate@shorthands\relax } \let\@@magyar@saved@initiate@active@char\initiate@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@protect@backtick\@begindocumenthook}% \xdef\@begindocumenthook{\the\toks@}}% Dat: \@begindocumenthook has #1 #2 etc. \def\@@magyar@protect@backtick{% \if@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@shorthand \def\magyar@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@filesw\immediate\write\@auxout{\catcode\noexpand\string`#1=12}\fi } \initiate@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@filesw\immediate\write\@auxout{\catcode\noexpand\string`#1=12}\fi} \let\magyar@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@active@char{#1}% \let\AtBeginDocument\magyar@saved@AtBeginDocument \let\magyar@saved@AtBeginDocument\@undefined \expandafter\addto\csname extras\CurrentOption\endcsname{% \babel@savevariable{\catcode\string`#1}% \catcode\string`#1=13 % }% \fi % Dat: now #1 is \active (done by \initiate@active@char) \lccode\string`~=\string`#1\lowercase{% Dat: luckily everything below is in lowercase \expandafter\addto\csname extras\CurrentOption\endcsname {\bbl@activate{~}}% \expandafter\addto\csname noextras\CurrentOption\endcsname{\bbl@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@declare@shorthand@low#1#2#3{% \declare@shorthand{\CurrentOption}{#1#2}{#3}% } \edef\@@magyar@shorthandprefix{\string`}% %** @param #1 a single character (will be prefixed by ``' etc.) %* @param #2 TeX code %\def\@@magyar@declare@shorthand#1#2{\magyar@opt@@activeprefix#1{#2}}% defined below \ifx\magyar@opt@@activeprefix\relax \magyar@opt@@active0 \else\edef\@@magyar@declare@shorthand#1#2{\noexpand\@@magyar@declare@shorthand@low\expandafter\string\magyar@opt@@activeprefix#1{#2}}\fi %\magyar@activate@shorthands% not yet \def\@@magyar@declare@shorthandx#1#2{% \magyar@activate@shorthands \expandafter\def\csname @@magyar@shorthand@\string#1\endcsname{#2}% \expandafter\@@magyar@declare@shorthand\expandafter#1\expandafter{\csname @@magyar@shorthand@\string#1\endcsname}% } \@gobble {^}% %** Call \@@magyar@shorthand@... For example: {`tty} and %** {\@@magyar@shorthand tty} are interchangeable. %** @param #1 a char token. \def\@@magyar@shorthand#1{% \expandafter\ifx\csname @@magyar@shorthand@\string#1\endcsname\relax \@@magyar@error{Unknown shorthand: \string#1 }% \else \expandafter\expandafter\csname @@magyar@shorthand@\string#1\endcsname \fi } % --- activespace= Extra \thispace before :, ;, ! and ? % % french.ldf has \space after `:', but we only have \thinspace \ifnum\magyar@opt@@activespace=0 \@@magyar@skiplong\fi %** @param #1 any of : ; ! ? \def\magyar@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@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@activate@shorthands \magyar@activate@char;\magyar@opt@@activespace \declare@shorthand{\CurrentOption}{;}{\magyar@thinspaced;} \magyar@activate@char!\magyar@opt@@activespace \declare@shorthand{\CurrentOption}{!}{% \ifmmode \expandafter\ifx\csname factorial\endcsname\relax\mathchar"5021 \else\factorial\fi \else\magyar@thinspaced!\fi} % ^^^ compatibility with nath.sty \magyar@activate@char?\magyar@opt@@activespace \declare@shorthand{\CurrentOption}{?}{\magyar@thinspaced?} \magyar@activate@char:\magyar@opt@@activespace \declare@shorthand{\CurrentOption}{:}{\magyar@thinspaced:} \@gobble {^}% % --- active= % % Dat: active=safe isn't safe unless other .ldf files used don't call % \initiate@active@char{`}. \ifnum\magyar@opt@@active=0 \ifnum\magyar@opt@@openqq>0 \@@magyar@error{active=none implies openqq=unchanged}\fi \@@magyar@skiplong\fi \ifnum\magyar@opt@@active>1 \magyar@activate@shorthands% Dat: don't do it if \magyar@opt@@active=0 \expandafter\magyar@activate@char\magyar@opt@@activeprefix\magyar@opt@@active \fi % \ifnum\magyar@opt@@openqq>1 % =down % Same as in in ukraineb.ldf \@@magyar@declare@shorthandx`{\glqq}% down 99 \@@magyar@declare@shorthandx'{\grqq}% up 66 \else\ifnum\magyar@opt@@openqq>0 % =up \@@magyar@declare@shorthandx`{\grqq}% up 66 \@@magyar@declare@shorthandx'{\glqq}% down 99 \else \dMf @@magyar@shorthand@\string` {\string`\string`}% unchanged -- expect a ligature in font \dMf @@magyar@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ózsa Márton \@@magyar@declare@shorthandx ={\leavevmode\nobreak-\hskip\z@skip} % ^^^ Dat: no need for \nobreak\hskip\z@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őd\shu?--Nagy Pál %** @example közgazdaság\shu?-tudományi \def\@@magyar@shorthandminus{% \ifmmode \mskip2.4mu plus3.6mu minus1.8mu \else % ,`- is just a space in math mode \if-\noexpand\@Lang@tmp \leavevmode\nobreak\,\nobreak\hbox{--}\,\expandafter\expandafter\expandafter\@gobble% Dat: \@gobble - \else \leavevmode\nobreak-\hskip\z@skip\fi% Dat: e.g hegyes`-szögű \fi } \@@magyar@declare@shorthandx -{\futurelet\@Lang@tmp\@@magyar@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átrium`|klorid} -> nát-ri-um--klo-rid \@@magyar@declare@shorthandx |{\leavevmode\nobreak-\nobreak\discretionary{}{-}{}\nobreak\hskip\z@skip}% Dat: all \nobreak s are important % e.g egyszer`|kétszer \@@magyar@declare@shorthandx _{\leavevmode\nobreak\-\nobreak\hskip\z@skip} \@@magyar@declare@shorthandx <{\flqq} \@@magyar@declare@shorthandx >{\frqq} \@@magyar@declare@shorthandx "{\hskip\z@skip}% \allowbreak, but hyphenation is OK at both sides \@@magyar@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@allowhyphens: \showhyphens{ho`sszabbra} -> hosz-szabb-ra % Dat: \def\foo{`}\declare@shorthand{\CurrentOption{\foo c}{...} doesn't work % Dat: these work quite well in math mode % Dat: \showhyphens{a\hskip\z@skip b} displays "ab", but % \showhyphens{a\hskip0pt b} displays "a b" %** These should be equivalent: %** \showhyphens{verembepot\nobreak\discretionary{y-}{}{}\nobreak\hskip\z@skip tyantam} %** \showhyphens{verembepo`ttyantam} \def\@@magyar@disc#1#2{#1\textormath{\nobreak\discretionary{#2-}{}{}}{}\nobreak\hskip\z@skip}% \@@magyar@declare@shorthandx c{\@@magyar@disc cs}% loccsan --> locs-csan (lo`ccsan) \@@magyar@declare@shorthandx C{\@@magyar@disc CS} \@@magyar@declare@shorthandx g{\@@magyar@disc gy}% poggy\'asz --> pogy-gy\'asz (po`ggy\'asz) \@@magyar@declare@shorthandx G{\@@magyar@disc GY} \@@magyar@declare@shorthandx l{\@@magyar@disc ly}% Kod\'allyal --> Kod\'aly-lyal (Kod\'a`llyal) \@@magyar@declare@shorthandx L{\@@magyar@disc LY} \@@magyar@declare@shorthandx n{\@@magyar@disc ny}% mennyei --> meny-nyei (me`nnyei) \@@magyar@declare@shorthandx N{\@@magyar@disc NY} \@@magyar@declare@shorthandx s{\@@magyar@disc sz}% vissza --> visz-sza (vi`ssza) \@@magyar@declare@shorthandx S{\@@magyar@disc SZ} \@@magyar@declare@shorthandx t{\@@magyar@disc ty}% pottyan --> poty-tyan (po`ttyan) \@@magyar@declare@shorthandx T{\@@magyar@disc TY} \@@magyar@declare@shorthandx z{\@@magyar@disc zs}% rizzsel --> rizs-zsel (ri`zzsel) \@@magyar@declare@shorthandx Z{\@@magyar@disc ZS} \def\magyar@fixddzs{\@@magyar@declare@shorthandx d{% bridzs-dzsel % vvv doesn't handle the rare combination dzs-dzs %\@@magyar@declare@shorthandx D}{\@@magyar@disc DZ} %\@@magyar@declare@shorthandx d}{\@@magyar@disc dz}% eddz\"unk (felsz. m.) --> edz-dz\"unk (e`ddz\"unk) \def\reserved@a{% \if\noexpand\reserved@b d% \def\reserved@a{% \if\noexpand\reserved@b z% \def\reserved@a{% \nobreak% so word before `ddzs gets hyphenated \if\noexpand\reserved@b s% \discretionary{dzs-}{dz}{ddz}% \showhyphens{szuper`ddzsungelben} \else \discretionary{dz-}{d}{dd}z% \showhyphens{szuper`ddzungelben} \fi \nobreak\hskip\z@skip% allow both pre- and post breaks }% \bbl@afterelse\expandafter\futurelet\expandafter\reserved@b\expandafter\reserved@a\@gobble \else \bbl@afterfi dd% \fi }% \bbl@afterelse\expandafter\futurelet\expandafter\reserved@b\expandafter\reserved@a\@gobble \else\bbl@afterfi d\fi }% \futurelet\reserved@b\reserved@a% doesn't remove next token }}% \magyar@fixddzs \expandafter\uppercase\expandafter{\magyar@fixddzs} \@gobble {^}% % --- hunumbers= \ifnum\magyar@opt@@hunumbers=0 \@@magyar@skiplong\fi \def\@@magyar@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@upperfi@nine#1\fi\fi\fi\fi\fi\fi\fi\fi\fi{\fi\fi\fi\fi\fi\fi\fi\fi\fi#1} \def\@@magyar@upperelse@nine#1\else#2\fi\fi\fi\fi\fi\fi\fi\fi\fi{\fi#1} \def\@@magyar@uppernum#1{% \ifx#1\"\@@magyar@upperelse@nine\"O\@gobble% \"o \else\if\noexpand#1eE% \else\if\noexpand#1hH% \else\if\noexpand#1kK% \else\if\noexpand#1mM% mínusz \else\if\noexpand#1nN% \else\if\noexpand#1oO% \else\if\noexpand#1sS% sokadik \else\if\noexpand#1tT% \else\@@magyar@upperfi@nine\expandafter\@@magyar@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ő). Suitable for numbering %** \part{}s and \chapter{}s of a book (\def\thepart{\@Huordinal\c@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#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@ezresedik\number#1.\else \ifnum#1>99 \expandafter\@@magyar@szazasodik\number#1\else \expandafter\@@magyar@tizesedik\number#1% \fi\fi\fi\fi\fi\fi } %** @param #1#2 1000..9999 \def\@@magyar@ezresedik#1#2.{% \ifnum#1#2>9999 sokadik\else \@@magyar@egyjegyu#1% \ifnum#2=0 ezredik\else ezer\ifnum#1>1 -\fi% kétezer-harmadik \ifnum#2<100 \expandafter\@@magyar@tizesedik\number#2% \else \ifnum#2<200 egy\fi% ezerszázadik -> ezeregyszázadik \@@magyar@szazasodik#2% \fi \fi \fi } %** @param #1#2 100..999 %** Imp: binary search \def\@@magyar@szazasodik#1#2#3{% \@@magyar@egyjegyu#1sz\'az% \@@magyar@tizesedik#2#3% } %** @param #1 a digit %** @param #2 a digit %** Imp: binary search \def\@@magyar@tizesedik#1#2{% \ifnum#1#2>89 kilencven\@@magyar@egyesedik#2e% \else\ifnum#1#2>79 nyolcvan\@@magyar@egyesedik#2a% \else\ifnum#1#2>69 hetven\@@magyar@egyesedik#2e% \else\ifnum#1#2>59 hatvan\@@magyar@egyesedik#2a% \else\ifnum#1#2>49 \"otven\@@magyar@egyesedik#2e% \else\ifnum#1#2>39 negyven\@@magyar@egyesedik#2e% \else\ifnum#1#2>29 harminc\@@magyar@egyesedik#2a% \else\ifnum#1#2>20 huszon\@@magyar@egyesedik#2.% \else\ifnum#1#2=20 huszadik% \else\ifnum#1#2>10 tizen\@@magyar@egyesedik#2.% \else\ifnum#1#2=10 tizedik% \else \@@magyar@egyesedik#2a% ``kétszázadik'' \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi }% \def\@@magyar@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@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ő). Suitable for numbering %** \part{}s and \chapter{}s of a book (\def\thepart{\@Hunumeral\c@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@ezer\number#1.\else \ifnum#1>99 \expandafter\@@magyar@szaz\number#1\else \expandafter\@@magyar@tiz\number#1% \fi\fi\fi\fi } %** @param #1#2 1000..9999 \def\@@magyar@ezer#1#2.{% \ifnum#1#2>9999 sokadik\else \@@magyar@egyjegyu#1% \ifnum#2=0 ezer\else ezer\ifnum#1>1 -\fi% kétezer-harmadik \ifnum#2<100 \expandafter\@@magyar@tiz\number#2% \else \ifnum#2<200 egy\fi% ezerszázadik -> ezeregyszázadik \@@magyar@szaz#2% \fi \fi \fi } %** @param #1#2 100..999 %** Imp: binary search \def\@@magyar@szaz#1#2#3{% \@@magyar@egyjegyu#1sz\'az% \@@magyar@tiz#2#3% } %** @param #1 a digit %** @param #2 a digit %** Imp: binary search \def\@@magyar@tiz#1#2{% \ifnum#1#2>89 kilencven\@@magyar@egy#2% \else\ifnum#1#2>79 nyolcvan\@@magyar@egy#2% \else\ifnum#1#2>69 hetven\@@magyar@egy#2% \else\ifnum#1#2>59 hatvan\@@magyar@egy#2% \else\ifnum#1#2>49 \"otven\@@magyar@egy#2% \else\ifnum#1#2>39 negyven\@@magyar@egy#2% \else\ifnum#1#2>29 harminc\@@magyar@egy#2% \else\ifnum#1#2>20 huszon\@@magyar@egy#2% \else\ifnum#1#2=20 h\'usz% \else\ifnum#1#2>10 tizen\@@magyar@egy#2% \else\ifnum#1#2=10 t\'iz% \else \@@magyar@egy#2% ``kétszázadik'' \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi }% \def\@@magyar@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@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@opt@@told=0 \@@magyar@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: ...@st is is special for appending +t to \refstruc names \def\@@magyar@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@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@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@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@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@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@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@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@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@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@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@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@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@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}% \def\@@magyar@suffix@an{\@@magyar@suffix@@an}% make \ifx\@@magyar@suffix@an faster \def\@@magyar@suffix@at{\@@magyar@suffix@@at}% make \ifx\@@magyar@suffix@at faster \def\@@magyar@suffix@hoz{h\@@magyar@suffix@@hoz z} \def\@@magyar@suffix@ban{b\@@magyar@suffix@@a n} \def\@@magyar@suffix@nak{n\@@magyar@suffix@@a k} \def\@@magyar@suffix@ba{b\@@magyar@suffix@@a \@empty} \def\@@magyar@suffix@ra{r\@@magyar@suffix@@a \@empty} \def\@@magyar@suffix@bol{b\@@magyar@suffix@@ol} \def\@@magyar@suffix@tol{t\@@magyar@suffix@@ol} \def\@@magyar@suffix@rol{r\@@magyar@suffix@@ol} \def\@@magyar@suffix@szor{sz\@@magyar@suffix@@hoz r} % vvv Continued suffix variants \def\@@magyar@skipfi\fi\else{\fi}% %** Usage: \@@magyar@suffix@aS{5}\magyar@@suffix@hoz \def\@@magyar@suffix@aS#1#2{% \ifnum#2=5 \ifx#1\@@magyar@suffix@at \"oset\else\@@magyar@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#1% \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@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#1% \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@suffix@adiK#1#2{% \ifnum#2=1 \ifx#1\@@magyar@suffix@at s\"ot\else\@@magyar@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#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 }% \def\@@magyar@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@suffix@at t\else \ifx#1\@@magyar@suffix@an n\else% Dat: suffix overload: 2-a-an => 2-án \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@suffix@@bad#1#2{\@@magyar@error{Unknown suffix \string`#1' for \string\told}} % vvv Input suffix parser %** Also defined elsewhere. %** @param #2 \else...\else...\fi...\fi etc. \def\@@magyar@swaprelax#1#2\relax{#2#1} %\def\@@magyar@swapno#1\noexpand{...} \def\@@magyar@contn#1\relax{#1\@@magyar@told@cont{}} \def\@@magyar@conta#1#2#3\relax{#3\noexpand#1\@@magyar@told@cont{#2}} \def\@@magyar@badsuffix#1#2\relax{#2\noexpand\@@magyar@suffix@@bad{#1}\@@magyar@told@cont{#1}}% \def\@@magyar@fs@#1{% \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@a\else \if b\noexpand#1\@@magyar@swaprelax\@@magyar@fs@b\else \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@e\else \if h\noexpand#1\@@magyar@swaprelax\@@magyar@fs@h\else \if n\noexpand#1\@@magyar@swaprelax\@@magyar@fs@n\else \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@o\else \if r\noexpand#1\@@magyar@swaprelax\@@magyar@fs@r\else \if s\noexpand#1\@@magyar@swaprelax\@@magyar@fs@s\else \if t\noexpand#1\@@magyar@swaprelax\@@magyar@fs@t\else \if u\noexpand#1\@@magyar@swaprelax\@@magyar@fs@u\else \if v\noexpand#1\@@magyar@swaprelax\@@magyar@fs@v\else \@@magyar@badsuffix{#1}\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax } \def\@@magyar@fs@a#1{% %\if -\noexpand#1\@@magyar@swapno\else \if +\noexpand#1\noexpand\@@magyar@suffix@A\@@magyar@swaprelax\@@magyar@fs@\else \if d\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ad\else \if n\noexpand#1\noexpand\@@magyar@suffix@an\@@magyar@contn\else \if s\noexpand#1\@@magyar@swaprelax\@@magyar@fs@as\else \if t\noexpand#1\noexpand\@@magyar@suffix@at\@@magyar@contn\else \@@magyar@conta\@@magyar@suffix@a{#1}% \fi\fi\fi\fi\fi\relax } \def\@@magyar@fs@ad#1{% %\if -\noexpand#1\@@magyar@swapno\else \if +\noexpand#1\noexpand\@@magyar@suffix@aD\@@magyar@swaprelax\@@magyar@fs@\else \if i\noexpand#1\@@magyar@swaprelax\@@magyar@fs@adi\else \@@magyar@conta\@@magyar@suffix@ad{#1}% \fi\fi\relax } \def\@@magyar@fs@adi#1{% \if k\noexpand#1\@@magyar@swaprelax\@@magyar@fs@adik\else \@@magyar@badsuffix{adi#1}\fi\relax } \def\@@magyar@fs@adik#1{% %\if -\noexpand#1\@@magyar@swapno\else \if +\noexpand#1\noexpand\@@magyar@suffix@adiK\@@magyar@swaprelax\@@magyar@fs@\else \@@magyar@conta\@@magyar@suffix@adik{#1}% \fi\relax } \def\@@magyar@fs@as#1{% %\if -\noexpand#1\@@magyar@swapno\else \if +\noexpand#1\noexpand\@@magyar@suffix@aS\@@magyar@swaprelax\@@magyar@fs@\else \@@magyar@conta\@@magyar@suffix@as{#1}% \fi\relax } \def\@@magyar@fs@b#1{% \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ba\else \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ba\else \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@bo\else \@@magyar@badsuffix{b#1}\fi\fi\fi\relax } \def\@@magyar@fs@ba#1{% \if n\noexpand#1\noexpand\@@magyar@suffix@ban\@@magyar@contn\else \@@magyar@conta\@@magyar@suffix@ba{#1}% \fi\relax } \def\@@magyar@fs@bo#1{% \if l\noexpand#1\noexpand\@@magyar@suffix@bol\@@magyar@contn\else \@@magyar@badsuffix{bo#1}\fi\relax } \def\@@magyar@fs@e#1{% \if d\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ad\else \if s\noexpand#1\@@magyar@swaprelax\@@magyar@fs@as\else \if t\noexpand#1\noexpand\@@magyar@suffix@at\@@magyar@contn\else \if n\noexpand#1\noexpand\@@magyar@suffix@an\@@magyar@contn\else \if +\noexpand#1\noexpand\@@magyar@suffix@A\@@magyar@swaprelax\@@magyar@fs@\else %\@@magyar@badsuffix{e#1} \@@magyar@conta\@@magyar@suffix@a{#1}% \fi\fi\fi\fi\fi\relax } \def\@@magyar@fs@h#1{% \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ho\else \if o\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ho\else \@@magyar@badsuffix{h#1}\fi\fi\relax } \def\@@magyar@fs@ho#1{% \if z\noexpand#1\noexpand\@@magyar@suffix@hoz\@@magyar@contn\else \@@magyar@badsuffix{ho#1}\fi\relax } \def\@@magyar@fs@n#1{% \if a\noexpand#1\@@magyar@swaprelax\@@magyar@fs@na\else \if e\noexpand#1\@@magyar@swaprelax\@@magyar@fs@na\else \@@magyar@badsuffix{n#1}\fi\fi\relax } \def\@@magyar@fs@na#1{% \if k\noexpand#1\noexpand\@@magyar@suffix@nak\@@magyar@contn\else \if l\noexpand#1\noexpand\@@magyar@suffix@nal\@@magyar@contn\else \@@magyar@badsuffix{na#1}\fi\fi\relax } \def\@@magyar@fs@o#1{% \if d\noexpand#1\@@magyar@swaprelax\@@magyar@fs@ad\else \if n\noexpand#1\noexpand\@@magyar@suffix@on\@@magyar@contn\else \if s\noexpand#1\@@magyar@swaprelax\@@magyar@fs@as\else \if t\noexpand#1\noexpand\@@magyar@su