summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/ChangeLog7
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/README2
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdfbin324946 -> 218293 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex57
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty49
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua6
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko.lua65
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko.sty67
9 files changed, 124 insertions, 135 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexko/ChangeLog b/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
index 475b5ffaed3..ea0cfb49bfc 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
+++ b/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
@@ -1,3 +1,10 @@
+2015-01-16 Dohyun Kim <nomos at ktug org>
+
+ Version 1.7
+
+ * luatexko.sty: package option [unfonts] is removed
+ * *.lua, *.sty: minor fixes and updated copyright year
+
2014-06-17 Dohyun Kim <nomos at ktug org>
Version 1.6
diff --git a/Master/texmf-dist/doc/luatex/luatexko/README b/Master/texmf-dist/doc/luatex/luatexko/README
index 298549704d3..cafd7c6d422 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/README
+++ b/Master/texmf-dist/doc/luatex/luatexko/README
@@ -1,4 +1,4 @@
-LuaTeX-ko Package version 1.6 (2014/06/17)
+LuaTeX-ko Package version 1.7 (2015/01/16)
==========================================
This is a Lua(La)TeX macro package that supports typesetting Korean
diff --git a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
index 6ac1f6c731e..3f8991cccea 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
index 59ac82224dc..8424a4b13cd 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
+++ b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
@@ -17,8 +17,11 @@
InterLatinCJK=.125em,
Expansion, Protrusion,
]
-\setsanshangulfont{KoPubDotum_Pro}[
- UprightFont=* Light,
+\setsanshangulfont{Source Han Sans K}[
+ CharRaise=-0.1ex,
+ Script=Hangul,
+ Language=Korean,
+ UprightFont=* Normal,
BoldFont=* Bold,
InterLatinCJK=.125em,
]
@@ -47,7 +50,7 @@
\title{\luatexko\ 간단 매뉴얼}
\author{Dohyun Kim \normalsize |<nomos at ktug org>| \and
\normalsize \url{<http://github.com/dohyunkim/luatexko>}}
-\date{Version 1.6\quad 2014/06/17}
+\date{Version 1.7\quad 2015/01/16}
\maketitle
\begin{quote}\small
@@ -56,8 +59,6 @@
\begin{itemize}\linespread{1.1}\selectfont
\item[v1.0] ------
\item \hyperref[sec:loading]{플레인텍에서도 luatexko.sty을 불러야 한다.}
- \item \hyperref[sec:packageopt]{패키지 옵션 |unfonts|가 선언되지 않으면
- 은글꼴을 자동으로 부르지 않는다.}
\item \hyperref[sec:fontoption]{글꼴 옵션값을 |<dimen>|으로 지시한다.}
\item \hyperref[sec:metapost]{\MP\ 코드를 넣으려면 luamplib 패키지를
불러야 한다.}
@@ -78,6 +79,9 @@
\item \hyperref[sec:fontoption]{글꼴 옵션 |[NoEmbedding]|이 추가되었다.}
\item \hyperref[sec:fontcmds]{main/sans hangul/hanja/fallback 폰트의
디폴트 옵션으로 |[Ligatures=TeX]|이 주어진다.}
+ \item[v1.7] ------
+ \item 패키지 옵션 |[unfonts]|를 더는 지원하지 않는다. 이 옵션을 사용한
+ 기존 문서는 기본 글꼴인 나눔 Type1으로 식자될 것이다.
\end{itemize}
\end{quote}
@@ -90,7 +94,8 @@
\section{}\label{sec:loading}
\luatexko\ 로드하기: \cs{usepackage{luatexko}} 혹은 \cs{usepackage{kotex}}.
-플레인텍에서는 \cs{input luatexko.sty}. 입력은 원칙적으로 UTF-8으로 한다.
+플레인텍에서는 \cs{input luatexko.sty} 혹은 \cs{input kotexplain}.
+입력은 원칙적으로 UTF-8으로 한다.
BOM (Byte Order Mark)은 있어도 좋고 없어도 좋다.
CP949 인코딩에 관해서는 제\ref{sec:uhcencoding}절 참조.
@@ -100,11 +105,6 @@ CP949 인코딩에 관해서는 제\ref{sec:uhcencoding}절 참조.
장(chapter) 제목과 편(part) 제목에만 ``제(第)''가 붙어 ``제~1 편''
``제~3 장''과 같은 방식으로 표시되며 절 제목 이하에는 붙지 않는다.
-|[unfonts]|는 은글꼴 트루타입을 불러오는 패키지 옵션이다.\footnote{%
- |nofontspec| 옵션과 함께 사용할 수 없다. 또한 이 옵션은
- deprecated 상태로서 2015년에는 사라질 예정이다.}
-이전 버전과 달리 은글꼴이 기본으로 로드되지 않음에 유의할 것.
-
|[nofontspec]| 옵션을 주면 fontspec을 부르지 않는다.
따라서 아래 \ref{sec:fontcmds}, \ref{sec:fontswitch}, \ref{sec:fontoption},
\ref{sec:verttype}, \ref{sec:mathhangul}절의 유니코드 한국어 글꼴 설정
@@ -160,12 +160,14 @@ CP949 인코딩에 관해서는 제\ref{sec:uhcencoding}절 참조.
\registerpunctuations{45, "2D, `-}
\unregisterpunctuations{"2D, "2015}
\end{verbatim}
+이들 두 명령은 항상 전역적 효과를 가진다.
\section{}\label{sec:fontoption}
fontspec의 글꼴 옵션 외에 \luatexko가 따로 제공하는 것들이
있다.\footnote{ 옛한글 식자를 위해서는
- |[Script=Hangul]| 옵션을 사용하는 것으로 충분하다.}
+ |[Script=Hangul]| 옵션을 사용하는 것으로 충분하다.
+ 플레인텍이라면 |script=hang|.}
그러나 \cs{defaulthangulfontfeatures} 따위 명령은 따로 구현돼 있지 않으며,
설혹 사용하더라도 fontspec의 \cs{defaultfontfeatures}와 같은 효과를 가진다.
@@ -174,8 +176,7 @@ fontspec의 글꼴 옵션 외에 \luatexko가 따로 제공하는 것들이
\begin{figure}
\fboxsep=1em
\fbox{\parbox{\dimexpr\linewidth-2.1em\relax}{%
- \fontspec{HCR Dotum LVT}[Script=Hangul,Ligatures=Required]
- \leftskip2.5cm
+ \sffamily \leftskip2.5cm
뎨 가ᄂᆞᆫ 뎌 각시 본 듯도 ᄒᆞᆫ뎌이고.\\
天텬上상白ᄇᆡᆨ玉옥京경을 엇디ᄒᆞ야 離니別별ᄒᆞ고\\
ᄒᆡ 다 져믄 날의 눌을 보라 가시ᄂᆞᆫ고
@@ -258,15 +259,18 @@ fontspec의 글꼴 옵션 외에 \luatexko가 따로 제공하는 것들이
\section{}
고문헌·일본어·중국어 조판을 위해 japanese, Schinese, Tchinese 환경을
제공한다. chinese는 Schinese의 다른 이름이다. korean 환경도
-마련했는데 이들 환경 안에서 잠깐 한국어를 조판하는 데
-사용한다. 일본어·중국어라도 글꼴 설정은 \cs{newhangulfontfamily}
-\cs{newhanjafontfamily} 따위를 이용한다. 그림~\ref{fig:ancientdoc} 참조.
+마련했는데 이들 환경 안에서 잠깐 한국어를 조판하는 데 사용한다.
+일반적으로 우리 고문헌 조판에는 japanese 환경을 이용하면 무난하다.
+그림~\ref{fig:ancientdoc} 참조.
플레인텍에서는 {\small(문서 전체에 적용하지 않는다면 그룹을 열고)}
\cs{chinese} \cs{japanese} 따위를 사용한다.
+일본어·중국어라도 글꼴 설정은 \cs{newhangulfontfamily}
+\cs{newhanjafontfamily} 따위를 이용한다.
+
\begin{figure}
\centering
- \fbox{\parbox{37em}{\begin{chinese}\setmainfont{STFangsong}
+ \fbox{\parbox{37em}{\japanese\sffamily
子曰:「學而時習之,不亦說乎?有朋自遠方來,不亦樂乎?人不知而不慍,
不亦君子乎?」\par
有子曰:「其爲人也孝弟,而好犯上者,鮮矣!不好犯上,而好作亂者,未之有也!
@@ -276,8 +280,8 @@ fontspec의 글꼴 옵션 외에 \luatexko가 따로 제공하는 것들이
不習乎?」\par
子曰:「道千乘之國,敬事而信,節用而愛人,使民以時。」\par
子曰:「弟子入則孝,出則弟;謹而信,汎愛衆;而親仁,行有餘力,則以學文。」
- \end{chinese}}}
-\caption{고문헌 조판 보기}\label{fig:ancientdoc}
+ }}
+\caption{고문헌 조판 보기. japanese 환경을 이용했다.}\label{fig:ancientdoc}
\end{figure}
\luatexko가 글자 사이에 삽입하는 미세간격을 사용자가 영(zero)으로
@@ -287,9 +291,8 @@ fontspec의 글꼴 옵션 외에 \luatexko가 따로 제공하는 것들이
\section{}\label{sec:verttype}
세로쓰기는 폰트의 고급 오픈타입 자질을 이용하므로 폰트가 이를 지원해야
가능한 일이다. 폰트에 |Vertical=RotatedGlyphs| 옵션을 준다.
-플레인텍이라면 |vertical;+vrt2| 옵션. |vrt2| 자질을 갖지 않는 폰트를 쓰는
-경우 |vert| 자질을 명시해주어야 한다. 둘 다 없으면 세로쓰기에 적합하지 않은
-글꼴이다.
+플레인텍이라면 |vertical;+vrt2| 옵션.\footnote{|vrt2| 자질이 없는 폰트라면
+ |vert|를 가져야 한다. 둘 다 없으면 세로쓰기에 적합치 않은 글꼴이다.}
세로쓰기에는 \hemph{\luatex\ 0.79 이상}, 즉 \texlive\ 2014 이후
버전이 필요하다.
@@ -300,7 +303,9 @@ fontspec의 글꼴 옵션 외에 \luatexko가 따로 제공하는 것들이
\begin{figure}
\framebox[\linewidth]{\begin{vertical}{17em}
-\fontspec{Adobe Myungjo Std}[Vertical=RotatedGlyphs,RawFeature=+vhal]
+ \sffamily
+ \addhangulfontfeature{Vertical=RotatedGlyphs,
+ CharacterWidth=Full, CharRaise=0.1ex, }
\parindent-1em\leftskip1em \linespread{1.5}\selectfont
\noindent 님의 침묵(The Silent Beloved)
\smallbreak
@@ -312,7 +317,6 @@ fontspec의 글꼴 옵션 외에 \luatexko가 따로 제공하는 것들이
黃金의꽃가티 굿고빗나든 옛盟誓는 차듸찬띠끌이되야서 한숨의 微風에
나러갓슴니다\par
날카로은 첫〈키쓰〉의追憶은 나의運命의指針을 돌너노코 뒷거름처서 사러젓슴니다\par
-%…… \par
\hellipsis\par
아아 님은갓지마는 나는 님을보내지 아니하얏슴니다\par
제곡조를못이기는 사랑의노래는 님의沈默을 휩싸고돔니다\par
@@ -452,8 +456,7 @@ ulem 패키지가 \luatexko와 궁합이 잘 맞지 않아{\small (줄바꿈에
PDF에서 텍스트로 추출할 수 있게 해준다. 인자가 두 페이지에 나눠지지 않도록
유의한다. 모든 PDF 리더가 이를 지원하는 것은 아니다. 예:
$\actualtext{\sqrt 2}$,
-{\fontspec{HCR Dotum LVT}[Script=Hangul,Ligatures=Required]
-\actualtext{ᄆᆞᄎᆞᆷ〮내〯}}.
+{\sffamily \actualtext{ᄆᆞᄎᆞᆷ〮내〯}}.
인자가 글자 없이 그림으로만 돼있다면 \cs{actualtext*{...}} 방식을 이용한다.
\section{}
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty b/Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty
index 5cddf331113..1c1f7cf46a6 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty
@@ -1,6 +1,6 @@
% luatexko-core.sty
%
-% Copyright (c) 2013-2014 Dohyun Kim <nomos at ktug org>
+% Copyright (c) 2013-2015 Dohyun Kim <nomos at ktug org>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -10,12 +10,13 @@
% and version 1.3c or later is part of all distributions of LaTeX
% version 2006/05/20 or later.
-\ifx\ProvidesPackage\undefined
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname selectfont\endcsname\relax
\input luaotfload.sty
\ifcsname ifpdf\endcsname\else \input ifpdf.sty \fi
\catcode`@ = 11
\else
- \ProvidesPackage{luatexko-core}[2014/06/17 v1.6 Typesetting Korean with LuaTeX]
+ \ProvidesPackage{luatexko-core}[2015/01/16 v1.7 Typesetting Korean with LuaTeX]
\RequirePackage{luaotfload}[2013/05/23]
\fi
@@ -100,11 +101,7 @@
\vrule width\z@ height.88em depth\z@\relax #1}%
\setbox\tw@\hbox{% ruby
\ifdefined\rubyfont \rubyfont \fi
- \ifcsname selectfont\endcsname
- \expandafter\dimen@\pdffontsize\font
- \dimen@\rubysize\dimen@
- \fontsize\dimen@\dimen@\selectfont
- \else
+ \expandafter\ifx\csname selectfont\endcsname\relax % plain
\ifdefined\rubyfont \else
\luatexko@resize@font\font\resized@font\font\rubysize
\ifdefined\hangul@font
@@ -117,6 +114,10 @@
\luatexko@resize@font\fallbackfont{}\fallback@font\rubysize
\fi
\fi
+ \else % latex
+ \expandafter\dimen@\pdffontsize\font
+ \dimen@\rubysize\dimen@
+ \fontsize\dimen@\dimen@\selectfont
\fi #2}\ht\tw@\z@\dp\tw@\z@
\directlua{%
luatexko.rubynode[\the\luakorubyattrcnt] = {
@@ -126,7 +127,8 @@
\leavevmode\box\z@
\endgroup}
-\ifcsname selectfont\endcsname\else
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname selectfont\endcsname\relax
% font resize under plain tex
\begingroup\edef\x{\endgroup
\def\noexpand\rem@vesizepart##1\detokenize{ at}##2\noexpand\end{##1}}\x
@@ -171,13 +173,8 @@
}
% do not veticalize headline/footline
-\ifdefined\ProvidesPackage % for latex
- \def\verticaltypesetting{%
- \maxdepth\z@ \luatexko@vertical
- \dimen@\textwidth \textwidth\textheight \textheight\dimen@
- \edef\@outputpage{\unexpanded{\luatexkorotatebox\@outputbox
- \textwidth\textheight}\unexpanded\expandafter{\@outputpage}}}
-\else % for plain
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname selectfont\endcsname\relax % plain
\def\verticaltypesetting{%
\dimen@\hsize\hsize\vsize\vsize\dimen@
\edef\plainoutput{\unexpanded{\dimen@\hsize\hsize\vsize\vsize\dimen@}%
@@ -185,6 +182,12 @@
\def\pagebody{\setbox\z@\vbox to\hsize{\boxmaxdepth=\maxdepth
\pagecontents}\luatexkorotatebox\z@\box\z@}%
\maxdepth\z@ \luatexko@vertical}
+\else % latex
+ \def\verticaltypesetting{%
+ \maxdepth\z@ \luatexko@vertical
+ \dimen@\textwidth \textwidth\textheight \textheight\dimen@
+ \edef\@outputpage{\unexpanded{\luatexkorotatebox\@outputbox
+ \textwidth\textheight}\unexpanded\expandafter{\@outputpage}}}
\fi
%% underline using post_linebreak_filter
@@ -278,7 +281,8 @@
\ifnum\count@<"#2
\advance\count@\@ne
\repeat}
-\ifdefined\ProvidesPackage\else
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname selectfont\endcsname\relax
% for plain; see luatexko.sty for latex
\newfam\symmathhangul
\def\setmathhangulfont#1#{\setmathhangul@font@}
@@ -371,11 +375,18 @@
\expandafter\actualtext@\expandafter*%
\fi
}
-\def\actualtext@#1#2{%
+\def\actualtext@{%
+ \begingroup
+ \catcode`\\=12 \catcode`\$=12 \catcode`\&=12 \catcode`\#=12
+ \catcode`\^=12 \catcode`\_=12 \catcode`\~=12 %catcode`\%=12
+ \actualtext@@
+}
+\def\actualtext@@#1#2{%
+ \endgroup
\luatexko@pdfspecial{/Span<</ActualText\directlua{
luatexko.actualtext("\luatexluaescapestring{\detokenize{#2}}")
}>>BDC}%
- #2%
+ \luatexscantextokens{#2}%
\ifx*#1%
\begingroup
\ifdefined\actualtext@spacefont\else
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua b/Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua
index 32377748f24..83909ca6b79 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua
@@ -1,6 +1,6 @@
-- luatexko-normalize.lua
--
--- Copyright (c) 2013-2014 Dohyun Kim <nomos at ktug org>
+-- Copyright (c) 2013-2015 Dohyun Kim <nomos at ktug org>
--
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3c
@@ -12,8 +12,8 @@
luatexbase.provides_module({
name = "luatexko-normalize",
- version = 1.6,
- date = "2014/06/17",
+ version = 1.7,
+ date = "2015/01/16",
author = "Dohyun Kim",
description = "Hangul normalization",
license = "LPPL v1.3+",
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua b/Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua
index 95c29ac71bd..068b35434f2 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua
@@ -1,6 +1,6 @@
-- luatexko-uhc2utf8.lua
--
--- Copyright (c) 2013-2014 Dohyun Kim <nomos at ktug org>
+-- Copyright (c) 2013-2015 Dohyun Kim <nomos at ktug org>
--
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3c
@@ -12,8 +12,8 @@
luatexbase.provides_module({
name = "luatexko-uhc2utf8",
- version = 1.6,
- date = "2014/06/17",
+ version = 1.7,
+ date = "2015/01/16",
author = "Dohyun Kim",
description = "UHC (CP949) input encoding",
license = "LPPL v1.3+",
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua b/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
index fd0c5c1d68c..e9cad856664 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
@@ -1,6 +1,6 @@
-- luatexko.lua
--
--- Copyright (c) 2013-2014 Dohyun Kim <nomos at ktug org>
+-- Copyright (c) 2013-2015 Dohyun Kim <nomos at ktug org>
--
-- This work may be distributed and/or modified under the
-- conditions of the LaTeX Project Public License, either version 1.3c
@@ -12,8 +12,8 @@
local err,warn,info,log = luatexbase.provides_module({
name = 'luatexko',
- date = '2014/06/17',
- version = 1.6,
+ date = '2015/01/16',
+ version = 1.7,
description = 'Korean linebreaking and font-switching',
author = 'Dohyun Kim',
license = 'LPPL v1.3+',
@@ -266,12 +266,12 @@ local prebreakpenalty = {
[0x0022] = 10000,
[0x0027] = 10000,
[0x0029] = 10000,
- [0x002A] = 500,
- [0x002B] = 500,
+ [0x002A] = 5000, -- 500, -- *
+ [0x002B] = 5000, -- 500, -- +
[0x002C] = 10000,
[0x002D] = 10000,
[0x002E] = 10000,
- [0x002F] = 500,
+ [0x002F] = 5000, -- 500, -- /
[0x003A] = 10000,
[0x003B] = 10000,
[0x003E] = 10000, -- >
@@ -284,11 +284,11 @@ local prebreakpenalty = {
[0x2015] = 10000,
[0x2019] = 10000,
[0x201D] = 10000,
- [0x2025] = 250,
- [0xFE30] = 250,
- [0x2026] = 250,
- [0xFE19] = 250,
- [0x2212] = 200,
+ [0x2025] = 5000, -- 250, -- ‥
+ [0xFE30] = 5000, -- 250, -- ︰
+ [0x2026] = 5000, -- 250, -- …
+ [0xFE19] = 5000, -- 250, -- ︙
+ [0x2212] = 5000, -- 200, -- − minus sign
[0x3001] = 10000,
[0xFE11] = 10000,
[0x3002] = 10000,
@@ -335,7 +335,7 @@ local prebreakpenalty = {
[0xFF01] = 10000,
[0xFF09] = 10000,
[0xFE36] = 10000,
- [0xFF0B] = 200,
+ [0xFF0B] = 5000, -- 200, -- +
[0xFF0C] = 10000,
[0xFE10] = 10000,
[0xFF0E] = 10000,
@@ -343,7 +343,7 @@ local prebreakpenalty = {
[0xFE13] = 10000,
[0xFF1B] = 10000,
[0xFE14] = 10000,
- [0xFF1D] = 200,
+ [0xFF1D] = 5000, -- 200, -- =
[0xFF1F] = 10000,
[0xFF3D] = 10000,
[0xFE48] = 10000,
@@ -600,13 +600,14 @@ end
local function get_unicode_char(curr)
local uni = curr.char
if (uni > 0xFF and uni < 0xE000) or (uni > 0xF8FF and uni < 0xF0000) then
- return uni -- no pua. no nanumgtm??
+ return uni -- no pua. no nanumgtm
+ end
+ if uni < 0xE000 or (uni > 0xF8FF and uni < 0xF0000) then -- no pua
+ uni = get_font_char(curr.font, curr.char)
+ uni = uni and uni.tounicode
+ uni = uni and string_sub(uni,1,4) -- seems ok for old hangul
+ if uni then return tonumber(uni,16) end
end
- -- tounicode is now reliable. backend is fixed
- uni = get_font_char(curr.font, curr.char)
- uni = uni and uni.tounicode
- uni = uni and string_sub(uni,1,4) -- seems ok for old hangul
- if uni then return tonumber(uni,16) end
uni = has_attribute(curr, luakounicodeattr)
if uni then return uni end
return curr.char
@@ -722,10 +723,13 @@ local function cjk_insert_nodes(head,curr,currchar,currfont,prevchar,prevfont)
end
end
--raise latin puncts]]
- if prebreakpenalty[currchar] then
+ if c == 5 and p == 5 then -- skip ------ ......
+ return currchar,currfont
+ end
+ if p and p < 10 and prebreakpenalty[currchar] then
was_penalty = true
insert_before(head,curr,get_penaltynode(prebreakpenalty[currchar]))
- elseif postbreakpenalty[prevchar] then
+ elseif c and c < 10 and postbreakpenalty[prevchar] then
was_penalty = true
insert_before(head,curr,get_penaltynode(postbreakpenalty[prevchar]))
end
@@ -1810,18 +1814,22 @@ local function cjk_vertical_font (vf)
v.width = vw
v.height = vh
v.depth = vh
+ v.italic = nil
end
--- vertical gpos
local res = vf.resources or {}
if res.verticalgposhack then
return vf -- avoid multiple running
end
+ local fea = vf.shared and vf.shared.features or {}
+ fea.kern = nil -- only for horizontal typesetting
+ fea.vert = true -- should be activated by default
local vposkeys = {}
local seq = res.sequences or {}
for _,v in ipairs(seq) do
if v.type == "gpos_single" and v.subtables then -- todo: gpos_pair...
local feature = v.features or {}
- if feature.vhal or feature.vkrn or feature.valt or feature.vpal then
+ if feature.vhal or feature.vkrn or feature.valt or feature.vpal or feature.vert then
for _,vv in ipairs(v.subtables) do
vposkeys[#vposkeys+1] = vv
end
@@ -1917,7 +1925,6 @@ local function tounicode_oldhangul (tfmdata)
local chrs = tfmdata.characters
if not desc or not chrs then return end
if not chrs[0x1100] then return end
- local last = 0
for _,v in ipairs({{0x1100,0x11FF},{0xA960,0xA97C},{0xD7B0,0xD7FB}}) do
for i = v[1],v[2] do
local ds = desc[i] and desc[i].slookups
@@ -1925,22 +1932,11 @@ local function tounicode_oldhangul (tfmdata)
for _,s in pairs(ds) do
if type(s) == "number" and s >= 0xF0000 and chrs[s] and not chrs[s].tounicode then
chrs[s].tounicode = stringformat("%04X",i)
- last = s > last and s or last
end
end
end
end
end
- if stringfind(tfmdata.fontname,"^HCR.+LVT") then
- local touni = "1112119E"
- for i = last+1, last+2 do
- local dsc,chr = desc[i],chrs[i]
- if dsc and chr and dsc.class == "ligature" and not chr.tounicode then
- chr.tounicode = touni
- end
- touni = touni.."11AB"
- end
- end
end
add_to_callback("luaotfload.patch_font",
@@ -1955,7 +1951,6 @@ add_to_callback("luaotfload.patch_font",
------------------------------------
local function actualtext (str)
local t = {}
- str = stringgsub(str,"##","#")
for uni in string.utfvalues(str) do
if uni < 0x10000 then
t[#t+1] = stringformat("%04X",uni)
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty b/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
index d7df0c2581c..49bdad415f9 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
@@ -1,6 +1,6 @@
% luatexko.sty
%
-% Copyright (c) 2013-2014 Dohyun Kim <nomos at ktug org>
+% Copyright (c) 2013-2015 Dohyun Kim <nomos at ktug org>
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -10,10 +10,10 @@
% and version 1.3c or later is part of all distributions of LaTeX
% version 2006/05/20 or later.
-\ifx\luatexkocatcodeofatchar\undefined\else
- \expandafter\endinput\fi % no multiple loading
-\ifx\ProvidesPackage\relax \let\ProvidesPackage\undefined \fi
-\ifx\ProvidesPackage\undefined % plain tex
+\ifx\luatexkocatcodeofatchar\undefined\else\endinput\fi % no multiple loading
+
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname selectfont\endcsname\relax % plain tex
\edef\luatexkocatcodeofatchar{\catcode`@=\the\catcode`@}
\input luatexko-core.sty
%\hangulfont{name:NanumGothic:interlatincjk=0.125em} at 10pt
@@ -22,16 +22,15 @@
\expandafter\endinput
\fi
-\ProvidesPackage{luatexko}[2014/06/17 v1.6 Typesetting Korean with LuaLaTeX]
+\ProvidesPackage{luatexko}[2015/01/16 v1.7 Typesetting Korean with LuaLaTeX]
%% package options
\newif\if@hangul
\newif\if@hanja
-\newif\if@unfonts
\newif\if@luatexko@loadfontspec\@luatexko@loadfontspectrue
\DeclareOption{hangul}{\@hangultrue}
\DeclareOption{hanja}{\@hangultrue\@hanjatrue}
-\DeclareOption{unfonts}{\@unfontstrue}
+\DeclareOption{unfonts}{}
\DeclareOption{nofontspec}{\@luatexko@loadfontspecfalse}
\ProcessOptions\relax
@@ -345,57 +344,31 @@
\edef\verbatim@font{\unexpanded\expandafter{\verbatim@font
\unsetluatexattribute\finemathattr}}
+\AtBeginDocument{
+\unless\ifdefined\serifhangul@font\let\serifhangul@font\sanshangul@font\fi
+\unless\ifdefined\sanshangul@font \let\sanshangul@font\serifhangul@font\fi
+\unless\ifdefined\monohangul@font \let\monohangul@font\sanshangul@font \fi
+\unless\ifdefined\serifhangul@font\unless\ifdefined\sanshangul@font
+ \hangulpunctuations=0 % nanumtype1
+\fi\fi
% don't forget to redefine \normalfont
\expandafter\ifx\familydefault\rmdefault
\protected\edef\normalfont{%
\unexpanded{\luatexko@serif@fonts}\unexpanded\expandafter{\normalfont}}
- \finemathattr\tw@
+ % and current hangul font
+ \luatexko@serif@fonts
\else\expandafter\ifx\familydefault\sfdefault
\protected\edef\normalfont{%
\unexpanded{\luatexko@sans@fonts}\unexpanded\expandafter{\normalfont}}
- \finemathattr\@ne
+ \luatexko@sans@fonts
\else
\protected\edef\normalfont{%
\unexpanded{\luatexko@mono@fonts}\unexpanded\expandafter{\normalfont}}
- \finemathattr\z@
+ \luatexko@mono@fonts
\fi\fi
\let\reset@font\normalfont
-
-\if@unfonts\if@luatexko@loadfontspec
- \setmainhangulfont[
- InterHangul=-0.04em,
- InterLatinCJK=0.125em,
- PunctRaise=-0.125em,
- Ligatures=TeX,
- SlantedFont=*, SlantedFeatures={FakeSlant=0.2},
- ItalicFont=*, ItalicFeatures={FakeSlant=0.2},
- BoldSlantedFont=*Bold, BoldSlantedFeatures={FakeSlant=0.2},
- BoldItalicFont=*Bold, BoldItalicFeatures={FakeSlant=0.2},
- ]{UnBatang}
- \setsanshangulfont[
- InterLatinCJK=0.125em,
- PunctRaise=-0.125em,
- Ligatures=TeX,
- SlantedFont=*, SlantedFeatures={FakeSlant=0.2},
- ItalicFont=*, ItalicFeatures={FakeSlant=0.2},
- BoldSlantedFont=*Bold, BoldSlantedFeatures={FakeSlant=0.2},
- BoldItalicFont=*Bold, BoldItalicFeatures={FakeSlant=0.2},
- ]{UnDotum}
- \setmonohangulfont[
- SlantedFont=*, SlantedFeatures={FakeSlant=0.2},
- ItalicFont=*, ItalicFeatures={FakeSlant=0.2},
- BoldSlantedFont=*Bold, BoldSlantedFeatures={FakeSlant=0.2},
- BoldItalicFont=*Bold, BoldItalicFeatures={FakeSlant=0.2},
- ]{UnDotum}
-\fi\fi
-
-\AtBeginDocument{
-\unless\ifdefined\serifhangul@font\let\serifhangul@font\sanshangul@font\fi
-\unless\ifdefined\sanshangul@font \let\sanshangul@font\serifhangul@font\fi
-\unless\ifdefined\monohangul@font \let\monohangul@font\sanshangul@font \fi
-\unless\ifdefined\serifhangul@font\unless\ifdefined\sanshangul@font
- \hangulpunctuations=0 % nanumtype1
-\fi\fi
+% reset hangul font
+\selectfont
% for hyperref
\@ifpackageloaded{hyperref}{\pdfstringdefDisableCommands{%
\let\dotemph\@firstofone