summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-07-08 22:33:18 +0000
committerKarl Berry <karl@freefriends.org>2015-07-08 22:33:18 +0000
commitb94fdf191429ee29a013736ff6c683495480d3dd (patch)
tree5339a5170d7c0ecf11fd2a77d7c7c9620a570118
parentcf50135f238594f9bbff9bb76412001f6a171c85 (diff)
polyglossia (8jul15)
git-svn-id: svn://tug.org/texlive/trunk@37810 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/README2
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdfbin96715 -> 96701 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-korean.pdfbin0 -> 30809 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-korean.tex36
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/example-thai.pdfbin23779 -> 23752 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/examples.pdfbin165821 -> 166365 bytes
-rw-r--r--Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdfbin135858 -> 135859 bytes
-rw-r--r--Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx206
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf192
-rw-r--r--Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty2
10 files changed, 434 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/polyglossia/README b/Master/texmf-dist/doc/latex/polyglossia/README
index 1f35ce85a6e..709b75ea4ea 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/README
+++ b/Master/texmf-dist/doc/latex/polyglossia/README
@@ -1,7 +1,7 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.33.7 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.40.0 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
index 6b965f3f127..0e90404798c 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-arabic.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
new file mode 100644
index 00000000000..6ac4bc217a4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-korean.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-korean.tex b/Master/texmf-dist/doc/latex/polyglossia/example-korean.tex
new file mode 100644
index 00000000000..92828e2ef0c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-korean.tex
@@ -0,0 +1,36 @@
+\documentclass{article}
+\usepackage{fontspec}
+\usepackage{polyglossia}
+\setdefaultlanguage{korean}
+\setotherlanguage{english}
+\setmainfont[Script=Hangul]{UnBatang}
+\begin{document}
+\begin{center}
+ \abstractname
+\end{center}
+\begin{english}
+Some English to begin with.\footnote{ %
+ Blabla}
+\end{english}
+
+\section{제1 조}
+
+모든 인간은 태어날 때부터 자유로우며 그 존엄과 권리에 있어 동등하다. 인간은 천부적으로 이성과 양심을 부여받았으며 서로 형제애의 정신으로 행동하여야 한다.
+
+\today
+
+\begin{english}
+This is today: \today
+\end{english}
+
+% \begin{enumerate}
+% \item A
+% \item B
+% \begin{enumerate}
+% \item a
+% \item b
+% \item c
+% \end{enumerate}
+% \item C
+% \end{enumerate}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
index 7dd0770c8e8..f4ccf6d89d7 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/example-thai.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
index 45a303e10ba..84fc6463e21 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/examples.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
index ab48833e6f6..bacf8758313 100644
--- a/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
+++ b/Master/texmf-dist/doc/latex/polyglossia/polyglossia.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
index 57bf1075abc..8f69cc2aa9b 100644
--- a/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
+++ b/Master/texmf-dist/source/latex/polyglossia/polyglossia.dtx
@@ -11,7 +11,7 @@
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.33.7 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.40.0 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
@@ -125,6 +125,7 @@ http://github.com/reutenauer/polyglossia/issues
\generate{\file{gloss-irish.ldf}{\from{polyglossia.dtx}{gloss-irish.ldf}}}
\generate{\file{gloss-italian.ldf}{\from{polyglossia.dtx}{gloss-italian.ldf}}}
\generate{\file{gloss-kannada.ldf}{\from{polyglossia.dtx}{gloss-kannada.ldf}}}
+\generate{\file{gloss-korean.ldf}{\from{polyglossia.dtx}{gloss-korean.ldf}}}
\generate{\file{gloss-lao.ldf}{\from{polyglossia.dtx}{gloss-lao.ldf}}}
\generate{\file{gloss-latin.ldf}{\from{polyglossia.dtx}{gloss-latin.ldf}}}
\generate{\file{gloss-latvian.ldf}{\from{polyglossia.dtx}{gloss-latvian.ldf}}}
@@ -4563,6 +4564,207 @@ and may look very wrong.}
% \end{macrocode}
% \iffalse
%</gloss-kannada.ldf>
+%<*gloss-korean.ldf>
+% \fi
+% \clearpage
+%
+% \subsection{gloss-korean.ldf}
+% \begin{macrocode}
+\ProvidesFile{gloss-korean.ldf}[polyglossia: module for Korean]
+
+\PolyglossiaSetup{korean}{
+ script=Hangul,
+ scripttag=hang,
+ language=Korean,
+ langtag=KOR,
+ hyphennames={english,american,usenglish,USenglish},
+ hyphenmins={2,3},
+ frenchspacing=true,
+ fontsetup=true
+}
+
+\def\captionskorean{%
+ \def\partname##1##2{제##1##2 편}%
+ \def\chaptername{장}%
+ \def\refname{참고문헌}%
+ \def\abstractname{요약}%
+ \def\bibname{참고문헌}%
+ \def\prefacename{서문}%
+ \def\appendixname{부록}%
+ \def\contentsname{차례}%
+ \def\listfigurename{그림 차례}%
+ \def\listtablename{표 차례}%
+ \def\indexname{찾아보기}%
+ \def\figurename{그림}%
+ \def\tablename{표}%
+ \def\pagename{페이지}%
+ \def\seename{$rightarrow$}%
+ \def\alsoname{$Rightarrow$}%
+ \def\enclname{동봉}%
+ \def\proofname{증명}%
+ \def\headtoname{수신:}%
+ \def\ccname{사본}%
+}
+\def\xpg@korean@language{korean}
+\AtBeginDocument{
+ \ifx\xpg@main@language\xpg@korean@language
+ \@ifclassloaded{book}{\def\@chapapp#1#2{제#1#2#1\chaptername}}{
+ \@ifclassloaded{report}{\def\@chapapp#1#2{제#1#2#1\chaptername}}{}
+ }
+ \fi
+}
+
+\def\datekorean{%
+ \def\today{\the\year 년 \the\month 월 \the\day 일}%
+}
+
+\ifluatex
+\directlua{
+local nobreak_after = {
+ [0x28] = true, [0x3C] = true, [0x5B] = true, [0x60] = true, [0x7B] = true,
+ [0x2018] = true, [0x201C] = true, [0x3008] = true, [0x300A] = true,
+ [0x300C] = true, [0x300E] = true, [0x3010] = true, [0x3014] = true,
+ [0xFF08] = true, [0xFF1C] = true, [0xFF3B] = true, [0xFF5B] = true,
+}
+local nobreak_before = {
+ [0x21] = true, [0x22] = true, [0x27] = true, [0x29] = true, [0x2C] = true,
+ [0x2D] = true, [0x2E] = true, [0x2F] = true, [0x3A] = true, [0x3B] = true,
+ [0x3E] = true, [0x3F] = true, [0x5D] = true, [0x7D] = true, [0xB7] = true,
+ [0x2013] = true, [0x2014] = true, [0x2015] = true, [0x2019] = true,
+ [0x201D] = true, [0x2025] = true, [0x2026] = true, [0x3001] = true,
+ [0x3002] = true, [0x3009] = true, [0x300B] = true, [0x300D] = true,
+ [0x300F] = true, [0x3011] = true, [0x3015] = true, [0xFF01] = true,
+ [0xFF09] = true, [0xFF0C] = true, [0xFF0E] = true, [0xFF1A] = true,
+ [0xFF1B] = true, [0xFF1F] = true, [0xFF3D] = true, [0xFF5D] = true,
+ [0x3041] = true, [0x3043] = true, [0x3045] = true, [0x3047] = true,
+ [0x3049] = true, [0x3063] = true, [0x3083] = true, [0x3085] = true,
+ [0x3087] = true, [0x308E] = true, [0x3095] = true, [0x3096] = true,
+ [0x3099] = true, [0x309A] = true, [0x309B] = true, [0x309C] = true,
+ [0x309D] = true, [0x309E] = true, [0x30A0] = true, [0x30A1] = true,
+ [0x30A3] = true, [0x30A5] = true, [0x30A7] = true, [0x30A9] = true,
+ [0x30C3] = true, [0x30E3] = true, [0x30E5] = true, [0x30E7] = true,
+ [0x30EE] = true, [0x30F5] = true, [0x30F6] = true, [0x30FB] = true,
+ [0x30FC] = true, [0x30FD] = true, [0x30FE] = true,
+}
+for i=0x1160, 0x11FF do nobreak_before[i] = true end
+for i=0xD7B0, 0xD7FB do nobreak_before[i] = true end
+for i=0x302E, 0x302F do nobreak_before[i] = true end
+for i=0x31F0, 0x31FF do nobreak_before[i] = true end
+local is_cjk = function (c)
+ return (c >= 0xAC00 and c <= 0xD7A3)
+ or (c >= 0x1100 and c <= 0x115F)
+ or (c >= 0xA960 and c <= 0xA97C)
+ or (c >= 0x3400 and c <= 0x9FFF)
+ or (c >= 0xF900 and c <= 0xFAFF)
+ or (c >= 0x2E80 and c <= 0x2FFF)
+ or (c >= 0x3040 and c <= 0x30FF)
+ or (c >= 0x20000 and c <= 0x2CEAF)
+ or (c >= 0x2F800 and c <= 0x2FA1F)
+ or (nobreak_after[c] and c > 0xFF)
+ or (nobreak_before[c] and c > 0xFF)
+end
+local insert_penalty_glue = function (head, curr)
+ local penalty = node.new("penalty")
+ penalty.penalty = 50
+ local glue = node.new("glue")
+ local spec = node.new("glue_spec")
+ local size = fonts.hashes.identifiers[curr.font] or font.fonts[curr.font]
+ size = size and size.size or 655360
+ spec.width = 0
+ spec.stretch = size/10
+ spec.shrink = size/25
+ glue.spec = spec
+ head, curr = node.insert_after(head, curr, penalty)
+ head, curr = node.insert_after(head, curr, glue)
+ return head, curr
+end
+local korean_break = function (head)
+ local curr = head
+ while curr do
+ if curr.id == 37 then
+ local next = curr.next
+ if next and next.id == 37 then
+ local c, n = curr.char, next.char
+ if (is_cjk(c) or is_cjk(n)) and not nobreak_before[n] and not nobreak_after[c] then
+ head, curr = insert_penalty_glue(head, curr)
+ end
+ end
+ end
+ curr = curr.next
+ end
+ return head
+end
+local reorder_tm = function (head)
+ local tone
+ local curr = node.tail(head)
+ while curr do
+ if curr.id == 37 then
+ local c, wd = curr.char, curr.width
+ if (c == 0x302E or c == 0x302F) and wd and wd > 0 then
+ tone = curr
+ elseif tone and not nobreak_before[c] then
+ head = node.remove(head, tone)
+ tone.next, tone.prev = nil, nil
+ head, curr = node.insert_before(head, curr, tone)
+ tone = nil
+ end
+ end
+ curr = curr.prev
+ end
+ return head
+end
+local loaded
+polyglossia.add_korean_break = function ()
+ if not loaded then
+ luatexbase.add_to_callback ("pre_linebreak_filter", reorder_tm, "polyglossia.reorder_korean_tm", 1)
+ luatexbase.add_to_callback ("pre_linebreak_filter", korean_break, "polyglossia.korean_break", 1)
+ luatexbase.add_to_callback ("hpack_filter", reorder_tm, "polyglossia.reorder_korean_tm", 1)
+ loaded = true
+ end
+end
+polyglossia.remove_korean_break = function ()
+ if loaded then
+ luatexbase.remove_from_callback ("hpack_filter", "polyglossia.reorder_korean_tm")
+ luatexbase.remove_from_callback ("pre_linebreak_filter", "polyglossia.korean_break")
+ luatexbase.remove_from_callback ("pre_linebreak_filter", "polyglossia.reorder_korean_tm")
+ loaded = false
+ end
+end
+}
+\fi
+
+\def\noextras@korean{%
+ \ifxetex
+ \XeTeXlinebreaklocale ""
+ \else
+ \directlua{polyglossia.remove_korean_break()}%
+ \fi
+ \ifdefined\xpg@orig@baselinestretch \xpg@orig@baselinestretch \fi
+ \ifdefined\xpg@orig@footnotesep \xpg@orig@footnotesep \fi
+}
+
+\def\inlineextras@korean{%
+ \ifxetex
+ \XeTeXlinebreaklocale "ko"
+ \XeTeXlinebreakpenalty 50
+ \XeTeXlinebreakskip 0pt plus.1em minus .04em
+ \else
+ \directlua{polyglossia.add_korean_break()}%
+ \fi
+}
+
+\def\blockextras@korean{%
+ \inlineextras@korean
+ \xdef\xpg@orig@baselinestretch{\def\noexpand\baselinestretch{\ifdefined\baselinestretch\baselinestretch\else 1\fi}}%
+ \def\baselinestretch{1.3888}\selectfont
+ \xdef\xpg@orig@footnotesep{\noexpand\footnotesep=\ifdefined\footnotesep\the\footnotesep\else 0pt\fi}%
+ \footnotesep=1.3888\footnotesep
+}
+
+% vim:tw=72:sw=4:ts=4:expandtab
+% \end{macrocode}
+% \iffalse
+%</gloss-korean.ldf>
%<*gloss-lao.ldf>
% \fi
% \clearpage
@@ -8406,7 +8608,7 @@ polyglossia.enable_hyphenation = enable_hyphenation
¦----------------------------------------------¦
¦ ¦
- ¦ THE POLYGLOSSIA PACKAGE v1.33.7 ¦
+ ¦ THE POLYGLOSSIA PACKAGE v1.40.0 ¦
¦ ¦
¦ Modern multilingual typesetting ¦
¦ with XeLaTeX and LuaLaTeX ¦
diff --git a/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf b/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
new file mode 100644
index 00000000000..46dc702150c
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/polyglossia/gloss-korean.ldf
@@ -0,0 +1,192 @@
+\ProvidesFile{gloss-korean.ldf}[polyglossia: module for Korean]
+
+\PolyglossiaSetup{korean}{
+ script=Hangul,
+ scripttag=hang,
+ language=Korean,
+ langtag=KOR,
+ hyphennames={english,american,usenglish,USenglish},
+ hyphenmins={2,3},
+ frenchspacing=true,
+ fontsetup=true
+}
+
+\def\captionskorean{%
+ \def\partname##1##2{제##1##2 편}%
+ \def\chaptername{장}%
+ \def\refname{참고문헌}%
+ \def\abstractname{요약}%
+ \def\bibname{참고문헌}%
+ \def\prefacename{서문}%
+ \def\appendixname{부록}%
+ \def\contentsname{차례}%
+ \def\listfigurename{그림 차례}%
+ \def\listtablename{표 차례}%
+ \def\indexname{찾아보기}%
+ \def\figurename{그림}%
+ \def\tablename{표}%
+ \def\pagename{페이지}%
+ \def\seename{$rightarrow$}%
+ \def\alsoname{$Rightarrow$}%
+ \def\enclname{동봉}%
+ \def\proofname{증명}%
+ \def\headtoname{수신:}%
+ \def\ccname{사본}%
+}
+\def\xpg@korean@language{korean}
+\AtBeginDocument{
+ \ifx\xpg@main@language\xpg@korean@language
+ \@ifclassloaded{book}{\def\@chapapp#1#2{제#1#2#1\chaptername}}{
+ \@ifclassloaded{report}{\def\@chapapp#1#2{제#1#2#1\chaptername}}{}
+ }
+ \fi
+}
+
+\def\datekorean{%
+ \def\today{\the\year 년 \the\month 월 \the\day 일}%
+}
+
+\ifluatex
+\directlua{
+local nobreak_after = {
+ [0x28] = true, [0x3C] = true, [0x5B] = true, [0x60] = true, [0x7B] = true,
+ [0x2018] = true, [0x201C] = true, [0x3008] = true, [0x300A] = true,
+ [0x300C] = true, [0x300E] = true, [0x3010] = true, [0x3014] = true,
+ [0xFF08] = true, [0xFF1C] = true, [0xFF3B] = true, [0xFF5B] = true,
+}
+local nobreak_before = {
+ [0x21] = true, [0x22] = true, [0x27] = true, [0x29] = true, [0x2C] = true,
+ [0x2D] = true, [0x2E] = true, [0x2F] = true, [0x3A] = true, [0x3B] = true,
+ [0x3E] = true, [0x3F] = true, [0x5D] = true, [0x7D] = true, [0xB7] = true,
+ [0x2013] = true, [0x2014] = true, [0x2015] = true, [0x2019] = true,
+ [0x201D] = true, [0x2025] = true, [0x2026] = true, [0x3001] = true,
+ [0x3002] = true, [0x3009] = true, [0x300B] = true, [0x300D] = true,
+ [0x300F] = true, [0x3011] = true, [0x3015] = true, [0xFF01] = true,
+ [0xFF09] = true, [0xFF0C] = true, [0xFF0E] = true, [0xFF1A] = true,
+ [0xFF1B] = true, [0xFF1F] = true, [0xFF3D] = true, [0xFF5D] = true,
+ [0x3041] = true, [0x3043] = true, [0x3045] = true, [0x3047] = true,
+ [0x3049] = true, [0x3063] = true, [0x3083] = true, [0x3085] = true,
+ [0x3087] = true, [0x308E] = true, [0x3095] = true, [0x3096] = true,
+ [0x3099] = true, [0x309A] = true, [0x309B] = true, [0x309C] = true,
+ [0x309D] = true, [0x309E] = true, [0x30A0] = true, [0x30A1] = true,
+ [0x30A3] = true, [0x30A5] = true, [0x30A7] = true, [0x30A9] = true,
+ [0x30C3] = true, [0x30E3] = true, [0x30E5] = true, [0x30E7] = true,
+ [0x30EE] = true, [0x30F5] = true, [0x30F6] = true, [0x30FB] = true,
+ [0x30FC] = true, [0x30FD] = true, [0x30FE] = true,
+}
+for i=0x1160, 0x11FF do nobreak_before[i] = true end
+for i=0xD7B0, 0xD7FB do nobreak_before[i] = true end
+for i=0x302E, 0x302F do nobreak_before[i] = true end
+for i=0x31F0, 0x31FF do nobreak_before[i] = true end
+local is_cjk = function (c)
+ return (c >= 0xAC00 and c <= 0xD7A3)
+ or (c >= 0x1100 and c <= 0x115F)
+ or (c >= 0xA960 and c <= 0xA97C)
+ or (c >= 0x3400 and c <= 0x9FFF)
+ or (c >= 0xF900 and c <= 0xFAFF)
+ or (c >= 0x2E80 and c <= 0x2FFF)
+ or (c >= 0x3040 and c <= 0x30FF)
+ or (c >= 0x20000 and c <= 0x2CEAF)
+ or (c >= 0x2F800 and c <= 0x2FA1F)
+ or (nobreak_after[c] and c > 0xFF)
+ or (nobreak_before[c] and c > 0xFF)
+end
+local insert_penalty_glue = function (head, curr)
+ local penalty = node.new("penalty")
+ penalty.penalty = 50
+ local glue = node.new("glue")
+ local spec = node.new("glue_spec")
+ local size = fonts.hashes.identifiers[curr.font] or font.fonts[curr.font]
+ size = size and size.size or 655360
+ spec.width = 0
+ spec.stretch = size/10
+ spec.shrink = size/25
+ glue.spec = spec
+ head, curr = node.insert_after(head, curr, penalty)
+ head, curr = node.insert_after(head, curr, glue)
+ return head, curr
+end
+local korean_break = function (head)
+ local curr = head
+ while curr do
+ if curr.id == 37 then
+ local next = curr.next
+ if next and next.id == 37 then
+ local c, n = curr.char, next.char
+ if (is_cjk(c) or is_cjk(n)) and not nobreak_before[n] and not nobreak_after[c] then
+ head, curr = insert_penalty_glue(head, curr)
+ end
+ end
+ end
+ curr = curr.next
+ end
+ return head
+end
+local reorder_tm = function (head)
+ local tone
+ local curr = node.tail(head)
+ while curr do
+ if curr.id == 37 then
+ local c, wd = curr.char, curr.width
+ if (c == 0x302E or c == 0x302F) and wd and wd > 0 then
+ tone = curr
+ elseif tone and not nobreak_before[c] then
+ head = node.remove(head, tone)
+ tone.next, tone.prev = nil, nil
+ head, curr = node.insert_before(head, curr, tone)
+ tone = nil
+ end
+ end
+ curr = curr.prev
+ end
+ return head
+end
+local loaded
+polyglossia.add_korean_break = function ()
+ if not loaded then
+ luatexbase.add_to_callback ("pre_linebreak_filter", reorder_tm, "polyglossia.reorder_korean_tm", 1)
+ luatexbase.add_to_callback ("pre_linebreak_filter", korean_break, "polyglossia.korean_break", 1)
+ luatexbase.add_to_callback ("hpack_filter", reorder_tm, "polyglossia.reorder_korean_tm", 1)
+ loaded = true
+ end
+end
+polyglossia.remove_korean_break = function ()
+ if loaded then
+ luatexbase.remove_from_callback ("hpack_filter", "polyglossia.reorder_korean_tm")
+ luatexbase.remove_from_callback ("pre_linebreak_filter", "polyglossia.korean_break")
+ luatexbase.remove_from_callback ("pre_linebreak_filter", "polyglossia.reorder_korean_tm")
+ loaded = false
+ end
+end
+}
+\fi
+
+\def\noextras@korean{%
+ \ifxetex
+ \XeTeXlinebreaklocale ""
+ \else
+ \directlua{polyglossia.remove_korean_break()}%
+ \fi
+ \ifdefined\xpg@orig@baselinestretch \xpg@orig@baselinestretch \fi
+ \ifdefined\xpg@orig@footnotesep \xpg@orig@footnotesep \fi
+}
+
+\def\inlineextras@korean{%
+ \ifxetex
+ \XeTeXlinebreaklocale "ko"
+ \XeTeXlinebreakpenalty 50
+ \XeTeXlinebreakskip 0pt plus.1em minus .04em
+ \else
+ \directlua{polyglossia.add_korean_break()}%
+ \fi
+}
+
+\def\blockextras@korean{%
+ \inlineextras@korean
+ \xdef\xpg@orig@baselinestretch{\def\noexpand\baselinestretch{\ifdefined\baselinestretch\baselinestretch\else 1\fi}}%
+ \def\baselinestretch{1.3888}\selectfont
+ \xdef\xpg@orig@footnotesep{\noexpand\footnotesep=\ifdefined\footnotesep\the\footnotesep\else 0pt\fi}%
+ \footnotesep=1.3888\footnotesep
+}
+
+% vim:tw=72:sw=4:ts=4:expandtab
diff --git a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
index 60874616eef..35d83883633 100644
--- a/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
+++ b/Master/texmf-dist/tex/latex/polyglossia/polyglossia.sty
@@ -1,5 +1,5 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{polyglossia}[2015/07/04 v1.33.7
+\ProvidesPackage{polyglossia}[2015/07/07 v1.40.0
Alternative to Babel for XeLaTeX and LuaLaTeX]
\RequirePackage{etoolbox}
\RequirePackage{makecmds}