1 The Hungarian language

The file option magyar.dtx^{1} defines all the language definition macros for the Hungarian language.

\ontoday For this language currently the only special definition that is added is the \ontoday command which works like \today but produces a slightly different date format used in expressions suh as ‘on february 10th’.

The macro \LdfInit takes care of preventing that this file is loaded more than once, checking the category code of the @ sign, etc.

1 ⟨∗code⟩

 2 \LdfInit{magyar}{caption\CurrentOption}

When this file is read as an option, i.e. by the \usepackage command, magyar will be an ‘unknown’ language in which case we have to make it known. So we check for the existence of \l@magyar or \l@hungarian to see whether we have to do something here.

 3 \ifx\l@magyar\@undefined
 4 \ifx\l@hungarian\@undefined
 5  \@nopatterns{Magyar}
 6  \adddialect\l@magyar0
 7 \fi
 8 \fi
 9 \let\l@hungarian\l@magyar

An additional note about formatting Hungarian texts: One should invert the order of the number and text in things like chapter headings, page references etc. So one should write ‘I. rész’ instead of ‘Part I’, or ‘3. oldal’ for ‘page 3’.

For chapter headings this could be accomplished by a redefinition of the

macros \@makechapterhead and \@makeschapterhead, for other instances this

a lot harder to accomplish. Therefore I think complete document classes should be written to accomadate the needed formatting.

The next step consists of defining commands to switch to (and from) the Hungarian language.

\captionsmagyar The macro \captionsmagyar defines all strings used in the four standard documentclasses provided with L^{A}TEX.

10 \@namedef{captions\CurrentOption}{%
11 \def\prefacename{El\H osz\'o}%

For the list of references at the end of an article we have a choice between two words, ‘Referenciák’ (a Hungarian version of the English word) and ‘Hivatkozások’. The latter seems to be in more widespread use.

12 \def\refname{Hivatkoz\'asok}%

If you have a document with a summary instead of an abstract you might want to replace the word ‘Kivonat’ with ‘Összefoglaló’.

13 \def\abstractname{Kivonat}%

1The file described in this section has version number v1.3h and was last revised on 1996/12/23. A contribution was made by Attila Koppanyi (attila@cernvm.cern.ch).

Later updates and suggestions by Árpád Bíró (JZP1104@HUSZEG11.bitnet), Istvan Hamecz (hami@ursus.bke.hu) and Horvath Dezso (horvath@pisa.infn.it).

The Hungarian version of ‘Bibliography’ is ‘Bibliográfia’, but a more natural word to use is ‘Irodalomjegyzék’.

14 \def\bibname{Irodalomjegyz\'ek}%
15 \def\chaptername{Fejezet}%
16 \def\appendixname{F\"uggel\'ek}%
17 \def\contentsname{Tartalomjegyz\'ek}%
18 \def\listfigurename{\'Abr\'ak jegyz\'eke}%
19 \def\listtablename{T\'abl\'azatok jegyz\'eke}%
20 \def\indexname{T\'argymutat\'o}%
21 \def\figurename{\'abra}%
22 \def\tablename{T\'abl\'azat}%
23 \def\partname{R\'esz}%
24 \def\enclname{Mell\'eklet}%
25 \def\ccname{K\"orlev\'el--c\'\i mzettek}%
26 \def\headtoname{C\'\i mzett}%
27 \def\pagename{oldal}%
28 \def\seename{L\'asd}%
29 \def\alsoname{L\'asd m\'eg}%

Besides the Hungarian word for Proof, ‘Bizonyítás’ we can also name Corollary (Következmény), Theorem (Tétel) and Lemma (Lemma).

30 \def\proofname{Bizony\'\i t\'as}%
31 }%

\datemagyar The macro \datemagyar redefines the command \today to produce Hungarian dates.

32 \@namedef{date\CurrentOption}{%
33 \def\today{\number\year.~\ifcase\month\or
34 janu\'ar\or febru\'ar\or m\'arcius\or
35 \'aprilis\or m\'ajus\or j\'unius\or
36 j\'ulius\or augusztus\or szeptember\or
37 okt\'ober\or november\or december\fi
38  \space\ifcase\day\or
39  1.\or  2.\or  3.\or  4.\or  5.\or
40  6.\or  7.\or  8.\or  9.\or 10.\or
41 11.\or 12.\or 13.\or 14.\or 15.\or
42 16.\or 17.\or 18.\or 19.\or 20.\or
43 21.\or 22.\or 23.\or 24.\or 25.\or
44 26.\or 27.\or 28.\or 29.\or 30.\or
45 31.\fi}}

\ondatemagyar The macro \ondatemagyar produces Hungarian dates which have the meaning ‘on this day’. It does not redefine the command \today.

46 \@namedef{ondate\CurrentOption}{%
47 \number\year.~\ifcase\month\or
48 janu\'ar\or febru\'ar\or m\'arcius\or
49 \'aprilis\or m\'ajus\or j\'unius\or
50 j\'ulius\or augusztus\or szeptember\or
51 okt\'ober\or november\or december\fi
52  \space\ifcase\day\or
53  1-j\'en\or  2-\'an\or  3-\'an\or  4-\'en\or  5-\'en\or
54  6-\'an\or  7-\'en\or  8-\'an\or  9-\'en\or 10-\'en\or
55 11-\'en\or 12-\'en\or 13-\'an\or 14-\'en\or 15-\'en\or
56 16-\'an\or 17-\'en\or 18-\'an\or 19-\'en\or 20-\'an\or

57 21-\'en\or 22-\'en\or 23-\'an\or 24-\'en\or 25-\'en\or
58 26-\'an\or 27-\'en\or 28-\'an\or 29-\'en\or 30-\'an\or
59 31-\'en\fi}

\extrasmagyar \noextrasmagyar The macro \extrasmagyar will perform all the extra definitions needed for the Hungarian language. The macro \noextrasmagyar is used to cancel the actions of \extrasmagyar. For the moment these macros are nearly empty; only the user command \ontoday to access \ondatemagyar is defined.

60 \@namedef{extras\CurrentOption}{%
61 \expandafter\let\expandafter\ontoday
62  \csname ondate\CurrentOption\endcsname}
63 \@namedef{noextras\CurrentOption}{\let\ontoday\@undefined}

The macro \ldf@finish takes care of looking for a configuration file, setting the main language to be switched on at \begin{document} and resetting the category code of @ to its original value.

64 \ldf@finish\CurrentOption

65 ⟨/code⟩