summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-01-14 22:05:25 +0000
committerKarl Berry <karl@freefriends.org>2019-01-14 22:05:25 +0000
commitf7f1f807d00177577e28ff9d0992e86659b5997f (patch)
tree34a752089bd74a1be169421f6b8dd3bbb9edfa96
parent97dc41b4b9989605f603429280836ec60a723002 (diff)
babel-hungarian (14jan19)
git-svn-id: svn://tug.org/texlive/trunk@49701 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf60
1 files changed, 39 insertions, 21 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf b/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf
index 4c9cf0c3a52..18158434e4c 100644
--- a/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf
+++ b/Master/texmf-dist/tex/generic/babel-hungarian/magyar.ldf
@@ -82,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}[2017/08/30 v1.5c Magyar support from the babel v3.7 system]
+\expandafter\ProvidesLanguage\expandafter{\CurrentOption}[2019/01/14 v1.5c Magyar (Hungarian) support for babel]
% Possibly do \endinput if .ldf already loaded
\expandafter\LdfInit\expandafter{\CurrentOption}{captions\CurrentOption}%
@@ -1707,7 +1707,8 @@
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
mu\)}\hfill
\nobreak
- \setbox\@tempboxa\hbox{\normalfont \normalcolor #5}% ****pts****
+ % \begingroup needed because of https://tex.stackexchange.com/a/316692/820
+ \setbox\@tempboxa\hbox{\begingroup\normalfont \normalcolor #5\endgroup}% ****pts****
\ifdim\wd\@tempboxa<\@pnumwidth\setbox\@tempboxa\hb@xt@\@pnumwidth{\hfil\unhbox\@tempboxa}\fi
\box\@tempboxa
\par}%
@@ -2577,21 +2578,22 @@
\def\reftextlabelrange23456\AtBeginDocument78\hbox${#1}%$
}
\def\magyar@sugg@to#1{%
- \def\reserved@a{T1}
- \edef\reserved@b{\encodingdefault}% \encodingdefault is \long for t1enc.sty, but not for fontenc.sty
- \ifx\reserved@a\reserved@b\else
- \@latex@warning@no@line{Please use \string\usepackage{t1enc} with\MessageBreak \string\usepackage[#1]{babel}, to get accented chars hyphenated}%
- % ^^^ Dat: \usepackage[T1]{fontenc} is equally good, but less effective
+ % In lualatex, the (unchecked) recommendation is: don't do \usepackage{t1enc}.
+ \ifnum0\ifx\luatexversion\@undefined1\fi\ifx\luatexversion\relax1\fi>0
+ \def\reserved@a{T1}%
+ \edef\reserved@b{\encodingdefault}% \encodingdefault is \long for t1enc.sty, but not for fontenc.sty
+ \ifx\reserved@a\reserved@b\else
+ \@latex@warning@no@line{Please use \string\usepackage{t1enc} with\MessageBreak \string\usepackage[#1]{babel}, to get accented chars hyphenated}%
+ % ^^^ Dat: \usepackage[T1]{fontenc} is equally good, but less effective
+ \fi
\fi
}
\def\magyar@sugg@ie@lowb#1{\@latex@warning@no@line{%
Please use \string\usepackage[latin2]{inputenc}\MessageBreak
or \string\usepackage[utf8]{inputenc}\MessageBreak
with \string\usepackage[#1]{babel}}}%
- %** @param #1 empty (old) or \protect
- %** @param #2 input encoding name
- \def\magyar@sugg@ie@low#1\@inpenc@undefined@#2#3\vfuzz#4{%
- \def\reserved@b{#2}%
+ %** @param #1 Code to run if encoding in \reserved@b is unknown.
+ \def\magyar@sugg@ie@lowu#1{%
\def\reserved@a{latin2}%
\ifx\reserved@a\reserved@b\else
\def\reserved@a{utf8}%
@@ -2600,21 +2602,37 @@
\ifx\reserved@a\reserved@b\else
\def\reserved@a{cp1250}%
\ifx\reserved@a\reserved@b\else
- \magyar@sugg@ie@lowb{#4}%
+ #1%
\fi
\fi
\fi
\fi
- }
+ }%
+ %** @param #1 empty (old) or \protect
+ %** @param #2 input encoding name
+ \def\magyar@sugg@ie@low#1\@inpenc@undefined@#2#3\vfuzz#4{%
+ \def\reserved@b{#2}%
+ \magyar@sugg@ie@lowu{\magyar@sugg@ie@lowb{#4}}%
+ }%
\def\magyar@sugg@ie#1{%
- % Dat: don't print warning for missing \usepackage
- \expandafter\ifx\csname @inpenc@undefined\endcsname\relax
- \magyar@sugg@ie@lowb{#1}%
- \else
- % from inputenc.sty: \edef\@inpenc@undefined{\noexpand\@inpenc@undefined@{#1}}%
- % > \@inpenc@undefined=macro:
- % ->\@inpenc@undefined@ {latin2}.
- \expandafter\magyar@sugg@ie@low\@inpenc@undefined....\vfuzz{#1}%
+ % In lualatex, the (unchecked) recommendation is: don't do \usepackage[...]{inputenc}, do \usepackage[...]{luainputenc} only if not utf8.
+ \ifnum0\ifx\luatexversion\@undefined1\fi\ifx\luatexversion\relax1\fi>0
+ \expandafter\expandafter\expandafter\def\expandafter\expandafter\expandafter
+ \reserved@b\expandafter\expandafter\expandafter{%
+ \csname inputencodingname\endcsname}%
+ \magyar@sugg@ie@lowu{%
+ \ifx\reserved@a\reserved@b\else
+ % Dat: don't print warning for missing \usepackage
+ \expandafter\ifx\csname @inpenc@undefined\endcsname\relax
+ \magyar@sugg@ie@lowb{#1}%
+ \else
+ % from inputenc.sty: \edef\@inpenc@undefined{\noexpand\@inpenc@undefined@{#1}}%
+ % > \@inpenc@undefined=macro:
+ % ->\@inpenc@undefined@ {latin2}.
+ \expandafter\magyar@sugg@ie@low\@inpenc@undefined....\vfuzz{#1}%
+ \fi
+ \fi
+ }%
\fi
}%
\def\magyar@sugg@af#1{%