summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-05-20 22:04:14 +0000
committerKarl Berry <karl@freefriends.org>2013-05-20 22:04:14 +0000
commitdfc4de48df122c4541cc1d44ab0c498a43582a47 (patch)
tree3564307f58b85565b2b9c7badb0ea0c399f4a64d /Master/texmf-dist
parentf78323b8060c819726a015d8b6cfa051bb94ddda (diff)
luatexko (20may13)
git-svn-id: svn://tug.org/texlive/trunk@30597 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/ChangeLog13
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/README59
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdfbin465585 -> 466390 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex26
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty46
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko.lua32
-rw-r--r--Master/texmf-dist/tex/luatex/luatexko/luatexko.sty19
9 files changed, 93 insertions, 106 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexko/ChangeLog b/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
new file mode 100644
index 00000000000..e268d1f4584
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/luatexko/ChangeLog
@@ -0,0 +1,13 @@
+2013-05-19 Dohyun Kim <nomos at ktug org>
+
+ Version 1.1
+
+ * luatexko.sty: fix a bug regarding hyperref pdf string
+
+ * luatexko.lua, luatexko-core.sty: remove redundant code wrt.
+ font switching
+
+2013-05-10 Dohyun Kim <nomos at ktug org>
+
+ Initial release. Version 1.0
+
diff --git a/Master/texmf-dist/doc/luatex/luatexko/README b/Master/texmf-dist/doc/luatex/luatexko/README
index ed9cbeac029..c7b2f4ae660 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/README
+++ b/Master/texmf-dist/doc/luatex/luatexko/README
@@ -1,6 +1,5 @@
-=========================================
-LuaTeX-ko Package version 1.0 (2013/05/10)
-=========================================
+LuaTeX-ko Package version 1.1 (2013/05/19)
+==========================================
This is a Lua(La)TeX macro package that supports typesetting Korean
documents including Old Hangul texts. As LuaTeX has opened up access to
@@ -17,49 +16,62 @@ functionality.
License
-=======
-This package is licensed under LPPL (LaTeX Project Public License).
+-------
+
+This package is licensed under [LPPL](http://latex-project.org/lppl/)
+(LaTeX Project Public License) version 1.3c or later.
See each file for details.
Author
-======
-Please report any errors or suggestions to Dohyun Kim <nomos at ktug org>.
+------
+
+Please report any errors or suggestions to
+ Dohyun Kim <nomos at ktug org>
+or leave messages in the issue tracker at:
+ <http://github.com/dohyunkim/luatexko>
Files
-=====
+-----
+
+### TeXinputs
-TeXinputs
----------
luatexko.sty -> tex/luatex/luatexko/
luatexko-core.sty -> tex/luatex/luatexko/
luatexko.lua -> tex/luatex/luatexko/
luatexko-normalize.lua -> tex/luatex/luatexko/
luatexko-uhc2utf8.lua -> tex/luatex/luatexko/
-Documents
----------
+### Documents
+
luatexko-doc.pdf -> doc/luatex/luatexko/
luatexko-doc.tex -> doc/luatex/luatexko/
README (this file) -> doc/luatex/luatexko/
+ ChangeLog -> doc/luatex/luatexko/
Loading
-=======
+-------
+
For a LaTeX user, declaring
+
\usepackage{luatexko}
or
+
\usepackage{kotex}
is sufficient to load the package, which will load fontspec as well.
Notice that kotex.sty is a file provided by cjk-ko package.
-Under plain TeX: \input luatexko.sty
+Under plain TeX:
+
+ \input luatexko.sty
Package Options
-===============
+---------------
+
[hangul]
Load Hangul captions. Besides, this option adjusts interword and
interline spacing.
@@ -69,11 +81,12 @@ Load Hanja captions. Also adjusts spacing as [hangul] option does.
[unfonts]
Load font setting predefined for Un TrueType fonts available at
-http://kldp.net/projects/unfonts/.
+[this link](http://kldp.net/projects/unfonts/).
Hangul Font Commands
-====================
+--------------------
+
\setmainhangulfont
\setsanshangulfont
\setmonohangulfont
@@ -88,6 +101,7 @@ These fonts are used when the font loaded by \setmainfont or
\setmainhangulfont et. al. does not have Hanja glyphs.
In like manner, these commands are available as well:
+
\hangulfontspec
\hanjafontspec
\newhangulfontfamily
@@ -97,7 +111,8 @@ In like manner, these commands are available as well:
Hangul Font Options
-===================
+-------------------
+
[InterHangul=<dimen>]
Set spacing between Hangul characters.
@@ -115,7 +130,8 @@ Raise CJK characters by <dimen>.
Other User Commands
-===================
+-------------------
+
\luatexuhcinputencoding=<number>
When <number> is 1 or greater, UHC (aka. Windows CP949) input encoding
is allowed. <number> 0 restores UTF-8, the default input encoding.
@@ -133,6 +149,7 @@ Typeset ruby annotations.
\uwave{...}
\dashuline{...}
\dotuline{...}
-Same functionality as ulem package provides.
+Same functionality as those ulem package provides.
+
---END of README--
+*END of README*
diff --git a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.pdf
index 40d160d2280..1fe17dcecbf 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 58bd4200516..0b513f738f7 100644
--- a/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
+++ b/Master/texmf-dist/doc/luatex/luatexko/luatexko-doc.tex
@@ -1,24 +1,22 @@
%% !TEX program = lualatex
%% !TEX encoding = UTF-8
%%
+%% luatexko-doc.tex
+%%
%% written by Dohyun Kim <nomos at ktug org>
%% public domain
-%%
-%% $Id: luatexko-doc.tex,v 1.67 2011/07/20 09:56:06 nomos Exp $
\documentclass[a4paper]{article}
\usepackage{typearea}
\usepackage[hangul]{luatexko}
\usepackage{luamplib}
\setmainhangulfont[
- AutoFakeSlant,
InterLatinCJK=.125em,
QuoteRaise=.1em,
Expansion,
]{NanumMyeongjo}
-\setmainhanjafont[AutoFakeSlant]{UnBatang}
+\setmainhanjafont{UnBatang}
\setsanshangulfont[
- AutoFakeSlant,
InterLatinCJK=.125em,
]{NanumGothic}
\usepackage[svgnames]{xcolor}
@@ -39,7 +37,9 @@
\begin{document}
\title{\luatexko\ 간단 매뉴얼}
-\author{Dohyun Kim <|nomos at ktug org|>}
+\author{Dohyun Kim \normalsize <|nomos at ktug org|> \and
+ \normalsize <|http://github.com/dohyunkim/luatexko|>}
+\date{Version 1.1\quad\today}
\maketitle
\begin{quote}\small
@@ -50,16 +50,16 @@
\item 플레인텍에서도 luatexko.sty을 불러야 한다.
\item 패키지 옵션 |unfonts|가 선언되지 않으면 은글꼴을 자동으로
부르지 않는다.
- \item 글꼴 옵션에 |QuoteRaise|가 추가되었다.
+ \item 글꼴 옵션에 |QuoteRaise|가 추가되었다. 또한 옵션값을
+ |<dimen>|으로 지시한다.
\item 세로쓰기를 더 이상 공식적으로 지원하지 않는다.
\item \MP\ 코드를 넣으려면 luamplib 패키지를 불러야 한다.
\end{itemize}
\end{quote}
\section{}
-\texlive\ 2013 이상을 사용해야 한다. 실행 명령은 레이텍의 경우
-|lualatex|, 플레인텍은 |luatex|이다. 아직 \luatex은 베타 상태로 개발
-중에 있으므로 안정적인 동작을 보장하지 않는다.
+\hemph{\texlive\ 2013 이상}을 사용해야 한다.
+아직 \luatex은 베타 상태로 개발 중에 있으므로 안정적인 동작을 보장하지 않는다.
\section{}
\luatexko\ 로드하기: |\usepackage{luatexko}|. 플레인텍은
@@ -70,8 +70,8 @@ CP949 인코딩에 관해서는 제\ref{sec:uhcencoding}절 참조.
\section{}
패키지 옵션으로 |[hangul]|과 |[hanja]|가 제공된다. 장 제목이나
표·그림 캡션 따위가 한글 또는 한자 방식으로 표시된다. 다만
-장(chapter) 제목과 편(part) 제목에만 “제(第)”가 붙어 ``제~1 편''
-“제~3 장”과 같은 방식으로 표시되며 절 제목 이하에는 붙지 않는다.
+장(chapter) 제목과 편(part) 제목에만 ``제(第)''가 붙어 ``제~1 편''
+``제~3 장''과 같은 방식으로 표시되며 절 제목 이하에는 붙지 않는다.
또한 |[unfonts]|는 은글꼴을 불러오는 패키지 옵션이다.
이전 버전과 달리 \hemph{은글꼴이 기본으로 로드되지 않음}에 유의할 것.
@@ -114,7 +114,7 @@ CP949 인코딩에 관해서는 제\ref{sec:uhcencoding}절 참조.
\section{}
fontspec의 글꼴 옵션 외에 \luatexko가 따로 제공하는 것들이
-있다. \footnote{ 옛한글 식자를 위해서는
+있다.\footnote{ 옛한글 식자를 위해서는
|[Script=Hangul]| 옵션을 사용하는 것으로 충분하다. 그러나
|[YetHangul]| 옵션을 써도 무해하다.}
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty b/Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty
index 2a837045d5a..bff0ddebdcc 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko-core.sty
@@ -1,4 +1,4 @@
-% $Id: luatexko-core.sty,v 1.22 2012/11/23 05:06:02 nomos Exp $
+% luatexko-core.sty
%
% Copyright (c) 2013 Dohyun Kim <nomos at ktug org>
%
@@ -14,7 +14,7 @@
\input luaotfload.sty
\catcode`@ = 11
\else
- \ProvidesPackage{luatexko-core}[2013/05/10 v1.0 Typesetting Korean with LuaTeX]
+ \ProvidesPackage{luatexko-core}[2013/05/19 v1.1 Typesetting Korean with LuaTeX]
\RequirePackage{luaotfload}
\fi
@@ -224,25 +224,8 @@
\check@hangul@family
\ifdefined\hangul@font \hangul@font \fi
\expandafter\endgroup
- \directlua{
- local i = font.current()
- local name = fonts.hashes.identifiers[i]
- name = name and name.properties and name.properties.name
- luatexko.tmpfntname = name or "luatexkodefault"
- }%
- \directlua{
- local name = luatexko.tmpfntname
- local hang = luatexko.hangulfont[name]
- if hang then
- tex.setattribute("hangfntattr", hang)
- else
- local c = luatexko.hangulcount
- c = c + 1
- luatexko.hangulcount = c
- tex.setattribute("hangfntattr",c)
- luatexko.hangulfont[name] = c
- luatexko.hangulfont[c] = name
- end }%
+ \directlua{ luatexko.cjkfontidtmp = font.current() }%
+ \hangfntattr\directlua{ tex.sprint(luatexko.cjkfontidtmp) }\relax
}
\def\luatexko@hanja@selectfont{%
\begingroup
@@ -251,25 +234,8 @@
\check@hanja@family
\ifdefined\hanja@font \hanja@font \fi
\expandafter\endgroup
- \directlua{
- local i = font.current()
- local name = fonts.hashes.identifiers[i]
- name = name and name.properties and name.properties.name
- luatexko.tmpfntname = name or "luatexkodefault"
- }%
- \directlua{
- local name = luatexko.tmpfntname
- local hanj = luatexko.hangulfont[name]
- if hanj then
- tex.setattribute("hanjfntattr", hanj)
- else
- local c = luatexko.hangulcount
- c = c + 1
- luatexko.hangulcount = c
- tex.setattribute("hanjfntattr",c)
- luatexko.hangulfont[name] = c
- luatexko.hangulfont[c] = name
- end }%
+ \directlua{ luatexko.cjkfontidtmp = font.current() }%
+ \hanjfntattr\directlua{ tex.sprint(luatexko.cjkfontidtmp) }\relax
\ifnum\cjtypesetattr>\z@\luatexkolatinspaceskip\fi
}
\let\check@hangul@family\relax
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua b/Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua
index 85533605571..e131ec384fd 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko-normalize.lua
@@ -1,4 +1,4 @@
--- $Id: luatexko-normalize.lua,v 1.5 2012/06/01 08:31:05 nomos Exp $
+-- luatexko-normalize.lua
--
-- Copyright (c) 2013 Dohyun Kim <nomos at ktug org>
--
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua b/Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua
index 9f792d0397d..9f498132132 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko-uhc2utf8.lua
@@ -1,4 +1,4 @@
--- $Id: luatexko-uhc2utf8.lua,v 1.4 2011/07/08 15:23:52 nomos Exp $
+-- luatexko-uhc2utf8.lua
--
-- Copyright (c) 2013 Dohyun Kim <nomos at ktug org>
--
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua b/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
index 98000fc1a98..1165d706bd7 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko.lua
@@ -1,4 +1,4 @@
--- $Id: luatexko.lua,v 1.29 2012/12/13 09:13:22 nomos Exp $
+-- luatexko.lua
--
-- Copyright (c) 2013 Dohyun Kim <nomos at ktug org>
--
@@ -14,8 +14,8 @@ module('luatexko', package.seeall)
local err,warn,info,log = luatexbase.provides_module({
name = 'luatexko',
- date = '2013/05/10',
- version = 1.0,
+ date = '2013/05/19',
+ version = '1.1',
description = 'Korean linebreaking and font-switching',
author = 'Dohyun Kim',
license = 'LPPL v1.3+',
@@ -88,8 +88,6 @@ local emsize = 655360
dotemphnode = {}
rubynode = {}
ulinebox = {}
-hangulfont = {}
-hangulcount = 0
hanjafontforhanja = false
local cjkclass = {
@@ -1355,10 +1353,8 @@ local hangulfontlist = {}
local function font_substitute(head)
for curr in traverse_id(glyphnode, head) do
local eng = get_font_table(curr.font)
- local engsize = eng and eng.size
local engfontchar = get_font_char(curr.font, curr.char)
- if not engsize then -- no font table of plain tex cm font
- engsize = tex_sp(tex.pdffontsize(font.current()))
+ if not eng then -- no font table of plain tex cm font
engfontchar = get_cjk_class(curr.char) == 10
end
if curr.char and not engfontchar then
@@ -1366,29 +1362,13 @@ local function font_substitute(head)
local hangul = has_attribute(curr, hangfntattr)
local hanja = has_attribute(curr, hanjfntattr)
local ftable = {hangul, hanja}
-
if hanjafontforhanja then
local uni = get_unicode_char(curr)
uni = uni and get_cjk_class(uni)
if uni and uni < 7 then ftable = {hanja, hangul} end
end
- for _,fallback in ipairs(ftable) do
- local fkey = fallback and hangulfont[fallback]
- if fkey then
- local fname, fsize = stringmatch(fkey, "(.+) at (.+)")
- if not fname then fname = fkey end
- if fsize then
- fsize = tex_sp(fsize)
- else
- fsize = engsize
- end
- fkey = fname .. "@" .. fsize
- local fid = hangulfontlist[fkey]
- if not fid then
- fid = font_define_func(fname, fsize, font.nextid())
- if type(fid) == "table" then fid = fontdefine(fid) end
- hangulfontlist[fkey] = fid
- end
+ for _,fid in ipairs(ftable) do
+ if fid then
local c = get_font_char(fid, curr.char)
if c then
korid = true
diff --git a/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty b/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
index 25ca8590bdd..f00c5356cce 100644
--- a/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
+++ b/Master/texmf-dist/tex/luatex/luatexko/luatexko.sty
@@ -1,4 +1,4 @@
-% $Id: luatexko.sty,v 1.39 2012/11/23 05:06:02 nomos Exp $
+% luatexko.sty
%
% Copyright (c) 2013 Dohyun Kim <nomos at ktug org>
%
@@ -22,7 +22,7 @@
\expandafter\endinput
\fi
-\ProvidesPackage{luatexko}[2013/05/10 v1.0 Typesetting Korean with LuaLaTeX]
+\ProvidesPackage{luatexko}[2013/05/19 v1.1 Typesetting Korean with LuaLaTeX]
\RequirePackage{fontspec}
\RequirePackage{luatexko-core}
@@ -150,7 +150,8 @@
\luatexko@hangul@selectfont\luatexko@hanja@selectfont}
% don't forget to redefine \normalfont
-\protected\edef\normalfont{\unexpanded{\let\hangul@font\luatexko@undefined}%
+\protected\edef\normalfont{\unexpanded{%
+ \let\hangul@font\luatexko@undefined\let\hanja@font\luatexko@undefined}%
\unexpanded\expandafter{\normalfont}}
\let\reset@font\normalfont
@@ -232,7 +233,17 @@
\let\uwave\@firstofone
\let\dashuline\@firstofone
\let\dotuline\@firstofone
- \let\autojosaattr\@firstofone
+ \def\는{는}%
+ \def\은{은}%
+ \def\을{을}%
+ \def\를{를}%
+ \def\와{와}%
+ \def\과{과}%
+ \def\가{가}%
+ \def\이{이}%
+ \def\라{라}%
+ \def\으{으}%
+ \def\로{로}%
}}{}
}