summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel-hungarian
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-09-01 01:32:46 +0000
committerKarl Berry <karl@freefriends.org>2017-09-01 01:32:46 +0000
commit808038ac2598fefffddf21d148841a7630040c0f (patch)
treebc783762d871a2e4f68b822e6d77af0bb9c29bfa /Master/texmf-dist/tex/generic/babel-hungarian
parent24b60599fe0fe2a672e102d295ab16b874bca2fd (diff)
babel-hungarian (31aug17)
git-svn-id: svn://tug.org/texlive/trunk@45186 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-hungarian')
-rw-r--r--Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf270
1 files changed, 176 insertions, 94 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf b/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf
index 06c3961045b..4c9cf0c3a52 100644
--- a/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf
+++ b/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf
@@ -1,3 +1,4 @@
+% -*- coding: iso-8859-2 -*-
%
% magyar.ldf -- LaTeX Language Definition for `magyar' (Hungarian), v1.5c
% written and copyright (C) by P\'eter SZAB\'O <pts@fazekas.hu>
@@ -81,7 +82,7 @@
%\ProvidesFile{magyar.ldf}[1996/12/23 v1.3h Magyar support from the babel system]
%\ProvidesLanguage{magyar}[2001/03/05 v1.4c Magyar support from the babel system]
% vvv for Babel v3.7
-\expandafter\ProvidesLanguage\expandafter{\CurrentOption}[2015/11/24 v1.5c Magyar support from the babel v3.7 system]
+\expandafter\ProvidesLanguage\expandafter{\CurrentOption}[2017/08/30 v1.5c Magyar support from the babel v3.7 system]
% Possibly do \endinput if .ldf already loaded
\expandafter\LdfInit\expandafter{\CurrentOption}{captions\CurrentOption}%
@@ -117,7 +118,7 @@
% 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}
@@ -258,8 +259,9 @@
\magyar@opt@ntheoremfix@@yes
\magyar@opt@openqq@@maybedown
\magyar@opt@partnumber@@unchanged
- \magyar@opt@postpara{}{unchanged}%
- \magyar@opt@postsubpara{}{unchanged}%
+ \magyar@opt@postdescription{postdescription}{unchanged}%
+ \magyar@opt@postpara{postpara}{unchanged}%
+ \magyar@opt@postsubpara{postsubpara}{unchanged}%
\magyar@opt@refstruc{refstruc}{weak}%
\magyar@opt@sectiondot@@safe
\magyar@opt@shorthandcs{shorthandcs}{\shu}%
@@ -330,8 +332,9 @@
\magyar@opt@ntheoremfix@@yes% OK
\magyar@opt@openqq@@maybedown% OK
\magyar@opt@partnumber@@unchanged% OK
- \magyar@opt@postpara{}{unchanged}% OK
- \magyar@opt@postsubpara{}{unchanged}% OK
+ \magyar@opt@postdescription{postdescription}{unchanged}% OK
+ \magyar@opt@postpara{postpara}{unchanged}% OK
+ \magyar@opt@postsubpara{postsubpara}{unchanged}% OK
\magyar@opt@refstruc{refstruc}{no}% OK
\magyar@opt@sectiondot@@safe% we don't want =problematic
\magyar@opt@shorthandcs{shorthandcs}{none}% OK
@@ -395,8 +398,9 @@
\magyar@opt@ntheoremfix@@unchanged
\magyar@opt@openqq@@unchanged
\magyar@opt@partnumber@@unchanged
- \magyar@opt@postpara{}{unchanged}%
- \magyar@opt@postsubpara{}{unchanged}%
+ \magyar@opt@postdescription{postdescription}{unchanged}%
+ \magyar@opt@postpara{postpara}{unchanged}%
+ \magyar@opt@postsubpara{postsubpara}{unchanged}%
\magyar@opt@refstruc{refstruc}{no}%
\magyar@opt@sectiondot@@none
\magyar@opt@shorthandcs{shorthandcs}{none}%
@@ -462,9 +466,9 @@
\magyar@opt@ntheoremfix@@yes
\magyar@opt@openqq@@maybedown
\magyar@opt@partnumber@@Huordinal
- \magyar@opt@postdescription{}{dot}%
- \magyar@opt@postpara{}{diamond}%
- \magyar@opt@postsubpara{}{star}%
+ \magyar@opt@postdescription{postdescription}{dot}%
+ \magyar@opt@postpara{postpara}{diamond}%
+ \magyar@opt@postsubpara{postsubpara}{star}%
\magyar@opt@refstruc{refstruc}{yes}%
\magyar@opt@sectiondot@@safe
\magyar@opt@shorthandcs{shorthandcs}{\shu}%
@@ -514,14 +518,13 @@
labelenums=hu-d,
labelitems=hu,
longcaption=centered,
- mathbrk=define,
mathbrk=fix,
mathfactorial=define,
mathhucomma=fix,
mathreal=weak,
mond=weak,
ntheoremfix=yes,
- openqq=maybedown,
+ openqq=maybedown, % Not: openqq=unchanged
postdescription=dot,
postpara=diamond,
postsubpara=star,
@@ -542,9 +545,7 @@
%** Matches Hungarian typographic rules most closely -- and most
%** simplistically (minimally).
\dMf magyar@opt@defaults@@hu-min {%
- %\csname magyar@opt@defaults@@over-1.4\endcsname
- \csname magyar@opt@defaults@@safest\endcsname
- % Dat: no openqq=unchanged (!)
+ \magyar@opt@defaults@@safest
\expandafter\magyar@doopt\magyar@@humin@options\hfuzz,%
}
@@ -822,17 +823,14 @@
\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
+\def\magyar@paragraphopt#1#2{%
+ \ifx#2\magyar@@unchanged\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
+\let\magyar@opt@postdescription\magyar@paragraphopt
+\let\magyar@opt@postpara\magyar@paragraphopt
+\let\magyar@opt@postsubpara\magyar@paragraphopt
% --- Option processing code of \magyarOptions
%
@@ -904,7 +902,7 @@
\ifx#1\hfuzz\else
%%\typeout{(#1#2)=(#3)}%
% vvv wastes some heap (\csname), but never mind
- \fi
+ \fi
}
@@ -1188,7 +1186,7 @@
%** @param #1 tokens, will be \edef\vfuzz'ed
\def\@@magyar@az@vfuzzedef#1{%
\begingroup
- \@safe@activestrue% allow active `:' inside labels;
+ \@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??)
@@ -1202,10 +1200,20 @@
\def\accent ##1 ##2{##2}%
\def\add@accent ##1##2{##2}%
\def\@text@composite@x ##1##2{##2}%
- \def\i{i}\def\j{j}%
+ % TODO(pts): Add more from t1enc.def
+ %\let\`\@empty \let\'\@empty \let\^\@empty \let\~\@empty \let\"\@empty
+ %\let\H\@empty \let\r\@empty \let\v\@empty \let\u\@empty \let\=\@empty
+ %\let\.\@empty
+ \def\DH{DH}\def\DJ{DJ}\def\NG{NG}\def\O{O}\def\SS{S}\def\TH{TH}\def\IJ{IJ}%
+ \def\dh{dh}\def\dj{dj}\def\o{o}\def\ng{ng}\def\l{l}%
+ \def\th{th}\def\i{i}\def\j{j}\def\ij{ij}%
\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 \.
+ \def\ss{s}\def\L{L}\def\i{i}\def\j{j}%
+ \def\d{}\def\b{}\def\c{}\def\t{}%
+ %
+ \def\IeC{}% \usepackage[utf8]{inputenc} generates \IeC{\'a}.
+ \def\ { }%
+ %
% 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??)
@@ -1230,21 +1238,30 @@
%** Usage: \az{alma} -> `az alma'; \Az*{alma} -> `az'
%** Usage: \az+\ref{foo} is equivalent to \az{\ref{foo}}
+%** TODO(pts): fix \aref{l5} if the body of l5 is empty.
\def\@@magyar@az@lowt{\@ifstar{\@@magyar@az@lowy}{\@ifnextchar+\@@magyar@az@lowz\@@magyar@az@lowx}}
+%** #1 is +.
\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{{%
+\def\@@magyar@az@lowx#1{\@@magyar@az@lowy{#1}~\ignorespaces#1}
+\def\@@magyar@az@lowy#1{%
+ \begingroup
\begingroup
%\def\protect{\noexpand\protect\noexpand}%
- \set@display@protect% screws up \r
+ % TODO(pts): Is \set@display@protect called in other invocations of
+ % \@@magyar@az@vfuzzedef, such as \aref or \az+\ref? Make it
+ % consistent.
+ % latex.ltx: \let\@typeset@protect\relax
+ % latex.ltx: \def\set@display@protect{\let\protect\string}
+ % latex.ltx: \def\set@typeset@protect{\let\protect\@typeset@protect}
+ \set@display@protect% \let\protect\string; 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$%
-}}
+ \endgroup
+}
\def\@@magyar@firstarg#1#2\hbox${#1}%
@@ -1315,17 +1332,17 @@
\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#1F\ifcat a\noexpand#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#1L\ifcat a\if\noexpand#2Y\expandafter\noexpand#3\else\expandafter\noexpand#2\fi\else z\fi
+ \else\if\noexpand#1M\ifcat a\noexpand#2\else z\fi
+ \else\if\noexpand#1N\ifcat a\if\noexpand#2Y\expandafter\noexpand#3\else\expandafter\noexpand#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#1S\ifcat a\if\noexpand#2Z\expandafter\noexpand#3\else\expandafter\noexpand#2\fi\else z\fi
+ \else\if\noexpand#1R\ifcat a\noexpand#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
+ \else\if\noexpand#1X\ifcat a\noexpand#2\else z\fi
+ \else\if\noexpand#1Y\ifcat a\noexpand#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${%
@@ -1352,7 +1369,7 @@
\@gobble\iftrue
\def\@@magyar@azrb@stop#1#2\fi{#1}%
-%** Strips spaces and braces automatically
+%** Strips spaces and braces, up to \hfuzz.
%** @expands to `z' or nothing (last char of definite article)
%** @example \message{R:\removebraces {{foo}{{}{b}{{{{a\fi}}}}r}}\hfuzz;}
\def\@@magyar@azrb#1{%
@@ -1371,6 +1388,44 @@
\fi
}
+% Expandable macro which removes single-letter control sequences, converts
+% multiletter control sequences to dots, and keeps letters, and converts
+% everything else (i.e. non-letter, non-control sequence tokens) to `other'.
+%
+% Usage: \@@magyar@azro...\hfuzz, where ... doesn't contain braces, spaces
+% or \hfuzz.
+%
+% Wizardry: this uses the following tricks:
+%
+% \expandafter\@gobble\if...\fi\@@selfcontinue trick.
+%
+% % Tests that #1 is a control sequence token, provided it's a single, non-space, non-brace token.
+% \def\testcs#1{\ifcat a\expandafter\@gobble\string#1aNO\else CS\fi}
+%
+% % Tests that #1 is a control sequence token of 1 character, provided it's a single control sequence token.
+% \def\testcso#1{\ifcat a\expandafter\@gobbletwo\string#1\@empty aCSO\else NO\fi}
+%
+% % Tests that #1 is other character, provided it's a single, non-space, non-brace token.
+% \def\testother#1{\ifcat\string*\noexpand#1OTHER\else NO\fi}
+\def\@@magyar@azro#1{%
+ \ifx#1\hfuzz\expandafter\@gobble% Stop at \hfuzz.
+ \else\ifcat a\expandafter\@gobble\string#1a% Not a control sequence.
+ \ifcat a\noexpand#1\else\expandafter\string\fi#1% Keep letters, convert everything else with \string.
+ \else\ifcat a\expandafter\@gobbletwo\string#1\@empty a% Single-character control sequence, e.g. \/, \', \H, \ , remove it.
+ \else.% Replace multiletter control sequence with a dot.
+ \fi\fi\fi\@@magyar@azro}
+
+% Expandable macro which converts outermost spaces to dots, and occasionally
+% removes some layers of braces. It also adds an extra dot (as a side
+% effect).
+%
+% Usage: `\\@magyar@azrs...\hfuzz ', where ... argument doesn't contain
+% \if..., \else and \fi tokens.
+\def\@@magyar@azrs#1 {%
+ \ifx\hfuzz#1\expandafter\@gobble% Stop at \hfuzz.
+ \else#1.%
+ \fi\@@magyar@azrs}%
+
%** @param #1 might not be \cs -- and isn't empty
\def\@@magyar@aznospace@short#1{%
\if5\noexpand#1z% Dat: emit `az 5'
@@ -1382,14 +1437,10 @@
\@@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\ifcat\string*\noexpand#1% puncuation in the beginning, such as `(' in `(5)'
+ \@@magyar@swaprelax\@@magyar@aznospace % ignore punctuation
\else
- \@@magyar@swaprelax{\@@magyar@azuc@pre#1}% safe to call, no \cs
+ \@@magyar@swaprelax{\@@magyar@azuc@pre#1}%
\fi\fi\fi\fi\fi\relax
}
@@ -1399,7 +1450,10 @@
%** 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}%
+ % We use \@firstofone to strip a leading space.
+ \edef\reserved@a{\expandafter\@@magyar@azrs\@firstofone#1 \hfuzz\@gobble{} }%
+ \edef\reserved@a{\expandafter\@@magyar@azrb\reserved@a\hfuzz}%
+ \edef\reserved@a{\expandafter\@@magyar@azro\reserved@a\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
@@ -1582,7 +1636,7 @@
\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
+ % 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}%
@@ -1982,9 +2036,18 @@
% --- postpara= and postsubpara= and postdescription=
-\expandafter\ifx\csname magyar@opt@@paragraphs\endcsname\relax\@@magyar@skiplong\fi
+%\show\magyar@opt@@postpara
+%\show\magyar@@unchanged
+\let\magyar@opt@override@paragraphs\@empty
+ \ifx\magyar@opt@@postpara\magyar@@unchanged
+ \ifx\magyar@opt@@postsubpara\magyar@@unchanged
+ \ifx\magyar@opt@@postdescription\magyar@@unchanged
+ \let\magyar@opt@override@paragraphs\@undefined
+ \fi\fi\fi
+\expandafter\ifx\csname magyar@opt@override@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@dot{.\enskip}% \bfseries is the default, same as =bfdot
+ \def\magyar@post@mddot{\textmd.\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
@@ -2065,28 +2128,31 @@
}%
\fi\fi\fi
}
- % !! Imp: change Hungarian \paragraphs only, with dual load
- \expandafter\ifx\csname magyar@opt@@postpara\endcsname\relax\else
- \magyar@paragraphfix\paragraph
+ % !! Imp: change Hungarian \paragraph()s only, with dual load
+ \ifx\magyar@opt@@postpara\magyar@@unchanged\else
\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}%
+ \else
+ \magyar@paragraphfix\paragraph
\fi
\fi
- \expandafter\ifx\csname magyar@opt@@postsubpara\endcsname\relax\else
- \magyar@paragraphfix\subparagraph
+ \ifx\magyar@opt@@postsubpara\magyar@@unchanged\else
\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}%
+ \else
+ \magyar@paragraphfix\subparagraph
\fi
\fi
- \expandafter\ifx\csname magyar@opt@@postdescription\endcsname\relax\else
+ \ifx\magyar@opt@@postdescription\magyar@@unchanged\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}%
+ \else
+ \def\magyar@@descriptionfont{\normalfont\bfseries}%
+ \def\descriptionlabel#1{\hskip\labelsep{\magyar@@descriptionfont#1}\magyar@post@description\hskip-\labelsep}%
\fi
- \def\magyar@@descriptionfont{\normalfont\bfseries}%
- \def\descriptionlabel#1{\hskip\labelsep{\magyar@@descriptionfont#1}\magyar@post@description\hskip-\labelsep}%
\fi
\@gobble
{^}%
@@ -2222,7 +2288,7 @@
% [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
+ % 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
@@ -2675,7 +2741,7 @@
%** Call \@@magyar@shorthand@... For example: {`tty} and
%** {\@@magyar@shorthand tty} are interchangeable.
-%** @param #1 a char token.
+%** @param #1 a char token.
\def\@@magyar@shorthand#1{%
\expandafter\ifx\csname @@magyar@shorthand@\string#1\endcsname\relax
\@@magyar@error{Unknown shorthand: \string#1 }%
@@ -2693,7 +2759,7 @@
\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
+ % 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
@@ -3789,7 +3855,7 @@
%** @param #1 \ref id or with \told
%** (@param #2 1 to prefix with 1\ref{...}.~' in Hungarian order)
%** @example \refstruc{sec:foo}
-%** @example \refstruc{sec:foo+as+an}
+%** @example \refstruc{sec:foo+as+an}
%** May not touch \reserved@a
\def\@@magyar@refstruc@name#1{%
\begingroup
@@ -4045,7 +4111,7 @@
%** @example A mai dátum: [\emitdate{b}{\today}].
%** @example [\emitdate[e]{g}{1848.15.3}] a nap, mikor elhangzott a Nemzeti dal.
%** @example [\emitdate{b}{1956-10-23}]
-%** @example \told{\@@magyar@date@g{1848}{3}{115}}+a{}
+%** @example \told{\@@magyar@date@g{1848}{3}{115}}+a{}
%** @param SUFFIX any suffix for \told, e.g `e' or `adik+an'
%** @param DATE date in any format, will be expanded
%** @param FMT a single letter, specifies the format of the emitted date
@@ -4174,7 +4240,7 @@
% the very first run. Fine.
\reserved@a
}%\endgroup
- }
+ }
\let\magyar@fo@resetzero\relax
@@ -4291,7 +4357,7 @@
% till \shipout.
% (4) Put a \footnoterule (1/3\textwidth or 1/4\textwidth) if footnote is
% continued from previous page.
- % [4] Not supported. Imp: how to?
+ % [4] Not supported. Imp: how to?
% (5) Multiple short footnotes may be put into a single line.
% [5] \usepackage[para]{footmisc} or \usepackage{fnpara}
% (6) Footnotes for \begin{figure} and \begin{table} must be put just under
@@ -4301,7 +4367,7 @@
% [7] Use \footnotestyle{marksize=max-normal}
% (8) It is possible to use either \parindent or \item when starting a
% footnote.
- % [8] Use \footnotestyle{indent=hulist}
+ % [8] Use \footnotestyle{indent=hulist}
% (9) The footnotemark must be followed by a thin space (only at BOP).
% [9] OK, see \@makefntext
% (10) Don't emit too much stars. Recommended: * ** *** + ++ +++
@@ -4340,7 +4406,8 @@
\@namedef{fos@reset=page-resume}{%
\fos@resume \csname fos@reset=page\endcsname
}
- %** Resume to the previous footnote number at the end of the group. (Default: don't resume)
+ %** Resume to the previous footnote number at the end of the group. (Default: don't
+ %** resume)
%** \footnotestyle{resume,reset=page} is the correct order
\def\fos@resume{%
\aftergroup\global
@@ -4384,7 +4451,7 @@
\def\fos@starplain{\fos@huplain\csname fos@reset=page\endcsname\csname fos@mark=stars-max\endcsname}%
%\def\fos@editor{\fos@resume\fos@starplain}%
\def\fos@editor{\fos@huplain\csname fos@reset=page-cont\endcsname\csname fos@mark=stars-max\endcsname}%
-
+
\def\footnotestyle#1{%
\@for\reserved@a:=#1\do{%
\@ifundefined{fos@\reserved@a}{\@latex@error{Undefined footnote style: \reserved@a}\@ehc}%
@@ -4461,7 +4528,7 @@
% --- mathbrk=
-\if0\magyar@opt@@mathbrk \@@magyar@skiplong\fi
+\if0\magyar@opt@@mathbrk \@@magyar@skiplong\fi % mathbrk=define and mathbrk=fix
%** Similar to \@@magyar@fixmathcmd@low, but inserts symbol immediately.
%** @param #1 `\mathchar', all catcodes
%** @param #2 hex code
@@ -4537,7 +4604,7 @@
\fi
\catcode`#112
}
- %** \newmcodes@ defined in amsopn.sty doesn't work (triggered by
+ %** \newmcodes@ defined in amsopn.sty doesn't work (triggered by
%** \DeclareMathOperator{\tg}{tg} $\tg$) because it wants to assign
%** \mathchardef\std@minus\mathcode`\-, which is "8000, which is a bad
%** matchar. We fix that by prepending \mathcode`-45 to \newmcodes@ .
@@ -4584,17 +4651,18 @@
}
\let\@@magyar@domathbins@prefix\@empty
- \def\@@magyar@fixeverymathcmds@appendto#1{%
- \expandafter\def\expandafter#1\expandafter{#1% append
- \@@magyar@resetmathchars
- \let\do\@@magyar@fixmathbinchar
- \@@magyar@domathbins@prefix\@@magyar@domathbins% only in math mode start
- }%
+ \def\@@magyar@onmathstart{%
+ \@@magyar@resetmathchars
+ \let\do\@@magyar@fixmathbinchar
+ \@@magyar@domathbins@prefix\@@magyar@domathbins% only in math mode start
}
+
+ \def\@@magyar@fixeverymathcmds@appendto#1#2{% A generic \appendto.
+ \expandafter\def\expandafter#1\expandafter{#1#2}}%
\def\@@magyar@fixeverymathcmds@setup{%
\expandafter\ifx\csname mathoptions@on\endcsname\relax% no nath.sty
- \@@magyar@fixeverymathcmds@appendto\check@mathfonts
- \else\@@magyar@fixeverymathcmds@appendto\mathoptions@on\fi
+ \@@magyar@fixeverymathcmds@appendto\check@mathfonts\@@magyar@onmathstart
+ \else\@@magyar@fixeverymathcmds@appendto\mathoptions@on\@@magyar@onmathstart\fi
}
% The definition of \@tabular contains a $, which calls
@@ -4633,7 +4701,22 @@
\def\slash{\nobreak/\nobreak}% only in math-mode start, \nobreak
% ^^^ Dat: \slash is fragile in latex.ltx
}
- \AtBeginDocument{\@@magyar@fixmathcmds\@@magyar@fixeverymathcmds@setup}
+
+ % This fixes \url defined in url.sty, by making \@@magyar@onmathstart a no-op
+ % with a URL. This is important because \url defines its own math mode with
+ % its own \mathcode and \catcode values, and we don't want mathbrk=fix clash
+ % with that.
+ \def\@@magyar@mathfixurl{%
+ \ifx\Url\@undefined\else
+ % Prepend \let\@@magyar@onmathstart\@empty to \Url.
+ \expandafter\def\expandafter\Url\expandafter{%
+ \expandafter\let\expandafter\@@magyar@onmathstart\expandafter\@empty
+ \Url}%
+ \fi
+ }%
+
+ \AtBeginDocument{%
+ \@@magyar@mathfixurl\@@magyar@fixmathcmds\@@magyar@fixeverymathcmds@setup}
\@gobble
{^}
@@ -4661,7 +4744,7 @@
%** Inspired by Donald Aresenau
%** @param #1 the
%** @param #2 character
- %** @example The sample in your article would be typed
+ %** @example The sample in your article would be typed
%** \[ F_{i}(x,y) = y^i + 1,3x \qquad x,y \in A,\ i = 1, 2, 3,\ldots \]
\edef\@@magyar@hucomma@lowa#1#2 #3#4 #5#6\hfuzz{%
\noexpand\ifnum9<1#5 \noexpand\if#1t\noexpand\if#3c%
@@ -4688,7 +4771,6 @@
% --- mathmuskips=
-%
\if1\magyar@opt@@mathmuskips% =latex, as defined in latex.ltx
\thickmuskip 5mu plus 5mu
\medmuskip 4mu plus 2mu minus 4mu
@@ -5456,8 +5538,8 @@
% Solution #2: (won't convert any heading to uppercase)
% % change the definition of \ps@headings, remove \MakeUppercase
% \makeatletter \def\ps@headings{%
-% \let\@oddfoot\@empty \let\@mkboth\markboth
-% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
+% \let\@oddfoot\@empty \let\@mkboth\markboth
+% \def\@oddhead{{\slshape\rightmark}\hfil\thepage}%
% \def\sectionmark##1{\markright {\iffalse\MakeUppercase\fi{%
% \ifnum \c@secnumdepth >\m@ne \thesection\quad \fi##1}}}}
\if0\magyar@opt@@cjhebrewfix \@@magyar@skiplong\fi
@@ -5511,7 +5593,7 @@
\if0\magyar@opt@@varioref \@@magyar@skiplong\fi
\expandafter\addto\csname extras\CurrentOption\endcsname{%
\@@magyar@setup@varioref} % Dat: we are we late enough so we override varioref.sty
-% vvv don't apply changes if varioref.sty wasn't loaded
+% vvv Don't apply changes if varioref.sty wasn't loaded.
\AtBeginDocument{\expandafter\ifx\csname vpagerefrange\endcsname\relax
\let\@@magyar@setup@varioref\@empty\fi}
\def\@@magyar@setup@varioref{% Dat: must be a separate macro for suggestions= not to find our \reftextfaceafter etc.
@@ -5707,15 +5789,15 @@
% !! hyperref.sty bugfix when turning hyperref.sty on, \ref is spoiled:
% w/ or w/o magyar.ldf
% ! Argument of \@fifthoffive has an extra }.
-% <inserted text>
-% \par
+% <inserted text>
+% \par
% l.48 Ld. \ref{tab}
% !! > Kipróbáltam, s tényleg pontosan ugyanaz a fájl magyar.ldf (texmf fában) és
% > magyar-0510.ldf (aktuális könyvtárban) néven más eredményt ad.
% (cjhebrew)
% !! a4wide.sty doesn't compile
% \documentclass[12pt,a4paper]{article}
-% \usepackage{t1enc}
+% \usepackage{t1enc}
% \usepackage{times}% Imp: math mode
% \usepackage[magyar]{babel}
% \usepackage{graphicx}
@@ -5735,13 +5817,13 @@
% Dat: \mathchardef\comma="613B % a vesző (,) ami matematikai módban elválasztó karakterként használható
% Dat: additive \PassOptionsToPackage{foo=bar}{magyar.ldf}
% Dat: for book.cls and article.cls: the user has to run \pagestyle{headings} after \selectlanguage{magyar} -- for performance reasons
-% Dat: doc: \let\@@magyar@setup@psheadings\relax maybe needed in the preamble
+% Dat: doc: \let\@@magyar@setup@psheadings\relax maybe needed in the preamble
% Dat: \pagestyle{headings} is forced \AtBeginDocument -- user should change it later
% Dat: babel.def assumes we have: \textquotedblright \textquoteright \ll \gg
% < >
% Dat: babel.def defines for OT1 and others: \quotedblbase \quotesinglbase
% \guillemotleft \guillemotright \guilsinglleft \guilsinglright \ij \IJ
-% \dj \DJ \SS
+% \dj \DJ \SS
% Dat: babel.def defines the following robust commands in math and text modes:
% \glq \grq \glqq \grqq \flq \frq \flqq \frqq
% Dat: OT1 encoding respects accents=low (\umlauthigh and \umlautlow), but T1
@@ -5763,7 +5845,7 @@
% $\displaystyle{1\over3}-{1\over 4}={1\over 12}$,
% $\displaystyle{1\over 2}-{1\over 4}={1\over 4}$ és
% $\displaystyle{1\over 4}+\bigg({1\over 2}-{1\over 3}\bigg)={1\over 4}+{1\over 6}}=\displaystyle{5\over 12}$
-% területegység.
+% területegység.
% OK: doc in magyarldf-doc.tex: enumeration in math, see $a,\ b$ in nath.sty
% OK: mathbrk=fix +\\+ (all binary ops and relations) in math, \nobreak\cdot, \nobreak\slash
% OK: footnote text indented, asterisks on pages