% \iffalse meta-comment
%
% Copyright (C) 1989-1994 by Johannes Braams
% All rights reserved.
% For additional copyright information see further down in this file.
% 
% This file is part of the Babel system, release 3.4 patchlevel 1
% ---------------------------------------------------------------
% 
% This file is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% 
% 
% IMPORTANT NOTICE:
% 
% For error reports in case of UNCHANGED versions see readme file.
% 
% Please do not request updates from me directly.  Distribution is
% done through Mail-Servers and TeX organizations.
% 
% You are not allowed to change this file.
% 
% You are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in manifest.txt.
% 
% If you receive only some of these files from someone, complain!
% 
% You are NOT ALLOWED to distribute this file alone.  You are NOT
% ALLOWED to take money for the distribution or use of either this
% file or a changed version, except for a nominal charge for copying
% etc.
% \fi
% \CheckSum{280}
%%% \iffalse ============================================================
%%%  @LaTeX-style-file{
%%%     author_1        = "Braams, J.L.",
%%%     author_2        = "Biro, A. ",
%%%     version         = "1.3b",
%%%     date            = "26 June 1994",
%%%     time            = "01:41:33 MET",
%%%     filename        = "magyar.doc",
%%%     address_1       = "PTT Research
%%%                        St. Paulusstraat 4
%%%                        2264 XZ Leidschendam
%%%                        The Netherlands",
%%%     telephone_1     = "(70) 3325051",
%%%     FAX_1           = "(70) 3326477",
%%%     checksum        = "39098 318 1509 12682",
%%%     email_1         = "J.L.Braams@research.ptt.nl (Internet)",
%%%     email_2         = "",
%%%     codetable       = "ISO/ASCII",
%%%     keywords        = "babel, hungarian",
%%%     supported       = "yes",
%%%     abstract        = "",
%%%     docstring       = "This file contains the hungarian language specific
%%%                        definitions for the babel system.",
%%%  }
%%%
%%%  ====================================================================
%%% \fi
% \def\filename{magyar.dtx}
% \def\fileversion{v1.3b}
% \def\filedate{1994/06/04}
%
% \iffalse
% Babel DOCUMENT-STYLE option for LaTeX version 2e
% Copyright (C) 1989 - 1994
%           by Johannes Braams, PTT Research Neher Laboratories
%              \'Arp\'ad B\'IR\'O
%
% Please report errors to: J.L. Braams <J.L.Braams@research.ptt.nl>
%                      or: \'Arp\'ad B\'IR\'O <JZP1104@HUSZEG11.bitnet>
%
%    This file is part of the babel system, it provides the source code for
%    the Hungarian language-specific file.
%    A contribution was made by Attila Koppanyi (attila@cernvm.cern.ch).
%<*filedriver>
\documentclass{ltxdoc}
\newcommand\TeXhax{\TeX hax}
\newcommand\babel{{\sf babel}}
\newcommand\ttbs{\char'134}
\newcommand\langvar{$\langle \it lang \rangle$}
\newcommand\note[1]{}
\newcommand\bsl{\protect\bslash}
\newcommand\Lopt[1]{{\sf #1}}
\newcommand\file[1]{{\tt #1}}
\begin{document}
 \DocInput{magyar.dtx}
\end{document}
%</filedriver>
%\fi
% \changes{magyar-1.0a}{15 july 91}{Renamed babel.sty in babel.com}
% \changes{magyar-1.1}{16 feb 92}{Brought up-to-date with babel 3.2a}
% \changes{magyar-1.1.4}{94/02/08}{Further spelling corrections}
% \changes{magyar-1.1.5}{94/02/09}{Still more spelling corrections}
% \changes{magyar-1.2}{1994/02/27}{Update for LaTeX2e}
% \changes{magyar-1.3c}{1994/06/26}{Removed the use of \cs{filedate}
%    and moved identification after the loading of babel.def}
%
%  \section{The Hungarian language}
%
%    The file option \file{\filename}\footnote{The file described in
%    this section has version number \fileversion\ and was last
%    revised on \filedate.  A contribution was made by Attila Koppanyi
%    ({\tt attila@cernvm.cern.ch}). Later updates and suggestions by
%    \'Arp\'ad B\'ir\'o ({\tt JZP1104@HUSZEG11.bitnet}), Istvan Hamecz
%    ({\tt hami@ursus.bke.hu)} and Horvath Dezso ({\tt
%    horvath@pisa.infn.it}).}  defines all the language-specific
%    macros for the Hungarian language.
%
% \DescribeMacro\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'.
%
% \StopEventually{}
%
%    As this file needs to be read only once, we check whether it was
%    read before. If it was, the command |\captionsmagyar| is already
%    defined, so we can stop processing. If this command is undefined
%    we proceed with the various definitions and first show the
%    current version of this file.
%
% \changes{magyar-1.0a}{15 july 91}{Added reset of catcode of @ before
%    {\tt\bsl endinput}.}
% \changes{magyar-1.0b}{29 okt 91}{Removed use of {\tt\bsl
%    @ifundefined}}
%    \begin{macrocode}
\ifx\undefined\captionsmagyar
\else
  \selectlanguage{magyar}
  \expandafter\endinput
\fi
%    \end{macrocode}
%
% \changes{magyar-1.0b}{29 okt 91}{Removed code to load {\tt
%    latexhax.com}}
%
% \begin{macro}{\atcatcode}
%    This file, \file{magyar.sty}, may have been read while \TeX\ is
%    in the middle of processing a document, so we have to make sure
%    the category code of {\tt @} is `letter' while this file is being
%    read.  We save the category code of the @-sign in |\atcatcode|
%    and make it `letter'. Later the category code can be restored to
%    whatever it was before.
%
% \changes{magyar-1.0a}{15 july 91}{Modified handling of catcode of @
%    again.}
% \changes{magyar-1.0b}{29 okt 91}{Removed use of {\tt\bsl
%    makeatletter} and hence the need to load {\tt latexhax.com}}
%    \begin{macrocode}
\chardef\atcatcode=\catcode`\@
\catcode`\@=11\relax
%    \end{macrocode}
% \end{macro}
%
%    Now we determine whether the the common macros from the file
%    \file{babel.def} need to be read. We can be in one of two
%    situations: either another language option has been read earlier
%    on, in which case that other option has already read
%    \file{babel.def}, or {\tt magyar} is the first language option to
%    be processed. In that case we need to read \file{babel.def} right
%    here before we continue.
%
% \changes{magyar-1.1}{16 feb 92}{Added {\tt\bsl relax} after the
%    argument of {\tt\bsl input}}
%    \begin{macrocode}
\ifx\undefined\babel@core@loaded\input babel.def\relax\fi
%    \end{macrocode}
%
%    Tell the \LaTeX\ system who we are and write an entry on the
%    transcript.
%    \begin{macrocode}
\ProvidesFile{magyar.sty}[1994/06/26 v1.3c
         Magyar support from the babel system]
%    \end{macrocode}
%
%    Another check that has to be made, is if another language
%    specific file has been read already. In that case its definitions
%    have been activated. This might interfere with definitions this
%    file tries to make. Therefore we make sure that we cancel any
%    special definitions. This can be done by checking the existence
%    of the macro |\originalTeX|. If it exists we simply execute it,
%    otherwise it is |\let| to |\empty|.
% \changes{magyar-1.0a}{15 july 91}{Added {\tt\bsl let\bsl
%    originalTeX% \bsl relax} to test for existence}
% \changes{magyar-1.1}{16 feb 92}{{\tt\bsl originalTeX} should be
%    expandable, {\tt\bsl let} it to {\tt\bsl empty}}
%    \begin{macrocode}
\ifx\undefined\originalTeX \let\originalTeX\empty \else\originalTeX\fi
%    \end{macrocode}
%
%    When this file is read as an option, i.e. by the |\usepackage|
%    command, {\tt magyar} will be an `unknown' language in which case
%    we have to make it known.  So we check for the existence of
%    |\l@magyar| to see whether we have to do something here.
%
% \changes{magyar-1.0b}{29 okt 91}{Removed use of {\tt\bsl
%    @ifundefined}}
% \changes{magyar-1.1}{16 feb 92}{Added a warning when no hyphenation
%    patterns were loaded.}
% \changes{magyar-1.3c}{1994/06/26}{Now use \cs{@nopatterns} to
%    produce the warning}
%    \begin{macrocode}
\ifx\undefined\l@magyar
    \@nopatterns{Magyar}
    \adddialect\l@magyar0\fi
%    \end{macrocode}
%
%    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\'esz'
%    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.
%
% \begin{macro}{\captionsmagyar}
%    The macro |\captionsmagyar| defines all strings used in the four
%    standard documentclasses provided with \LaTeX.
% \changes{magyar-1.1}{16 feb 92}{Added {\tt\bsl seename}, {\tt\bsl
%    alsoname} and {\tt\bsl prefacename}}
% \changes{magyar-1.1}{15 jul 93}{`headpagename should be `pagename}
% \changes{magyar-1.1.3}{05 jan 94}{Added translations, fixed typos}
%    \begin{macrocode}
\addto\captionsmagyar{%
  \def\prefacename{El\H osz\'o}%
  \def\refname{Referenci\'ak}%
  \def\abstractname{Kivonat}%
  \def\bibname{Bibliogr\'afia}%
  \def\chaptername{fejezet}%
  \def\appendixname{f\"uggel\'ek}%
  \def\contentsname{Tartalom}%
  \def\listfigurename{\'Abr\'ak jegyz\'eke}%
  \def\listtablename{T\'abl\'azatok jegyz\'eke}%
  \def\indexname{T\'argymutat\'o}%
  \def\figurename{\'abra}%
  \def\tablename{t\'abl\'azat}%
  \def\partname{r\'esz}%
  \def\enclname{Mell\'eklet}%
  \def\ccname{K\"orlev\'el--c\'\i mzettek}%
  \def\headtoname{C\'\i mzett}%
  \def\pagename{oldal}%
  \def\seename{L\'asd}%
  \def\alsoname{L\'asd m\'eg}}%
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\datemagyar}
%    The macro |\datemagyar| redefines the command |\today| to produce
%    Hungarian dates.
% \changes{magyar-1.1.4}{94/02/08}{Rewritten to produce the correct
%                                  date format}
%    \begin{macrocode}
\def\datemagyar{%
  \def\today{\number\year.~\ifcase\month\or
  janu\'ar\or febru\'ar\or m\'arcius\or
  \'aprilis\or m\'ajus\or j\'unius\or
  j\'ulius\or augusztus\or szeptember\or
  okt\'ober\or november\or december\fi
    \space\ifcase\day\or
    1.\or  2.\or  3.\or  4.\or  5.\or
    6.\or  7.\or  8.\or  9.\or 10.\or
   11.\or 12.\or 13.\or 14.\or 15.\or
   16.\or 17.\or 18.\or 19.\or 20.\or
   21.\or 22.\or 23.\or 24.\or 25.\or
   26.\or 27.\or 28.\or 29.\or 30.\or
   31.\fi}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ondatemagyar}
%    The macro |\ondatemagyar| produces Hungarian dates which have the
%    meaning `{\em on this day}'.  It does not redefine the command
%    |\today|.
% \changes{magyar-1.1.3}{05 jan 94}{The date number should not be
%    followed by a dot.}
% \changes{magyar-1.1.4}{94/02/08}{Renamed from `datemagyar; nolonger
%    redefines `today.}
%    \begin{macrocode}
\def\ondatemagyar{%
  \number\year.~\ifcase\month\or
  janu\'ar\or febru\'ar\or m\'arcius\or
  \'aprilis\or m\'ajus\or j\'unius\or
  j\'ulius\or augusztus\or szeptember\or
  okt\'ober\or november\or december\fi
    \space\ifcase\day\or
    1-j\'en\or  2-\'an\or  3-\'an\or  4-\'en\or  5-\'en\or
    6-\'an\or  7-\'en\or  8-\'an\or  9-\'en\or 10-\'en\or
   11-\'en\or 12-\'en\or 13-\'an\or 14-\'en\or 15-\'en\or
   16-\'an\or 17-\'en\or 18-\'an\or 19-\'en\or 20-\'an\or
   21-\'en\or 22-\'en\or 23-\'an\or 24-\'en\or 25-\'en\or
   26-\'an\or 27-\'en\or 28-\'an\or 29-\'en\or 30-\'an\or
   31-\'en\fi}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\extrasmagyar}
% \begin{macro}{\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.
%
%    \begin{macrocode}
\addto\extrasmagyar{\let\ontoday\ondatemagyar}
\addto\noextrasmagyar{\let\ontoday\undefined}
%    \end{macrocode}
% \end{macro}
% \end{macro}
%
%    Our last action is to activate the commands we have just defined,
%    by calling the macro |\selectlanguage|.
%    \begin{macrocode}
\selectlanguage{magyar}
%    \end{macrocode}
%    Finally, the category code of {\tt @} is reset to its original
%    value. The macrospace used by |\atcatcode| is freed.
% \changes{magyar-1.0a}{15 july 91}{Modified handling of catcode of @-sign.}
%    \begin{macrocode}
\catcode`\@=\atcatcode \let\atcatcode\relax
%    \end{macrocode}
%
% \Finale
%%
%% \CharacterTable
%%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%%   Digits        \0\1\2\3\4\5\6\7\8\9
%%   Exclamation   \!     Double quote  \"     Hash (number) \#
%%   Dollar        \$     Percent       \%     Ampersand     \&
%%   Acute accent  \'     Left paren    \(     Right paren   \)
%%   Asterisk      \*     Plus          \+     Comma         \,
%%   Minus         \-     Point         \.     Solidus       \/
%%   Colon         \:     Semicolon     \;     Less than     \<
%%   Equals        \=     Greater than  \>     Question mark \?
%%   Commercial at \@     Left bracket  \[     Backslash     \\
%%   Right bracket \]     Circumflex    \^     Underscore    \_
%%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%%   Right brace   \}     Tilde         \~}
%%
\endinput
