texlive[45186] Master/texmf-dist: babel-hungarian (31aug17)

commits+karl at tug.org commits+karl at tug.org
Fri Sep 1 03:32:47 CEST 2017


Revision: 45186
          http://tug.org/svn/texlive?view=revision&revision=45186
Author:   karl
Date:     2017-09-01 03:32:46 +0200 (Fri, 01 Sep 2017)
Log Message:
-----------
babel-hungarian (31aug17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/babel-hungarian/README
    trunk/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf

Modified: trunk/Master/texmf-dist/doc/generic/babel-hungarian/README
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-hungarian/README	2017-09-01 01:32:22 UTC (rev 45185)
+++ trunk/Master/texmf-dist/doc/generic/babel-hungarian/README	2017-09-01 01:32:46 UTC (rev 45186)
@@ -1,6 +1,8 @@
 This is the new version 1.5 for Hungarian in LaTeX.  See more info about 
-Hungarian typography in LaTeX in our TUG 2004 article (get it from 
-http://www.inf.bme.hu/~pts/ , search for TUG 2004).
+Hungarian typography in LaTeX in our TUG 2004 article:
+http://www.math.bme.hu/latex/dl/pts_tug2004_magyarldf2.pdf .
+There is a longer user manual in Hungarian:
+http://math.bme.hu/latex/magyarldf-doc.pdf .
 
 This file is intended to be part of the standard Babel system, but the
 maintainer of Babel has not had time to incorporate it into the
@@ -9,4 +11,8 @@
 Users are urged to report their experiences with the package to the
 maintainer of Babel as well as to the author of the package.  The
 maintainer of Babel is interested in positive feedback about the
-package as well as problems.
\ No newline at end of file
+package as well as problems.
+
+Usage:
+
+  \usepackage[magyar]{babel}

Modified: trunk/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf	2017-09-01 01:32:22 UTC (rev 45185)
+++ trunk/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf	2017-09-01 01:32:46 UTC (rev 45186)
@@ -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 at 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 at opt@ntheoremfix@@yes
   \magyar at opt@openqq@@maybedown
   \magyar at opt@partnumber@@unchanged
-  \magyar at opt@postpara{}{unchanged}%
-  \magyar at opt@postsubpara{}{unchanged}%
+  \magyar at opt@postdescription{postdescription}{unchanged}%
+  \magyar at opt@postpara{postpara}{unchanged}%
+  \magyar at opt@postsubpara{postsubpara}{unchanged}%
   \magyar at opt@refstruc{refstruc}{weak}%
   \magyar at opt@sectiondot@@safe
   \magyar at opt@shorthandcs{shorthandcs}{\shu}%
@@ -330,8 +332,9 @@
   \magyar at opt@ntheoremfix@@yes% OK
   \magyar at opt@openqq@@maybedown% OK
   \magyar at opt@partnumber@@unchanged% OK
-  \magyar at opt@postpara{}{unchanged}% OK
-  \magyar at opt@postsubpara{}{unchanged}% OK
+  \magyar at opt@postdescription{postdescription}{unchanged}% OK
+  \magyar at opt@postpara{postpara}{unchanged}% OK
+  \magyar at opt@postsubpara{postsubpara}{unchanged}% OK
   \magyar at opt@refstruc{refstruc}{no}% OK
   \magyar at opt@sectiondot@@safe% we don't want =problematic
   \magyar at opt@shorthandcs{shorthandcs}{none}% OK
@@ -395,8 +398,9 @@
   \magyar at opt@ntheoremfix@@unchanged
   \magyar at opt@openqq@@unchanged
   \magyar at opt@partnumber@@unchanged
-  \magyar at opt@postpara{}{unchanged}%
-  \magyar at opt@postsubpara{}{unchanged}%
+  \magyar at opt@postdescription{postdescription}{unchanged}%
+  \magyar at opt@postpara{postpara}{unchanged}%
+  \magyar at opt@postsubpara{postsubpara}{unchanged}%
   \magyar at opt@refstruc{refstruc}{no}%
   \magyar at opt@sectiondot@@none
   \magyar at opt@shorthandcs{shorthandcs}{none}%
@@ -462,9 +466,9 @@
   \magyar at opt@ntheoremfix@@yes
   \magyar at opt@openqq@@maybedown
   \magyar at opt@partnumber@@Huordinal
-  \magyar at opt@postdescription{}{dot}%
-  \magyar at opt@postpara{}{diamond}%
-  \magyar at opt@postsubpara{}{star}%
+  \magyar at opt@postdescription{postdescription}{dot}%
+  \magyar at opt@postpara{postpara}{diamond}%
+  \magyar at opt@postsubpara{postsubpara}{star}%
   \magyar at opt@refstruc{refstruc}{yes}%
   \magyar at opt@sectiondot@@safe
   \magyar at opt@shorthandcs{shorthandcs}{\shu}%
@@ -514,7 +518,6 @@
   labelenums=hu-d,
   labelitems=hu,
   longcaption=centered,
-  mathbrk=define,
   mathbrk=fix,
   mathfactorial=define,
   mathhucomma=fix,
@@ -521,7 +524,7 @@
   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 at opt@defaults@@hu-min {%
-  %\csname magyar at opt@defaults@@over-1.4\endcsname
-  \csname magyar at opt@defaults@@safest\endcsname
-  % Dat: no openqq=unchanged (!)
+  \magyar at opt@defaults@@safest
   \expandafter\magyar at doopt\magyar@@humin at options\hfuzz,%
 }
 
@@ -822,17 +823,14 @@
 \dMf magyar at opt@afterindent@@force-yes {\def\magyar at opt@@afterindent{1}}
 \dMf magyar at opt@afterindent@@unchanged {\def\magyar at opt@@afterindent{9}}
 \let\magyar at opt@afterindent\magyar at enumarg
-\def\magyar at opt@postpara#1#2{%
-  \def\reserved at a{#2}%
-  \ifx#2\magyar@@unchanged
-    \let\magyar at opt@@paragraphs\@undefined
-  \else
+\def\magyar at paragraphopt#1#2{%
+  \ifx#2\magyar@@unchanged\else
     \expandafter\def\csname magyar at opt@@#1\endcsname{#2}%
-    \let\magyar at opt@@paragraphs\@empty
   \fi
 }
-\let\magyar at opt@postsubpara\magyar at opt@postpara
-\let\magyar at opt@postdescription\magyar at opt@postpara
+\let\magyar at opt@postdescription\magyar at paragraphopt
+\let\magyar at opt@postpara\magyar at paragraphopt
+\let\magyar at opt@postsubpara\magyar at 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 at az@vfuzzedef#1{%
   \begingroup
-  \@safe at activestrue% allow active `:' inside labels; 
+  \@safe at activestrue% Allow active `:' inside labels.
   \def\hyper@@link[##1]##2##3##4{##4}% Dat: \def\b at abook{\hyper@@link [cite]{}{cite.sokt}{2}}% with hyperref.sty
   \let\romannumeral\number% by pts at 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 at accent ##1##2{##2}%
   \def\@text at 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 at activestrue\@empty% babel puts these inside \b at ...: % Dat: \def\b at abook{\@safe at activesfalse 2}% (what is \@safe at 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 at az@lowt{\@ifstar{\@@magyar at az@lowy}{\@ifnextchar+\@@magyar at az@lowz\@@magyar at az@lowx}}
+%** #1 is +.
 \def\@@magyar at az@lowz#1#2#3{\@@magyar at az@lowy{#2{#3}}~#2{#3}}
 %** Used by new varioref.sty
 \def\@@magyar at az@lowxu{\unskip\@@magyar at az@lowx}%
-\def\@@magyar at az@lowx#1{\@@magyar at az@lowy{#1}~#1}
-\def\@@magyar at az@lowy#1{{%
+\def\@@magyar at az@lowx#1{\@@magyar at az@lowy{#1}~\ignorespaces#1}
+\def\@@magyar at az@lowy#1{%
   \begingroup
+  \begingroup
   %\def\protect{\noexpand\protect\noexpand}%
-  \set at display@protect% screws up \r
+  % TODO(pts): Is \set at display@protect called in other invocations of
+  %            \@@magyar at az@vfuzzedef, such as \aref or \az+\ref? Make it
+  %            consistent.
+  % latex.ltx: \let\@typeset at protect\relax
+  % latex.ltx: \def\set at display@protect{\let\protect\string}
+  % latex.ltx: \def\set at typeset@protect{\let\protect\@typeset at protect}
+  \set at display@protect% \let\protect\string; screws up \r
   \@@magyar at az@vfuzzedef{#1}%
-  %%\show\vfuzz
   \expandafter\endgroup\expandafter
     \set at display@protect\expandafter% fixes \r; why??
     \@@magyar at az@set\expandafter{\vfuzz}\hbox$%
-}}
+  \endgroup
+}
 
 \def\@@magyar at firstarg#1#2\hbox${#1}%
 
@@ -1315,17 +1332,17 @@
 \def\@@magyar at 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 at azuc@pre#1#2#3#4\hbox${%
@@ -1352,7 +1369,7 @@
 
 \@gobble\iftrue
 \def\@@magyar at 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 at 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 at 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 at 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 at 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 at azrs...\hfuzz ', where ... argument doesn't contain
+% \if..., \else and \fi tokens.
+\def\@@magyar at azrs#1 {%
+  \ifx\hfuzz#1\expandafter\@gobble% Stop at \hfuzz.
+  \else#1.%
+  \fi\@@magyar at azrs}%
+
 %** @param #1 might not be \cs -- and isn't empty
 \def\@@magyar at aznospace@short#1{%
   \if5\noexpand#1z% Dat: emit `az 5'
@@ -1382,14 +1437,10 @@
     \@@magyar at swaprelax\@@magyar at ignorehbox@pre
   \else\if-\noexpand#1% \az{-5} yields `a~-5'
     \@@magyar at swaprelax\@@magyar at 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 at swaprelax\@@magyar at aznospace
+  \else\ifcat\string*\noexpand#1% puncuation in the beginning, such as `(' in `(5)'
+    \@@magyar at swaprelax\@@magyar at aznospace  % ignore punctuation
   \else
-    \@@magyar at swaprelax{\@@magyar at azuc@pre#1}% safe to call, no \cs
+    \@@magyar at swaprelax{\@@magyar at azuc@pre#1}%
   \fi\fi\fi\fi\fi\relax
 }
 
@@ -1399,7 +1450,10 @@
 %**   tokens.
 \def\@@magyar at az@set#1#2\hbox${% by pts
   % ^^^ Dat: we have `$' instead of `!' because of catcode changes (shouldn't affect)
-  \edef\reserved at a{\@@magyar at azrb#1\hfuzz}%
+  % We use \@firstofone to strip a leading space.
+  \edef\reserved at a{\expandafter\@@magyar at azrs\@firstofone#1 \hfuzz\@gobble{} }%
+  \edef\reserved at a{\expandafter\@@magyar at azrb\reserved at a\hfuzz}%
+  \edef\reserved at a{\expandafter\@@magyar at azro\reserved at a\hfuzz}%
   \expandafter\@@magyar at aznospace\reserved at a[b][][] \hbox$%
   % ^^^ Wizardry: [b][][] is a smart sentinel for \@@magyar at azuc and `b' for
   %	\@@magyar at aznospace@short. First `[' is there for aesthetics. Space
@@ -1582,7 +1636,7 @@
 
 \if0\magyar at opt@@captions\@@magyar at 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 at opt@@paragraphs\endcsname\relax\@@magyar at skiplong\fi
+%\show\magyar at opt@@postpara
+%\show\magyar@@unchanged
+\let\magyar at opt@override at paragraphs\@empty
+  \ifx\magyar at opt@@postpara\magyar@@unchanged
+  \ifx\magyar at opt@@postsubpara\magyar@@unchanged
+  \ifx\magyar at opt@@postdescription\magyar@@unchanged
+  \let\magyar at opt@override at paragraphs\@undefined
+  \fi\fi\fi
+\expandafter\ifx\csname magyar at opt@override at paragraphs\endcsname\relax\@@magyar at skiplong\fi
   % Dat: We make sure that hspaces emitted by \magyar at post@... are unstretchable
-  \def\magyar at post@dot{.\enskip}%
+  \def\magyar at post@dot{.\enskip}%  \bfseries is the default, same as =bfdot
+  \def\magyar at post@mddot{\textmd.\enskip}%
   \def\magyar at post@bfdot{\textbf.\enskip}%
   \let\magyar at post@quad\quad% not recommended in Hungarian
   \let\magyar at 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 at opt@@postpara\endcsname\relax\else
-    \magyar at paragraphfix\paragraph
+  % !! Imp: change Hungarian \paragraph()s only, with dual load
+  \ifx\magyar at opt@@postpara\magyar@@unchanged\else
     \expandafter\let\expandafter\magyar at post@paragraph\csname magyar at post@\magyar at opt@@postpara\endcsname
     \ifx\magyar at post@paragraph\relax
       \@@magyar at error{Invalid arg for option: postpara = \magyar at opt@@postpara}%
+    \else
+      \magyar at paragraphfix\paragraph
     \fi
   \fi
-  \expandafter\ifx\csname magyar at opt@@postsubpara\endcsname\relax\else
-    \magyar at paragraphfix\subparagraph
+  \ifx\magyar at opt@@postsubpara\magyar@@unchanged\else
     \expandafter\let\expandafter\magyar at post@subparagraph\csname magyar at post@\magyar at opt@@postsubpara\endcsname
     \ifx\magyar at post@subparagraph\relax
       \@@magyar at error{Invalid arg for option: postsubpara = \magyar at opt@@postsubpara}%
+    \else
+      \magyar at paragraphfix\subparagraph
     \fi
   \fi
-  \expandafter\ifx\csname magyar at opt@@postdescription\endcsname\relax\else
+  \ifx\magyar at opt@@postdescription\magyar@@unchanged\else
     \expandafter\let\expandafter\magyar at post@description\csname magyar at post@\magyar at opt@@postdescription\endcsname
     \ifx\magyar at post@description\relax
       \@@magyar at error{Invalid arg for option: postdescription = \magyar at opt@@postdescription}%
+    \else
+      \def\magyar@@descriptionfont{\normalfont\bfseries}%
+      \def\descriptionlabel#1{\hskip\labelsep{\magyar@@descriptionfont#1}\magyar at post@description\hskip-\labelsep}%
     \fi
-    \def\magyar@@descriptionfont{\normalfont\bfseries}%
-    \def\descriptionlabel#1{\hskip\labelsep{\magyar@@descriptionfont#1}\magyar at 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 at shorthand@... For example: {`tty} and
 %** {\@@magyar at shorthand tty} are interchangeable.
-%** @param #1 a char token. 
+%** @param #1 a char token.
 \def\@@magyar at shorthand#1{%
   \expandafter\ifx\csname @@magyar at shorthand@\string#1\endcsname\relax
     \@@magyar at error{Unknown shorthand: \string#1 }%
@@ -2693,7 +2759,7 @@
   \def\magyar at 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 at 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 at a
 \def\@@magyar at refstruc@name#1{%
   \begingroup
@@ -4045,7 +4111,7 @@
 %** @example A mai d\xE1tum: [\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 at date@g{1848}{3}{115}}+a{} 
+%** @example \told{\@@magyar at 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 at a
     }%\endgroup
-  }  
+  }
 
   \let\magyar at 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 at reset=page-resume}{%
     \fos at resume \csname fos at 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 at resume{%
     \aftergroup\global
@@ -4384,7 +4451,7 @@
   \def\fos at starplain{\fos at huplain\csname fos at reset=page\endcsname\csname fos at mark=stars-max\endcsname}%
   %\def\fos at editor{\fos at resume\fos at starplain}%
   \def\fos at editor{\fos at huplain\csname fos at reset=page-cont\endcsname\csname fos at mark=stars-max\endcsname}%
-  
+
   \def\footnotestyle#1{%
     \@for\reserved at a:=#1\do{%
       \@ifundefined{fos@\reserved at a}{\@latex at error{Undefined footnote style: \reserved at a}\@ehc}%
@@ -4461,7 +4528,7 @@
 
 % --- mathbrk=
 
-\if0\magyar at opt@@mathbrk \@@magyar at skiplong\fi
+\if0\magyar at opt@@mathbrk \@@magyar at skiplong\fi  % mathbrk=define and mathbrk=fix
   %** Similar to \@@magyar at 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 at 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 at domathbins@prefix\@empty
-  \def\@@magyar at fixeverymathcmds@appendto#1{%
-    \expandafter\def\expandafter#1\expandafter{#1% append
-      \@@magyar at resetmathchars
-      \let\do\@@magyar at fixmathbinchar
-      \@@magyar at domathbins@prefix\@@magyar at domathbins% only in math mode start
-    }%
+  \def\@@magyar at onmathstart{%
+    \@@magyar at resetmathchars
+    \let\do\@@magyar at fixmathbinchar
+    \@@magyar at domathbins@prefix\@@magyar at domathbins% only in math mode start
   }
+
+  \def\@@magyar at fixeverymathcmds@appendto#1#2{% A generic \appendto.
+    \expandafter\def\expandafter#1\expandafter{#1#2}}%
   \def\@@magyar at fixeverymathcmds@setup{%
     \expandafter\ifx\csname mathoptions at on\endcsname\relax% no nath.sty
-	 \@@magyar at fixeverymathcmds@appendto\check at mathfonts
-    \else\@@magyar at fixeverymathcmds@appendto\mathoptions at on\fi
+         \@@magyar at fixeverymathcmds@appendto\check at mathfonts\@@magyar at onmathstart
+    \else\@@magyar at fixeverymathcmds@appendto\mathoptions at on\@@magyar at 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 at fixmathcmds\@@magyar at fixeverymathcmds@setup}
+
+  % This fixes \url defined in url.sty, by making \@@magyar at 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 at mathfixurl{%
+    \ifx\Url\@undefined\else
+      % Prepend \let\@@magyar at onmathstart\@empty to \Url.
+      \expandafter\def\expandafter\Url\expandafter{%
+        \expandafter\let\expandafter\@@magyar at onmathstart\expandafter\@empty
+        \Url}%
+    \fi
+  }%
+
+  \AtBeginDocument{%
+     \@@magyar at mathfixurl\@@magyar at fixmathcmds\@@magyar at 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 at 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 at 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 at headings, remove \MakeUppercase
 %        \makeatletter \def\ps at 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 at secnumdepth >\m at ne \thesection\quad \fi##1}}}}
 \if0\magyar at opt@@cjhebrewfix \@@magyar at skiplong\fi
@@ -5511,7 +5593,7 @@
 \if0\magyar at opt@@varioref \@@magyar at skiplong\fi
 \expandafter\addto\csname extras\CurrentOption\endcsname{%
   \@@magyar at 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 at setup@varioref\@empty\fi}
 \def\@@magyar at setup@varioref{% Dat: must be a separate macro for suggestions= not to find our \reftextfaceafter etc.
@@ -5707,8 +5789,8 @@
 % !! 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\xF3b\xE1ltam, s t\xE9nyleg pontosan ugyanaz a f\xE1jl magyar.ldf (texmf f\xE1ban) \xE9s
 %    > magyar-0510.ldf (aktu\xE1lis k\xF6nyvt\xE1rban) n\xE9ven m\xE1s eredm\xE9nyt ad.
@@ -5715,7 +5797,7 @@
 %    (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\xF5 (,) ami matematikai m\xF3dban elv\xE1laszt\xF3 karakterk\xE9nt haszn\xE1lhat\xF3
 % 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 at setup@psheadings\relax maybe needed in the preamble 
+% Dat: doc: \let\@@magyar at 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}$ \xE9s
 %    $\displaystyle{1\over 4}+\bigg({1\over 2}-{1\over 3}\bigg)={1\over 4}+{1\over 6}}=\displaystyle{5\over 12}$
-%    ter\xFCletegys\xE9g. 
+%    ter\xFCletegys\xE9g.
 % 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



More information about the tex-live-commits mailing list