% Language definition file (part of polyglossia v2.3 -- 2024/09/23) % \ProvidesFile{gloss-hungarian.ldf}[polyglossia: module for Hungarian] \PolyglossiaSetup{hungarian}{ bcp47=hu, bcp47-language=hu, bcp47-region=HU, bcp47-script=Latn, babelname=magyar, hyphennames={hungarian,magyar}, langtag=HUN, hyphenmins={2,2}, fontsetup=true, } % BCP-47 compliant aliases \setlanguagealias*{hungarian}{hu} \frenchspacing % Babel and backwards compat. alias \setlanguagealias{hungarian}{magyar} \newif\if@hungarian@swapcaptions \newif\if@hungarian@swapheadings \newif\if@hungarian@swapheaders \DeclareKeys[polyglossia/gloss/hungarian] { forceheadingpunctuation.if = hungarian@forceheadingpunctuation, forceheadingpunctuation.default:n = true, swapstrings.choice:, swapstrings / all.code = {% \@hungarian@swapcaptionstrue \@hungarian@swapheadingstrue \@hungarian@swapheaderstrue }, swapstrings / captions.code = {% \@hungarian@swapcaptionstrue \@hungarian@swapheadingsfalse \@hungarian@swapheadersfalse }, swapstrings / headings.code = {% \@hungarian@swapcaptionsfalse \@hungarian@swapheadingstrue \@hungarian@swapheadersfalse }, swapstrings / headers.code = {% \@hungarian@swapcaptionsfalse \@hungarian@swapheadingsfalse \@hungarian@swapheaderstrue }, swapstrings / hheaders.code = {% \@hungarian@swapcaptionsfalse \@hungarian@swapheadingstrue \@hungarian@swapheaderstrue }, swapstrings / none.code = {% \@hungarian@swapcaptionsfalse \@hungarian@swapheadingsfalse \@hungarian@swapheadersfalse }, swapstrings.default:n = all, swapstrings/unknown.code = \xpg@warning{Unknown Hungarian swapstrings value `#1'} } % Register default options % forceheadinpunctuatin is recommended, but the default value is false for compatibility reasons \InitializeGlossOptions{hungarian}{swapstrings=all, forceheadingpunctuation=false} \def\hungarian@language{% \SetupPolyglossiaLangPatterns{hungarian}% \IfLanguageDefinedT{hungarian}{\adddialect\l@magyar\l@hungarian}% }% \def\captionshungarian{% \def\refname{Hivatkozások}% \def\abstractname{Kivonat}% \def\bibname{Irodalomjegyzék}% \def\prefacename{Előszó}% \def\chaptername{fejezet}% \def\appendixname{Függelék}% \def\contentsname{Tartalomjegyzék}% \def\listfigurename{Ábrák jegyzéke}% \def\listtablename{Táblázatok jegyzéke}% \def\indexname{Tárgymutató}% \def\figurename{ábra}% \def\tablename{táblázat}% %\def\thepart{}% \def\partname{rész}% \def\pagename{oldal}% \def\seename{lásd}% \def\alsoname{lásd még}% \def\enclname{Melléklet}% \def\ccname{Körlevél–címzettek}% \def\headtoname{Címzett}% \def\proofname{Bizonyítás}% \def\glossaryname{Szójegyzék}% } \def\datehungarian{% \def\today{% \number\year.\nobreakspace\ifcase\month\or január\or február\or március\or április\or május\or június\or július\or augusztus\or szeptember\or október\or november\or december\fi \space\number\day.}% \def\ondatehungarian{% \number\year.\nobreakspace\ifcase\month\or január\or február\or március\or április\or május\or június\or július\or augusztus\or szeptember\or október\or november\or december\fi \space\ifcase\day\or 1-jén\or 2-án\or 3-án\or 4-én\or 5-én\or 6-án\or 7-én\or 8-án\or 9-én\or 10-én\or 11-én\or 12-én\or 13-án\or 14-én\or 15-én\or 16-án\or 17-én\or 18-án\or 19-én\or 20-án\or 21-én\or 22-én\or 23-án\or 24-én\or 25-én\or 26-án\or 27-én\or 28-án\or 29-én\or 30-án\or 31-én\fi}% \let\ontoday\ondatehungarian% \let\ondatemagyar\ondatehungarian% } % Save original capsformats \let\xpg@save@fnum@table\fnum@table \let\xpg@save@fnum@figure\fnum@figure \def\hungarian@capsformat{% % % Change captions \if@hungarian@swapcaptions % change 'ábra x.x' to 'x.x. ábra' \def\fnum@figure{\thefigure.~\figurename} % % change 'táblázat x.x' to 'x.x. táblázat' \def\fnum@table{\thetable.~\tablename} \fi % % change chapter and part headings \if@hungarian@swapheadings % With titlesec \@ifundefined{titleformat}{% % With KOMA \@ifundefined{sectionformat}{% % Memoir? \@ifundefined{@memptsize}{% % With standard classes \@ifundefined{@makechapterhead}{}{% \let\xpg@save@chap@format\@makechapterhead% \patchcmd{\@makechapterhead}% {\@chapapp\space \thechapter}% {\thechapter.\space \@chapapp}% {}% {\xpg@warning{Failed to patch chapter for Hungarian}}% }% \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}% {\partname\nobreakspace\thepart}% {\thepart.\nobreakspace\partname}% {}% {\@ifundefined{part}{}{\xpg@warning{Failed to patch part for Hungarian}}}% }% (end \ifdefined\@part) }{% Hyperref (nameref) \let\xpg@save@part@format\NR@part% \patchcmd{\NR@part}% {\partname\nobreakspace\thepart}% {\thepart.\nobreakspace\partname}% {}% {\xpg@warning{Failed to patch part for Hungarian}}% }% (end not hyperref) }{% with memoir (\ifdefined\@memptsize) \@ifundefined{@makechapterhead}{}{% \let\xpg@save@chap@format\@makechapterhead% \patchcmd{\@makechapterhead}{\printchaptername \chapternamenum \printchapternum}% {\printchapternum.\chapternamenum\printchaptername}% {}% {\xpg@warning{Failed to patch chapter for Hungarian}}% }% \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}{\printpartname \partnamenum \printpartnum}% {\printpartnum.\partnamenum\printpartname}% {}% {\xpg@warning{Failed to patch part for Hungarian}}% }% }{% Hyperref (nameref) \let\xpg@save@part@format\NR@part% \patchcmd{\NR@part}{\printpartname \partnamenum \printpartnum}% {\printpartnum.\partnamenum\printpartname}% {}% {\xpg@warning{Failed to patch part for Hungarian}}% }% }% (end \ifdefined\@memptsize) }{% (\ifdefined\sectionformat) \@ifundefined{partformat}{}{% \let\xpg@save@part@format\partformat% \renewcommand{\partformat}{\thepart.~\partname}% }% \@ifundefined{chapterformat}{}{% \let\xpg@save@chap@format\chapterformat% \renewcommand{\chapterformat}{\mbox{\thechapter\autodot% \IfUsePrefixLine{\nobreakspace\chapapp}{\enskip}}}% }% }% (end \ifdefined\sectionformat) }{% (\ifdefined\titleformat) \@ifundefined{NR@part}{% not hyperref \@ifundefined{@part}{}{% \let\xpg@save@part@format\@part% \patchcmd{\@part}% {\partname\nobreakspace\thepart}% {\thepart.\nobreakspace\partname}% {}% {\xpg@warning{Failed to patch part for Hungarian}}% }% }{% Hyperref (nameref) \let\xpg@save@part@format\NR@part% \patchcmd{\NR@part}% {\partname\nobreakspace\thepart}% {\thepart.\nobreakspace\partname}% {}% {\xpg@warning{Failed to patch part for Hungarian}}% }% \@ifundefined{chapter}{}{% \titleformat\chapter[display]% {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6} {\thechapter.\space\@chapapp}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit} }% }% (end \ifdefined\titleformat) \fi% (end \if@hungarian@swapheadings) % % Change running headers \if@hungarian@swapheaders \@ifundefined{chapterformat}{% \@ifundefined{@memptsize}{% % With standard classes \@ifundefined{chaptermark}{}{% \ifpatchable{\chaptermark}% {\@chapapp\ \thechapter.}% {\let\xpg@save@chaptermark@format\chaptermark% \patchcmd{\chaptermark}% {\@chapapp\ \thechapter.}% {\thechapter.\ \@chapapp\@hungarian@forced@dot}% {}% {\xpg@warning{Failed to patch chaptermark for Hungarian}}}% {}% }% (end \ifdefined\chaptermark) }{% (\ifdefined\@memptsize) % With memoir \let\xpg@save@chaptermark@format\chaptermark% \renewcommand*\chaptermark[1]{% \markboth{\memUChead{% \ifnum \c@secnumdepth >\m@ne \ifbool{@mainmatter}{% \thechapter.\ \@chapapp\@hungarian@forced@dot\ % }{}% \fi ##1}}{}}% }% (end \ifdefined\@memptsize) }{% (\ifdefined\chapterformat) % With KOMA \let\xpg@save@chaptermark@format\chaptermarkformat% \renewcommand*\chaptermarkformat{% \thechapter\autodot\ \IfChapterUsesPrefixLine{\chapapp\@hungarian@forced@dot\enskip}{}} }% (end \ifdefined\chapterformat) \fi% (end \if@hungarian@swapheaders) } \def\nohungarian@capsformat{% % % Reset changes of \hungarian@capsformat \let\fnum@table\xpg@save@fnum@table% \let\fnum@figure\xpg@save@fnum@figure% % % Reset chapter and part heading \@ifundefined{titleformat}{% \@ifundefined{sectionformat}{% % With memoir and standard classes \@ifundefined{xpg@save@part@format}{}{% \@ifundefined{NR@part}{% \let\@part\xpg@save@part@format% }{% \let\NR@part\xpg@save@part@format% }% }% \@ifundefined{xpg@save@chap@format}{}{% \let\@makechapterhead\xpg@save@chap@format }% }{% % With KOMA \@ifundefined{xpg@save@part@format}{}{% \let\partformat\xpg@save@part@format }% \@ifundefined{xpg@save@chap@format}{}{% \let\chapterformat\xpg@save@chap@format }% }% (end \ifdefined\sectionformat) }{% (\ifdefined\titleformat) % With titlesec \@ifundefined{xpg@save@part@format}{}{% \@ifundefined{NR@part}{% \let\@part\xpg@save@part@format% }{% \let\NR@part\xpg@save@part@format% }% }% \@ifundefined{chapter}{}{% \titleformat\chapter[display]% {\@ifundefined{ttl@fil}{\raggedright}{\ttl@fil}\ttl@fonts\ttl@sizes6} {\@chapapp\space\thechapter}{.8\baselineskip}{\ttl@sizes\z@\ttl@passexplicit} }% }% (end \ifdefined\titleformat) % % Reset headers \@ifundefined{chaptermarkformat}{% \@ifundefined{chaptermark}{}{% % With memoir and standard classes \@ifundefined{xpg@save@chaptermark@format}{}{% \let\chaptermark\xpg@save@chaptermark@format% }% }% (end \ifdefined\chaptermark) }{% % With KOMA \@ifundefined{xpg@save@chaptermark@format}{}{% \let\chaptermarkformat\xpg@save@chaptermark@format% }% }% (end \ifdefined\chaptermarkformat) } % Hungarian needs 1) trailing dots in chapter headings; 2) trailing dot in section, subsection, etc, counters \def\@hungarian@forced@dot{} \def\xpg@save@autodot{} \ifdef{\KOMAClassName}{% \providecommand*\autodot{}% \let\xpg@save@autodot\autodot% }{} % The following is based on some ideas from gloss-russian.ldf \def\hungarian@sectsformat{% \ifhungarian@forceheadingpunctuation% \ifdef{\KOMAClassName}{% \renewcommand*\autodot{.}% }{% \def\@seccntformat##1{\csname pre##1\endcsname% \csname the##1\endcsname% \csname post##1\endcsname}% \def\@aftersepkern{\hspace{0.5em}}% \def\postchapter{.\@aftersepkern}% \def\postsection{.\@aftersepkern}% \def\postsubsection{.\@aftersepkern}% \def\postsubsubsection{.\@aftersepkern}% \def\postparagraph{.\@aftersepkern}% \def\postsubparagraph{.\@aftersepkern}% \def\prechapter{}% \def\presection{}% \def\presubsection{}% \def\presubsubsection{}% \def\preparagraph{}% \def\presubparagraph{}% }% \def\@hungarian@forced@dot{.} \fi% } % \def\nohungarian@sectsformat{% \ifhungarian@forceheadingpunctuation% \ifdef{\KOMAClassName}{% \let\autodot\xpg@save@autodot% }{% \def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel }% \fi% \def\@hungarian@forced@dot{} } % \def\blockextras@hungarian{% \hungarian@capsformat% \hungarian@sectsformat% } % \def\noextras@hungarian{% \nohungarian@capsformat% \nohungarian@sectsformat% \let\ontoday\@undefined% } % \endinput