diff --git a/.gitignore b/.gitignore
index 0dadee3b..a8aa2300 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*.aux
*.dmp
+*.dvi
*.fd
*.glo
*.gls
@@ -8,6 +9,7 @@
*.ilg
*.ind
*.ins
+*.log
*.out
*.swp
*.synctex.gz
@@ -138,6 +140,13 @@ zhmetrics/zhmCJK.sty
zhmetrics/zhmCJK-test.pdf
zhmetrics/zhmCJK-test.tex
+# zhmetrics-uptex
+zhmetrics-uptex/*.tfm
+zhmetrics-uptex/*.vf
+zhmetrics-uptex/*.pdf
+zhmetrics-uptex/ctan/*
+zhmetrics-uptex/tds/*
+
# zhnumber
zhnumber/build/
diff --git a/ctex/ctex.dtx b/ctex/ctex.dtx
index 68c68286..c54299f6 100644
--- a/ctex/ctex.dtx
+++ b/ctex/ctex.dtx
@@ -87,6 +87,7 @@ This package consists of the file ctex.dtx, and the derived files
ctex-engine-pdftex.def,
ctex-engine-xetex.def,
ctex-engine-luatex.def,
+ ctex-engine-uptex.def,
c19rm.fd,
c19sf.fd,
c19tt.fd,
@@ -231,6 +232,7 @@ This package consists of the file ctex.dtx, and the derived files
ctex-engine-pdftex.def,
ctex-engine-xetex.def,
ctex-engine-luatex.def,
+ ctex-engine-uptex.def,
c19rm.fd,
c19sf.fd,
c19tt.fd,
@@ -300,6 +302,7 @@ This package consists of the file ctex.dtx, and the derived files
\file{ctex-engine-pdftex.def} {\from{\jobname.dtx}{pdftex}}
\file{ctex-engine-xetex.def} {\from{\jobname.dtx}{xetex}}
\file{ctex-engine-luatex.def} {\from{\jobname.dtx}{luatex}}
+ \file{ctex-engine-uptex.def} {\from{\jobname.dtx}{uptex}}
\file{c19rm.fd} {\from{\jobname.dtx}{rm,c19}}
\file{c19sf.fd} {\from{\jobname.dtx}{sf,c19}}
\file{c19tt.fd} {\from{\jobname.dtx}{tt,c19}}
@@ -379,6 +382,7 @@ This package consists of the file ctex.dtx, and the derived files
\Msg{* ctex-engine-pdftex.def *}
\Msg{* ctex-engine-xetex.def *}
\Msg{* ctex-engine-luatex.def *}
+\Msg{* ctex-engine-uptex.def *}
\Msg{* c19rm.fd *}
\Msg{* c19sf.fd *}
\Msg{* c19tt.fd *}
@@ -496,6 +500,8 @@ This package consists of the file ctex.dtx, and the derived files
%\ProvidesExplFile{ctex-engine-xetex.def}
% {LuaLaTeX adapter (CTEX)}
%\ProvidesExplFile{ctex-engine-luatex.def}
+% {upTeX adapter (CTEX)}
+%\ProvidesExplFile{ctex-engine-uptex.def}
% {Windows fonts definition (CTEX)}
%\ProvidesExplFile{ctex-fontset-windows.def}
% {Windows fonts definition for Vista or later version (CTEX)}
@@ -523,8 +529,8 @@ This package consists of the file ctex.dtx, and the derived files
%\ProvidesFile{ctexspa.def}%
%\ProvidesDictionary{translator-theorem-dictionary}{ChineseGBK}%
%\ProvidesDictionary{translator-theorem-dictionary}{ChineseUTF8}%
-% [2016/02/02 v2.3 Chinese font definition (CTEX)]
-% [2016/02/02 v2.3 Space info for CJKpunct (CTEX)]
+% [2016/04/23 v2.4 Chinese font definition (CTEX)]
+% [2016/04/23 v2.4 Space info for CJKpunct (CTEX)]
% [2016/02/20 v1.0 Chinese translation for theorem name (CTEX)]
%!(readme|install|zhmap|spa)>
%<*driver>
@@ -755,6 +761,8 @@ This package consists of the file ctex.dtx, and the derived files
\def\LaTeXe{\hologo{LaTeX2e}}
\def\LaTeXiii{\hologo{LaTeX3}}
\def\dvipdfmx{DVIPDFM\textit{x}}
+\def\upTeX{up\TeX}
+\def\upLaTeX{up\LaTeX}
\def\ctexkitrev#1{%
\href{https://github.com/CTeX-org/ctex-kit/commit/#1}{\texttt{ctex-kit} rev. #1}}
\patchcmd\theCodelineNo{\sffamily\tiny}{\normalfont\sffamily\tiny}{}{}
@@ -788,6 +796,7 @@ This package consists of the file ctex.dtx, and the derived files
\textit{意大利体的数字表示描述对应索引项的页码;
带下划线的数字表示定义对应索引项的代码行号;
罗马字体的数字表示使用对应索引项的代码行号。}}
+\setlength\IndexMin{.4\textheight}
\usepackage{makecell}
\newcommand{\bashcmd}{\texttt}
\newcommand{\TeXLive}{\TeX\ Live}
@@ -812,7 +821,7 @@ This package consists of the file ctex.dtx, and the derived files
% \changes{v2.4}{2015/02/19}{加强 \pkg{beamer} 宏包支持。}
%
%
-% \CheckSum{5329}
+% \CheckSum{5509}
%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
@@ -842,7 +851,7 @@ This package consists of the file ctex.dtx, and the derived files
% 提供了汉字输出支持、标点压缩、字体字号命令、标题文字汉化、中文版式调整、数字
% 日期转换等支持功能,可适应论文、报告、书籍、幻灯片等不同类型的中文文档。
%
-% \CTeX{} 宏集支持 \LaTeX{}、\pdfLaTeX{}、\XeLaTeX{} 和 \LuaLaTeX{} 等多种不同
+% \CTeX{} 宏集支持 \LaTeX、\pdfLaTeX、\XeLaTeX、\LuaLaTeX、\upLaTeX{} 等多种不同
% 的编译方式,并为它们提供了统一的界面。主要功能由宏包 \pkg{ctex} 和中文文档类
% \cls{ctexart}、\cls{ctexrep}、\cls{ctexbook} 和 \cls{ctexbeamer} 实现。
% \end{abstract}
@@ -1010,7 +1019,7 @@ This package consists of the file ctex.dtx, and the derived files
% \begin{document}
% 中文文档类测试。你需要将所有源文件保存为 UTF-8 编码。
%
-% 你可以使用 XeLaTeX 或 LuaLaTeX 编译,也可以使用 (pdf)LaTeX 编译。
+% 你可以使用 XeLaTeX、LuaLaTeX 或 upLaTeX 编译,也可以使用 (pdf)LaTeX 编译。
% 推荐使用 XeLaTeX 或 LuaLaTeX 编译。
% \end{document}
% \end{ctexexam}
@@ -1022,7 +1031,7 @@ This package consists of the file ctex.dtx, and the derived files
% \begin{frame}{中文演示文档}
% \begin{itemize}
% \item 你需要将所有源文件保存为 UTF-8 编码
-% \item 你可以使用 XeLaTeX 或 LuaLaTeX 编译
+% \item 你可以使用 XeLaTeX、LuaLaTeX 或 upLaTeX 编译
% \item 也可以使用 (pdf)LaTeX 编译
% \item 推荐使用 XeLaTeX 或 LuaLaTeX 编译
% \end{itemize}
@@ -1051,7 +1060,7 @@ This package consists of the file ctex.dtx, and the derived files
%
% \CTeX{} 宏集已经尽可能就中文的行文和版式习惯做了调整和配置,通常而言,这些配置
% 已经够用。因此,除非必要,我们不建议普通用户修改这些默认配置。如果你认为 \CTeX{} 宏集
-% 的默认配置还可以完善,可以在项目主页上
+% 的默认配置还可以完善,可以在项目主页上%
% \href{https://github.com/CTeX-org/ctex-kit/issues}{提交 issue},
% 向我们反映,我们会酌情在后续版本中予以改进。
%
@@ -1098,25 +1107,37 @@ This package consists of the file ctex.dtx, and the derived files
% \subsection{编译方式}
% \label{subs:compile}
%
-% \CTeX{} 宏集会根据用户使用的编译方式\footnote{\LaTeX、\pdfLaTeX、\XeLaTeX 以及
-% \LuaLaTeX。},在底层选择不同的中文支持方式(见表 \ref{tab:chinese-support})。
+% \CTeX{} 宏集会根据用户使用的编译方式\footnote{\LaTeX、\pdfLaTeX、\XeLaTeX、
+% \LuaLaTeX{} 及 \upLaTeX。},在底层选择不同的中文支持方式(见
+% 表~\ref{tab:chinese-support})。
%
% \begin{table}[htbp]
% \centering
+% \begin{threeparttable}
% \caption{\CTeX{} 宏集的中文支持方式}
-% \begin{tabular}{ccc}
+% \label{tab:chinese-support}
+% \begin{tabular}{ll}
% \toprule
-% (pdf)\LaTeX & \XeLaTeX & \LuaLaTeX \\
+% 编译方式 & 支持宏包 \\
% \midrule
-% \pkg{CJK} & \pkg{xeCJK} & \pkg{LuaTeX-ja} \\
+% (pdf)\LaTeX & \pkg{CJK} \\
+% \XeLaTeX & \pkg{xeCJK} \\
+% \LuaLaTeX & \pkg{LuaTeX-ja} \\
+% \upLaTeX\tnote{*} & 原生 \\
% \bottomrule
% \end{tabular}
-% \label{tab:chinese-support}
+% \smallskip
+% \begin{tablenotes}
+% \item[*] p\LaTeX-ng(或称 Ap\LaTeX)与 \upLaTeX{} 兼容。使用 p\LaTeX-ng 编译
+% 时,\pkg{ctex} 采用与 \upLaTeX{} 相同的设置。
+% \end{tablenotes}
+% \end{threeparttable}
% \end{table}
%
-% 不同的编译方式和中文支持方式会在一定程度上影响 \CTeX{} 宏集的行为,比如宏包对编码的处理。
-% 在用户使用 \XeLaTeX{} 及 \LuaLaTeX{} 编译时,\CTeX{} 宏集使用(且仅能
-% 使用)UTF-8 编码;而因为历史原因,在用户使用 \LaTeX{} 及 \pdfLaTeX{} 编译
+% 不同的编译方式和中文支持方式会在一定程度上影响 \CTeX{} 宏集的行为,比如宏包对
+% 编码的处理。
+% 在用户使用 \XeLaTeX、\LuaLaTeX{} 及 \upLaTeX{} 编译时,\CTeX{} 宏集使用(且仅
+% 能使用)UTF-8 编码;而因为历史原因,在用户使用 \LaTeX{} 及 \pdfLaTeX{} 编译
% 时,宏包默认使用 GBK 编码。用户需要\emph{保证编译方式、
% 源文件编码、宏包编码选项三者一致}。
% 关于宏包编码选项,可以参考 \ref{subs:encoding}~节。
@@ -1130,10 +1151,10 @@ This package consists of the file ctex.dtx, and the derived files
% \begin{function}[rEXP]{GBK, UTF8}
% 指明编写文档时使用的编码格式。\CTeX{} 宏集无法检测用户编写文档时使用的编码格式,因此
% 需要用户自行指定编码。\emph{我们建议用户总是使用 UTF-8 编码,并显式指定 \opt{UTF8}
-% 选项,并使用 \XeLaTeX{} 或 \LuaLaTeX{} 编译。}
+% 选项,并使用 \XeLaTeX、\LuaLaTeX{} 或 \upLaTeX{} 编译。}
%
-% 使用 \XeLaTeX{} 或 \LuaLaTeX{} 编译时,\CTeX{} 宏集强制使用 UTF-8 编码,
-% 此时 \opt{GBK} 选项无效。
+% 使用 \XeLaTeX、\LuaLaTeX{} 或 \upLaTeX{} 编译时,\CTeX{} 宏集强制使用 UTF-8
+% 编码,此时 \opt{GBK} 选项无效。
% 使用 (pdf)\LaTeX{} 编译时,\CTeX{} 宏集默认启用 \opt{GBK} 选项;不过,用户也可以
% 显式声明 \opt{UTF8} 选项,使 \CTeX{} 宏集工作在 UTF-8 编码下。
% \end{function}
@@ -1166,14 +1187,19 @@ This package consists of the file ctex.dtx, and the derived files
% \makecell{\pkg{LuaTeX-ja}\\中易字库} &
% \makecell{\pkg{LuaTeX-ja}\\Fandol 字库} \\
% \cmidrule(lr){1-5}
-% \pdfLaTeX{} & 不可用 &
+% \pdfLaTeX{} & 不可用\tnote{5} &
% \makecell{\pkg{CJK} + \pkg{zhmetrics}\\中易字库 + 微软雅黑} &
-% \makecell{\pkg{CJK} + \pkg{zhmetrics}\\中易字库} & 不可用 \\
+% \makecell{\pkg{CJK} + \pkg{zhmetrics}\\中易字库} & 不可用\tnote{5} \\
% \cmidrule(lr){1-5}
-% \makecell{\LaTeX{} + \\\dvipdfmx{}} & 不可用 &
+% \makecell{\LaTeX{} + \\\dvipdfmx{}} & 不可用\tnote{6} &
% \makecell{\pkg{CJK} + \pkg{zhmetrics}\\中易字库 + 微软雅黑} &
% \makecell{\pkg{CJK} + \pkg{zhmetrics}\\中易字库} &
% \makecell{\pkg{CJK} + \pkg{zhmetrics}\\Fandol 字库} \\
+% \cmidrule(lr){1-5}
+% \makecell{\upLaTeX{} + \\\dvipdfmx{}} & 不可用\tnote{6} &
+% \makecell{\pkg{zhmetrics-uptex}\\中易字库 + 微软雅黑} &
+% \makecell{\pkg{zhmetrics-uptex}\\中易字库} &
+% \makecell{\pkg{zhmetrics-uptex}\\Fandol 字库} \\
% \bottomrule
% \end{tabular}
% \smallskip
@@ -1184,6 +1210,8 @@ This package consists of the file ctex.dtx, and the derived files
% 参见:\url{https://github.com/clerkma/fandol-fonts}。
% \item [4] \LuaLaTeX{} 编译时使用 \pkg{LuaTeX-ja} 宏包。对此,
% 第 \ref{sec:lualatex-chinese}~节有特别说明。
+% \item [5] 受 \pdfTeX{} 的限制,无法嵌入 OpenType 字体。
+% \item [6] 目前受 \dvipdfmx{} 的限制,Mac OS X 系统上的黑体和仿宋无法读取。
% \end{tablenotes}
% \end{threeparttable}
% \end{table}
@@ -1456,8 +1484,9 @@ This package consists of the file ctex.dtx, and the derived files
% \end{ctexexam}
% 则会得到“{\ctexset{space=auto}汉字 分词 技术 English}”。
%
-% \emph{使用 \textup{\LuaLaTeX} 编译的时候,该选项无效:汉字间的空格以及汉字与西文字符
-% 之间的空格总是有效,不会被忽略,但可以自动忽略掉由换行产生的空格。}
+% \emph{使用 \textup{\LuaLaTeX{} 及 \upLaTeX} 编译的时候,该选项无效:汉字间的
+% 空格以及汉字与西文字符之间的空格总是有效,不会被忽略,但可以自动忽略掉由换行
+% 产生的空格。}
%
% \begin{function}[rEXP,added=2014-04-23]{linespread}
% \begin{syntax}
@@ -3007,6 +3036,8 @@ This package consists of the file ctex.dtx, and the derived files
% \item \pkg{luaotfload} 宏包,它还依赖 \pkg{luatexbase} 宏包。
% \end{itemize}
% \item[\ding{229}] 以上是使用 \LuaLaTeX{} 编译时的依赖项。
+% \item \pkg{zhmetrics-uptex} 宏包。
+% \item[\ding{229}] 以上是使用 \upLaTeX{} 编译时的依赖项。
% \end{itemize}
%
% 出于一些原因,\pkg{zhmCJK} 尚未被收入 \TeXLive{} 和 \MiKTeX。因此,若
@@ -3856,6 +3887,22 @@ This package consists of the file ctex.dtx, and the derived files
%
% \subsubsection{\pkg{ctex-engine-pdftex.def}}
%
+% \begin{macro}[int]{\ctex_set_zhmap:n}
+% 设置 \upTeX{} 字体映射,同时作用于 \tn{AtBeginDvi} 与
+% \tn{AtBeginShipoutFirst}。该宏对 \pdfTeX{} 和 \upTeX{} 均有用。
+% \begin{macrocode}
+%<*pdftex|uptex>
+\cs_new_protected_nopar:Npn \ctex_set_zhmap:n #1
+ {
+ \AtBeginDvi { #1 }
+ \ctex_at_end_package:nn { atbegshi }
+ { \AtBeginShipoutFirst { #1 } }
+ }
+\@onlypreamble \ctex_set_zhmap:n
+%
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macrocode}
%<*pdftex>
% \end{macrocode}
@@ -3957,9 +4004,7 @@ This package consists of the file ctex.dtx, and the derived files
\tl_set:Nn \CJKrmdefault {#1}
\tl_set:Nn \CJKsfdefault {#2}
\tl_set:Nn \CJKttdefault {#3}
- \AtBeginDvi { \file_input:n {#4} }
- \ctex_at_end_package:nn { atbegshi }
- { \AtBeginShipoutFirst { \file_input:n {#4} } }
+ \ctex_set_zhmap:n { \file_input:n {#4} }
}
\@onlypreamble \ctex_load_zhmap:nnnn
% \end{macrocode}
@@ -5772,6 +5817,133 @@ This package consists of the file ctex.dtx, and the derived files
%
% \end{macrocode}
%
+% \subsubsection{\pkg{ctex-engine-uptex.def}}
+%
+% \begin{macrocode}
+%<*uptex>
+% \end{macrocode}
+%
+% \changes{v2.4}{2016/02/28}{初步支持 \upLaTeX。}
+%
+% 按 \pkg{CJK} 的命名习惯模拟部分命令,并设置默认字体。
+% \begin{macrocode}
+\tl_set:Nn \CJKrmdefault { rm }
+\tl_set:Nn \CJKsfdefault { sf }
+\tl_set:Nn \CJKttdefault { tt }
+\tl_set:Nn \CJKfamilydefault { \CJKrmdefault }
+\tl_put_left:Nn \rmfamily { \kanjifamily { \CJKrmdefault } }
+\tl_put_left:Nn \sffamily { \kanjifamily { \CJKsfdefault } }
+\tl_put_left:Nn \ttfamily { \kanjifamily { \CJKttdefault } }
+\NewDocumentCommand \CJKfamily { m }
+ {
+ \kanjifamily { #1 }
+ \selectfont
+ }
+\tl_set:Nn \kanjifamilydefault { \CJKfamilydefault }
+% \end{macrocode}
+%
+% \begin{macro}{\em}
+% 恢复 \LaTeXe{} 对 \tn{em} 的原始定义。
+% \begin{macrocode}
+\DeclareRobustCommand\em
+ {\@nomath\em \ifdim \fontdimen\@ne\font >\z@
+ \eminnershape \else \itshape \fi}
+% \end{macrocode}
+% \end{macro}
+%
+% \changes{v2.4}{2016/04/24}{正确设置 \upTeX{} 下字体命令。}
+% \begin{macro}[int]{\ctex_set_upfamily:nnn}
+% 将 NFSS 字体族 |#1| 设置为 JFM 字体名 |#2|,粗体形式字体名 |#3|。其中字体名
+% 形如 |upzhserif|,不包括表示方向的后缀 |-h| 与 |-v|。粗体字体名为空时不设置该
+% 字形。本命令不设置字体映射,需要复用已有的字体映射或另行设置。
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \ctex_set_upfamily:nnn #1 #2 #3
+ {
+ \DeclareKanjiFamily{JY2}{#1}{}
+ \DeclareKanjiFamily{JT2}{#1}{}
+ \DeclareFontShape{JY2}{#1}{m}{n}{<->~ #2-h}{}
+ \DeclareFontShape{JT2}{#1}{m}{n}{<->~ #2-v}{}
+ \tl_if_empty:nF { #3 }
+ {
+ \DeclareFontShape{JY2}{#1}{bx}{n}{<->~ #3-h}{}
+ \DeclareFontShape{JT2}{#1}{bx}{n}{<->~ #3-v}{}
+ }
+ }
+\@onlypreamble \ctex_set_upfamily:nnn
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\ctex_set_upmap:nnn}
+% 设置 \upTeX{} 字体映射。|#1| 是形如 |upserif| 的 PS TFM 字体名,不带表示粗体
+% 的后缀 |b| 与表示排版方向的后缀 |-h| 与 |-v|。|#2| 与 |#3| 是普通与粗体的实际
+% 字体名。
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \ctex_set_upmap:nnn #1 #2 #3
+ {
+ \ctex_set_zhmap:n
+ {
+ \special{ pdf:mapline~ #1-h~ UniGB-UTF16-H~ #2 }
+ \special{ pdf:mapline~ #1-v~ UniGB-UTF16-V~ #2 }
+ \tl_if_empty:nF { #3 }
+ {
+ \special{ pdf:mapline~ #1b-h~ UniGB-UTF16-H~ #3 }
+ \special{ pdf:mapline~ #1b-v~ UniGB-UTF16-V~ #3 }
+ }
+ }
+ }
+\@onlypreamble \ctex_set_upmap:nnn
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\ctex_set_upfonts:nnnnnn}
+% 设置 \upTeX{} 基本字体映射,按 \pkg{zhmetrics-uptex} 的定义,依次设置衬线体
+% 正、粗、意大利,无衬线体正、粗,等宽体正——共 6 种字体,并分横排及直排。
+% \begin{macrocode}
+\cs_new_protected_nopar:Npn \ctex_set_upfonts:nnnnnn #1 #2 #3 #4 #5 #6
+ {
+ \ctex_set_upmap:nnn { upserif } { #1 } { #2 }
+ \ctex_set_upmap:nnn { upserifit } { #3 } {}
+ \ctex_set_upmap:nnn { upsans } { #4 } { #5 }
+ \ctex_set_upmap:nnn { upmono } { #6 } {}
+ }
+\@onlypreamble \ctex_set_upfonts:nnnnnn
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}[int]{\@EverySelectfont@Init}
+% \pkg{everysel} 宏包(2011/10/28)未考虑 \upLaTeX{} 对 \tn{selectfont} 的修
+% 改,因此这里需要对其给出正确的定义。因为不会使用 \pkg{CJK},这里忽略有关
+% \pkg{CJK} 的定义。
+% \begin{macrocode}
+\cs_set_nopar:Npn \@EverySelectfont@Init
+ {
+ \ctex_patch_cmd:Nnn \selectfont
+ { \enc@update }
+ {
+ \@EverySelectfont@EveryHook
+ \@EverySelectfont@AtNextHook
+ \gdef \@EverySelectfont@AtNextHook { }
+ \enc@update
+ }
+ \@ifpackageloaded { tracefnt }
+ {
+ \EverySelectfont
+ {
+ \ifnum \tracingfonts > \tw@
+ \@font@info { Switching~ to~ \font@name }
+ \fi
+ }
+ }
+ { }
+ \let \@EverySelectfont@Init \undefined
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%
+% \end{macrocode}
+%
% \subsubsection{调整 \tn{CJKfamilydefault}}
%
% \changes{v2.4}{2016/02/15}{正确更新 \pkg{CJK} 包的 \tn{CJKfamilydefault}。}
@@ -5855,7 +6027,7 @@ This package consists of the file ctex.dtx, and the derived files
% 文件系统的大小写敏感性来判断。Mac~OS~X 的大小写敏感性在安装时是可选的。为了
% 保险起见,这里的判断很繁琐,最多要进行 4 次文件操作!
% \begin{macrocode}
-%<*xetex|pdftex>
+%<*xetex|pdftex|uptex>
\cs_new_protected_nopar:Npn \ctex_detected_platform:
{
\file_if_exist:nTF { /dev/null }
@@ -5886,7 +6058,7 @@ This package consists of the file ctex.dtx, and the derived files
{ \tl_gset:Nn \g_@@_fontset_tl {#2} }
}
\str_const:Nn \c_@@_macosx_file_str { /Library/Fonts/Songti.ttc }
-%
+%
% \end{macrocode}
% \end{macro}
%
@@ -5993,7 +6165,17 @@ This package consists of the file ctex.dtx, and the derived files
% \end{macrocode}
%
% \begin{macrocode}
-%<*pdftex|xetex|luatex>
+%<*uptex>
+\PassOptionsToPackage { dvipdfmx } { hyperref }
+\ctex_at_end_package:nn { hyperref }
+ {
+ \AtBeginShipoutFirst{ \special{ pdf:tounicode~ UTF8-UTF16 } }
+ }
+%
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*pdftex|xetex|luatex|uptex>
% \end{macrocode}
%
% \subsubsection{\pkg{CJKfntef}、\pkg{xeCJKfntef} 相关设置}
@@ -6054,11 +6236,11 @@ This package consists of the file ctex.dtx, and the derived files
}
\cs_new_protected_nopar:Npn { \endCTEXfilltwosides } { \endCJKfilltwosides }
%
-%<*luatex>
+%<*luatex|uptex>
{ \cs_new_eq:cN { CTEX#1 } \use:n }
\cs_new_eq:NN \CTEXfilltwosides \use_none:n
\cs_new_eq:NN \endCTEXfilltwosides \prg_do_nothing:
-%
+%
%<*pdftex>
\clist_map_inline:nn
{
@@ -6089,6 +6271,9 @@ This package consists of the file ctex.dtx, and the derived files
%<*luatex>
{ \skip_set:Nn \ccwd { \ltjgetparameter { kanjiskip } + \zw } }
%
+%<*uptex>
+ { \skip_set:Nn \ccwd { 1zw } }
+%
\dim_new:N \ccwd
% \end{macrocode}
% \end{macro}
@@ -6109,6 +6294,9 @@ This package consists of the file ctex.dtx, and the derived files
%<*luatex>
{ \ltjsetkanjiskip \l_@@_ccglue_skip }
%
+%<*uptex>
+ { \kanjiskip \l_@@_ccglue_skip }
+%
\skip_new:N \l_@@_ccglue_skip
% \end{macrocode}
% \end{macro}
@@ -6126,6 +6314,10 @@ This package consists of the file ctex.dtx, and the derived files
\skip_if_eq:nnTF { \l_@@_ccglue_skip } { \ltjgetparameter { kanjiskip } }
{ \prg_return_false: } { \prg_return_true: }
%
+%<*uptex>
+ \skip_if_eq:nnTF { \l_@@_ccglue_skip } { \kanjiskip }
+ { \prg_return_false: } { \prg_return_true: }
+%
}
% \end{macrocode}
% 注意下面的标记不能用 \verb"%",它会导致旧版本的 \pkg{l3docstrip}
@@ -6145,11 +6337,12 @@ This package consists of the file ctex.dtx, and the derived files
% 的特殊字体。在 \XeTeX{} 可以用 \tn{fontcharwd} 来改进。而在 \pdfTeX{} 下,若使用
% \pkg{zhmetrics} 技术,所有的汉字共享同一个 \file{.tfm},\tn{fontcharwd} 也就没有
% 意义。在 \LuaTeX{} 下,\pkg{LuaTeX-ja} 总是按照 JFM 中的设置输出汉字的宽度,可以
-% 直接用 \tn{zw} 作为汉字宽度。
+% 直接用 \tn{zw} 作为汉字宽度。\upTeX{} 可以直接使用原生的长度单位 |zw|。
% \begin{macrocode}
\cs_new_protected_nopar:Npn \ctex_update_em_unit:
% { \dim_set:Nn \ccwd { \f@size \p@ } }
% { \dim_set:Nn \ccwd { \zw } }
+% { \dim_set:Nn \ccwd { 1zw } }
% \end{macrocode}
% \end{macro}
%
@@ -6184,9 +6377,9 @@ This package consists of the file ctex.dtx, and the derived files
%<*pdftex>
\EverySelectfont { \cs_if_exist:NF \CJK@plane { \CTEX@selectfont@hook } }
%
-%<*xetex|luatex>
+%<*xetex|luatex|uptex>
\EverySelectfont { \CTEX@selectfont@hook }
-%
+%
% \end{macrocode}
%
% Attribute 寄存器 \tn{ltj@curjfnt} 的初始值是 $-1$,必须把它设置为一个有效的
@@ -6206,7 +6399,8 @@ This package consists of the file ctex.dtx, and the derived files
%
% \begin{macro}{space}
% 在导言区或正文中设置忽略空格方式。
-% \pdfTeX{} 和 \XeTeX{} 下初始设置为 \opt{auto},\LuaTeX{} 下是无效选项。
+% \pdfTeX{} 和 \XeTeX{} 下初始设置为 \opt{auto},\LuaTeX{}、\upTeX{} 下是无效
+% 选项。
% \begin{macrocode}
\keys_define:nn { ctex }
{
@@ -6224,17 +6418,17 @@ This package consists of the file ctex.dtx, and the derived files
space .default:n = { true } ,
space .initial:n = { auto }
%
-%<*luatex>
+%<*luatex|uptex>
space .code:n =
{ \msg_warning:nn { ctex } { invalid-option } }
-%
+%
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{punct}
% 在导言区或正文中设置标点符号输出格式。\pkg{LuaTeX-ja} 设置的是字体的默认 \texttt{JFM},
-% 只会影响到之后设置的字体。
+% 只会影响到之后设置的字体。\upTeX{} 暂时无效。
% \begin{macrocode}
\keys_define:nn { ctex }
{
@@ -6244,21 +6438,22 @@ This package consists of the file ctex.dtx, and the derived files
% \punctstyle { \l_@@_punct_tl }
% \xeCJKsetup { PunctStyle = \l_@@_punct_tl }
% \ctex_mono_jfm:o { \l_@@_punct_tl }
+% \msg_warning:nn { ctex } { invalid-option }
} ,
punct .default:n = { quanjiao } ,
}
% \end{macrocode}
% \end{macro}
%
-% \XeLaTeX{} 和 \LuaLaTeX{} 总是使用 \texttt{UTF8} 编码。
+% \XeLaTeX{}、\LuaLaTeX{} 和 \upLaTeX{} 总是使用 \texttt{UTF8} 编码。
% \begin{macrocode}
-%<*xetex|luatex>
+%<*xetex|luatex|uptex>
\tl_set:Nn \l_@@_encoding_tl { UTF8 }
-%
+%
% \end{macrocode}
%
% \begin{macrocode}
-%
+%
%<*class|ctex>
% \end{macrocode}
%
@@ -8676,6 +8871,7 @@ This package consists of the file ctex.dtx, and the derived files
%
% \end{macrocode}
%
+% \pkg{CJK} 宏包使用的字体族。
% \begin{macrocode}
%\DeclareFontFamily{C19}{rm}{\hyphenchar\font\m@ne}
%\DeclareFontFamily{C70}{rm}{\hyphenchar\font\m@ne}
@@ -8685,6 +8881,19 @@ This package consists of the file ctex.dtx, and the derived files
%\DeclareFontFamily{C70}{tt}{\hyphenchar\font\m@ne}
% \end{macrocode}
%
+% \changes{v2.4}{2016/04/25}{提供 \upLaTeX{} 的 NFSS 字体定义。}
+% \upTeX{} 使用的字体族。\upLaTeX 在 NFSS 下使用字体编码 |JY2| 和 |JT2| 来分别
+% 表示横排与直排的日文。
+% \begin{macrocode}
+%\DeclareKanjiFamily{JY2}{rm}{}
+%\DeclareKanjiFamily{JY2}{sf}{}
+%\DeclareKanjiFamily{JY2}{tt}{}
+%\DeclareKanjiFamily{JT2}{rm}{}
+%\DeclareKanjiFamily{JT2}{sf}{}
+%\DeclareKanjiFamily{JT2}{tt}{}
+% \end{macrocode}
+%
+%
% \begin{macrocode}
%<*rm>
%<*c19>
@@ -8710,6 +8919,14 @@ This package consists of the file ctex.dtx, and the derived files
\DeclareFontShape{C70}{rm}{bx}{it}{<-> CJKb * unikai}{\CJKbold}
%
%
+%<*uptex>
+\DeclareFontShape{JY2}{rm}{m}{n}{<-> upzhserif-h}{}
+\DeclareFontShape{JY2}{rm}{m}{it}{<-> upzhserifit-h}{}
+\DeclareFontShape{JY2}{rm}{bx}{n}{<-> upzhserifb-h}{}
+\DeclareFontShape{JT2}{rm}{m}{n}{<-> upzhserif-v}{}
+\DeclareFontShape{JT2}{rm}{m}{it}{<-> upzhserifit-v}{}
+\DeclareFontShape{JT2}{rm}{bx}{n}{<-> upzhserifb-v}{}
+%
% \end{macrocode}
%
% \begin{macrocode}
@@ -8737,6 +8954,12 @@ This package consists of the file ctex.dtx, and the derived files
\DeclareFontShape{C70}{sf}{bx}{it}{<-> CJKb * uniyou}{\CJKbold}
%
%
+%<*uptex>
+\DeclareFontShape{JY2}{sf}{m}{n}{<-> upzhsans-h}{}
+\DeclareFontShape{JY2}{sf}{bx}{n}{<-> upzhsansb-h}{}
+\DeclareFontShape{JT2}{sf}{m}{n}{<-> upzhsans-v}{}
+\DeclareFontShape{JT2}{sf}{bx}{n}{<-> upzhsansb-v}{}
+%
% \end{macrocode}
%
% \begin{macrocode}
@@ -8764,6 +8987,10 @@ This package consists of the file ctex.dtx, and the derived files
\DeclareFontShape{C70}{tt}{bx}{it}{<-> CJKb * unifs}{\CJKbold}
%
%
+%<*uptex>
+\DeclareFontShape{JY2}{tt}{m}{n}{<-> upzhmono-h}{}
+\DeclareFontShape{JT2}{tt}{m}{n}{<-> upzhmono-v}{}
+%
% \end{macrocode}
%
% \begin{macrocode}
@@ -8785,7 +9012,18 @@ This package consists of the file ctex.dtx, and the derived files
%
% 旧的 Windows 字体设置使用黑体作为无衬线体,楷体和仿宋是 GB2312 编码;新的
% Windows 字体设置使用微软雅黑作为无衬线体,楷体和仿宋是大字库。
+% Windows 8 以后,微软雅黑由原来的 \file{.ttf} 后缀改为 \file{.ttc} 后缀,需要
+% 加以区分。
% \begin{macrocode}
+%<*windowsnew>
+\tl_new:N \l_@@_msyh_suffix
+\tl_set:Nn \l_@@_msyh_suffix { .ttc }
+\file_if_exist:nF { C:/Windows/Fonts/msyh.ttc }
+ {
+ \file_if_exist:nF { msyh.ttc }
+ { \tl_set:Nn \l_@@_msyh_suffix { .ttf } }
+ }
+%
%<*windowsnew|windowsold>
\sys_if_engine_pdftex:TF
{
@@ -8798,22 +9036,10 @@ This package consists of the file ctex.dtx, and the derived files
\setCJKsansfont { simhei.ttf }
\ctex_punct_map_family:nn { \CJKsfdefault } { zhhei }
%
-% \end{macrocode}
-% Windows 8 以后,微软雅黑由原来的 \file{.ttf} 后缀改为 \file{.ttc} 后缀,需要
-% 加以区分。
-% \begin{macrocode}
%<*windowsnew>
- \file_if_exist:nTF { C:/Windows/Fonts/msyh.ttc }
- {
- \setCJKsansfont [ BoldFont = msyhbd.ttc ] { msyh.ttc }
- \setCJKfamilyfont { zhyahei }
- [ BoldFont = msyhbd.ttc ] { msyh.ttc }
- }
- {
- \setCJKsansfont [ BoldFont = msyhbd.ttf ] { msyh.ttf }
- \setCJKfamilyfont { zhyahei }
- [ BoldFont = msyhbd.ttf ] { msyh.ttf }
- }
+ \setCJKsansfont [ BoldFont = msyhbd\l_@@_msyh_suffix ] { msyh\l_@@_msyh_suffix }
+ \setCJKfamilyfont { zhyahei }
+ [ BoldFont = msyhbd\l_@@_msyh_suffix ] { msyh\l_@@_msyh_suffix }
\ctex_punct_map_family:nn { \CJKsfdefault } { zhyahei }
\ctex_punct_map_bfseries:nn { \CJKsfdefault , zhyahei } { zhyaheib }
%
@@ -8843,31 +9069,50 @@ This package consists of the file ctex.dtx, and the derived files
}
}
{
+ \sys_if_engine_uptex:TF
+ {
+ \ctex_set_upfonts:nnnnnn
+ {simsun.ttc} {simhei.ttf} {simkai.ttf}
+% {msyh\l_@@_msyh_suffix} {msyhbd\l_@@_msyh_suffix}
+% {simhei.ttf} {simhei.ttf}
+ {simfang.ttf}
+ \ctex_set_upfamily:nnn { zhsong } { upzhserif } {}
+ \ctex_set_upfamily:nnn { zhhei } { upzhserifb } {}
+ \ctex_set_upfamily:nnn { zhfs } { upzhmono} {}
+ \ctex_set_upfamily:nnn { zhkai } { upzhserifit } {}
+% \ctex_set_upfamily:nnn { zhyahei } { upzhsans } { upzhsansb }
+ \ctex_set_upfamily:nnn { zhli } { upschrm } {}
+ \ctex_set_upmap:nnn { upstsl } { simli.ttf } {}
+ \ctex_set_upfamily:nnn { zhyou } { upschgt } {}
+ \ctex_set_upmap:nnn { upstht } { simyou.ttf } {}
+ }
+ {
%<*windowsold>
- \setCJKmainfont
- [ BoldFont = SimHei , ItalicFont = KaiTi_GB2312 ] { SimSun }
- \setCJKsansfont { SimHei }
- \setCJKmonofont { FangSong_GB2312 }
- \setCJKfamilyfont { zhkai } { KaiTi_GB2312 }
- \setCJKfamilyfont { zhfs } { FangSong_GB2312 }
+ \setCJKmainfont
+ [ BoldFont = SimHei , ItalicFont = KaiTi_GB2312 ] { SimSun }
+ \setCJKsansfont { SimHei }
+ \setCJKmonofont { FangSong_GB2312 }
+ \setCJKfamilyfont { zhkai } { KaiTi_GB2312 }
+ \setCJKfamilyfont { zhfs } { FangSong_GB2312 }
%
%<*windowsnew>
- \setCJKmainfont
- [ BoldFont = SimHei , ItalicFont = KaiTi ] { SimSun }
- \setCJKsansfont
- [ BoldFont = { *~Bold } ] { Microsoft~YaHei }
- \setCJKmonofont { FangSong }
- \setCJKfamilyfont { zhkai } { KaiTi }
- \setCJKfamilyfont { zhfs } { FangSong }
+ \setCJKmainfont
+ [ BoldFont = SimHei , ItalicFont = KaiTi ] { SimSun }
+ \setCJKsansfont
+ [ BoldFont = { *~Bold } ] { Microsoft~YaHei }
+ \setCJKmonofont { FangSong }
+ \setCJKfamilyfont { zhkai } { KaiTi }
+ \setCJKfamilyfont { zhfs } { FangSong }
%
- \setCJKfamilyfont { zhsong } { SimSun }
- \setCJKfamilyfont { zhhei } { SimHei }
- \setCJKfamilyfont { zhli } { LiSu }
- \setCJKfamilyfont { zhyou } { YouYuan }
+ \setCJKfamilyfont { zhsong } { SimSun }
+ \setCJKfamilyfont { zhhei } { SimHei }
+ \setCJKfamilyfont { zhli } { LiSu }
+ \setCJKfamilyfont { zhyou } { YouYuan }
%<*windowsnew>
- \setCJKfamilyfont { zhyahei }
- [ BoldFont = { *~Bold } ] { Microsoft~YaHei }
+ \setCJKfamilyfont { zhyahei }
+ [ BoldFont = { *~Bold } ] { Microsoft~YaHei }
%
+ }
}
%
% \end{macrocode}
@@ -8922,17 +9167,30 @@ This package consists of the file ctex.dtx, and the derived files
}
}
{
- \setCJKmainfont
- [
- BoldFont = AdobeHeitiStd-Regular ,
- ItalicFont = AdobeKaitiStd-Regular
- ] { AdobeSongStd-Light }
- \setCJKsansfont { AdobeHeitiStd-Regular}
- \setCJKmonofont { AdobeFangsongStd-Regular}
- \setCJKfamilyfont { zhsong } { AdobeSongStd-Light }
- \setCJKfamilyfont { zhhei } { AdobeHeitiStd-Regular }
- \setCJKfamilyfont { zhfs } { AdobeFangsongStd-Regular }
- \setCJKfamilyfont { zhkai } { AdobeKaitiStd-Regular }
+ \sys_if_engine_uptex:TF
+ {
+ \ctex_set_upfonts:nnnnnn
+ {AdobeSongStd-Light.otf} {AdobeHeitiStd-Regular.otf} {AdobeKaitiStd-Regular.otf}
+ {AdobeHeitiStd-Regular.otf} {AdobeHeitiStd-Regular.otf}
+ {AdobeFangsongStd-Regular.otf}
+ \ctex_set_upfamily:nnn { zhsong } { upzhserif } {}
+ \ctex_set_upfamily:nnn { zhhei } { upzhsans } {}
+ \ctex_set_upfamily:nnn { zhfs } { upzhmono} {}
+ \ctex_set_upfamily:nnn { zhkai } { upzhserifit } {}
+ }
+ {
+ \setCJKmainfont
+ [
+ BoldFont = AdobeHeitiStd-Regular ,
+ ItalicFont = AdobeKaitiStd-Regular
+ ] { AdobeSongStd-Light }
+ \setCJKsansfont { AdobeHeitiStd-Regular}
+ \setCJKmonofont { AdobeFangsongStd-Regular}
+ \setCJKfamilyfont { zhsong } { AdobeSongStd-Light }
+ \setCJKfamilyfont { zhhei } { AdobeHeitiStd-Regular }
+ \setCJKfamilyfont { zhfs } { AdobeFangsongStd-Regular }
+ \setCJKfamilyfont { zhkai } { AdobeKaitiStd-Regular }
+ }
}
% \end{macrocode}
%
@@ -8996,17 +9254,30 @@ This package consists of the file ctex.dtx, and the derived files
}
}
{
- \setCJKmainfont
- [ Extension = .otf , BoldFont = FandolSong-Bold , ItalicFont = FandolKai-Regular ]
- { FandolSong-Regular }
- \setCJKsansfont [ Extension = .otf , BoldFont = FandolHei-Bold ] { FandolHei-Regular }
- \setCJKmonofont [ Extension = .otf ] { FandolFang-Regular }
- \setCJKfamilyfont { zhsong }
- [ Extension = .otf , BoldFont = FandolSong-Bold ] { FandolSong-Regular }
- \setCJKfamilyfont { zhhei }
- [ Extension = .otf , BoldFont = FandolHei-Bold ] { FandolHei-Regular }
- \setCJKfamilyfont { zhfs } [ Extension = .otf ] { FandolFang-Regular }
- \setCJKfamilyfont { zhkai } [ Extension = .otf ] { FandolKai-Regular }
+ \sys_if_engine_uptex:TF
+ {
+ \ctex_set_upfonts:nnnnnn
+ {FandolSong-Regular.otf} {FandolSong-Bold.otf} {FandolKai-Regular.otf}
+ {FandolHei-Regular.otf} {FandolHei-Bold.otf}
+ {FandolFang-Regular.otf}
+ \ctex_set_upfamily:nnn { zhsong } { upzhserif } { upzhserifb }
+ \ctex_set_upfamily:nnn { zhhei } { upzhsans } { upzhsansb }
+ \ctex_set_upfamily:nnn { zhfs } { upzhmono} {}
+ \ctex_set_upfamily:nnn { zhkai } { upzhserifit } {}
+ }
+ {
+ \setCJKmainfont
+ [ Extension = .otf , BoldFont = FandolSong-Bold , ItalicFont = FandolKai-Regular ]
+ { FandolSong-Regular }
+ \setCJKsansfont [ Extension = .otf , BoldFont = FandolHei-Bold ] { FandolHei-Regular }
+ \setCJKmonofont [ Extension = .otf ] { FandolFang-Regular }
+ \setCJKfamilyfont { zhsong }
+ [ Extension = .otf , BoldFont = FandolSong-Bold ] { FandolSong-Regular }
+ \setCJKfamilyfont { zhhei }
+ [ Extension = .otf , BoldFont = FandolHei-Bold ] { FandolHei-Regular }
+ \setCJKfamilyfont { zhfs } [ Extension = .otf ] { FandolFang-Regular }
+ \setCJKfamilyfont { zhkai } [ Extension = .otf ] { FandolKai-Regular }
+ }
}
% \end{macrocode}
%
@@ -9081,17 +9352,24 @@ This package consists of the file ctex.dtx, and the derived files
% 在 \pdfTeX{} 下生成的 PDF 只有方框^^A
% \footnote{\url{http://www.newsmth.net/bbscon.php?bid=460&id=312640}}。
% 华文细黑和华文仿宋的情况类似。
+% 这确认为 \dvipdfmx{} 的 bug^^A
+% \begingroup\makeatletter\@makeother\#\@firstofone{\endgroup
+% \footnote{\url{https://github.com/clerkma/ptex-ng/blob/master/texk/libdpx/cidtype2.c#L597}}}。
% \begin{macrocode}
\sys_if_engine_pdftex:TF
{ \ctex_fontset_error:n { mac } }
{
- \setCJKmainfont [ BoldFont = STHeiti , ItalicFont = STKaiti ] { STSong }
- \setCJKsansfont [ BoldFont = STHeiti ] { STXihei }
- \setCJKmonofont { STFangsong }
- \setCJKfamilyfont { zhsong } { STSong }
- \setCJKfamilyfont { zhhei } { STHeiti }
- \setCJKfamilyfont { zhfs } { STFangsong }
- \setCJKfamilyfont { zhkai } { STKaiti }
+ \sys_if_engine_uptex:TF
+ { \ctex_fontset_error:n { mac } }
+ {
+ \setCJKmainfont [ BoldFont = STHeiti , ItalicFont = STKaiti ] { STSong }
+ \setCJKsansfont [ BoldFont = STHeiti ] { STXihei }
+ \setCJKmonofont { STFangsong }
+ \setCJKfamilyfont { zhsong } { STSong }
+ \setCJKfamilyfont { zhhei } { STHeiti }
+ \setCJKfamilyfont { zhfs } { STFangsong }
+ \setCJKfamilyfont { zhkai } { STKaiti }
+ }
}
% \end{macrocode}
%
@@ -9136,8 +9414,24 @@ This package consists of the file ctex.dtx, and the derived files
{ \ctex_fontset_error:n { founder } }
}
{
- \setCJKmainfont
- [ BoldFont = FZXiaoBiaoSong-B05 , ItalicFont = FZKai-Z03 ] { FZShuSong-Z01 }
+ \sys_if_engine_uptex:TF
+ {
+ \ctex_set_upfonts:nnnnnn
+ { FZSSK.TTF } { FZXBSK.TTF } { FZKTK.TTF }
+ { FZXH1K.TTF } { FZHTK.TTF }
+ { FZFSK.TTF }
+ \ctex_set_upfamily:nnn { zhsong } { upzhserif } { upzhserifb }
+ \ctex_set_upfamily:nnn { zhhei } { upzhsans } { upzhsansb }
+ \ctex_set_upfamily:nnn { zhfs } { upzhmono} {}
+ \ctex_set_upfamily:nnn { zhkai } { upzhserifit } {}
+ \ctex_set_upfamily:nnn { zhli } { upschrm } {}
+ \ctex_set_upmap:nnn { upstsl } { FZLSK.TTF } {}
+ \ctex_set_upfamily:nnn { zhyou } { upschgt } {}
+ \ctex_set_upmap:nnn { upstht } { FZY1K.TTF } {}
+ }
+ {
+ \setCJKmainfont
+ [ BoldFont = FZXiaoBiaoSong-B05 , ItalicFont = FZKai-Z03 ] { FZShuSong-Z01 }
% \end{macrocode}
%
% 在 WPS For Linux 附带的 5.00 版和家庭版 5.20 版的“方正细黑一\_GBK”的字体名称
@@ -9148,15 +9442,16 @@ This package consists of the file ctex.dtx, and the derived files
% 遂采用汉字名称。由于 \pkg{luaotfload} 不支持汉字名称,故使用 Postscript 名字,
% 速度不受影响。
% \begin{macrocode}
- \setCJKsansfont [ BoldFont = FZHei-B01 ]
- { \sys_if_engine_xetex:TF { 方正细黑一_GBK } { FZXH1K--GBK1-0 } }
- \setCJKmonofont { FZFangSong-Z02 }
- \setCJKfamilyfont { zhsong } [ BoldFont = FZXiaoBiaoSong-B05 ] { FZShuSong-Z01 }
- \setCJKfamilyfont { zhhei } { FZHei-B01 }
- \setCJKfamilyfont { zhkai } { FZKai-Z03 }
- \setCJKfamilyfont { zhfs } { FZFangSong-Z02 }
- \setCJKfamilyfont { zhli } { FZLiShu-S01 }
- \setCJKfamilyfont { zhyou } [ BoldFont = FZZhunYuan-M02 ] { FZXiYuan-M01 }
+ \setCJKsansfont [ BoldFont = FZHei-B01 ]
+ { \sys_if_engine_xetex:TF { 方正细黑一_GBK } { FZXH1K--GBK1-0 } }
+ \setCJKmonofont { FZFangSong-Z02 }
+ \setCJKfamilyfont { zhsong } [ BoldFont = FZXiaoBiaoSong-B05 ] { FZShuSong-Z01 }
+ \setCJKfamilyfont { zhhei } { FZHei-B01 }
+ \setCJKfamilyfont { zhkai } { FZKai-Z03 }
+ \setCJKfamilyfont { zhfs } { FZFangSong-Z02 }
+ \setCJKfamilyfont { zhli } { FZLiShu-S01 }
+ \setCJKfamilyfont { zhyou } [ BoldFont = FZZhunYuan-M02 ] { FZXiYuan-M01 }
+ }
}
% \end{macrocode}
%
@@ -9204,13 +9499,25 @@ This package consists of the file ctex.dtx, and the derived files
{ \ctex_fontset_error:n { ubuntu } }
}
{
- \setCJKmainfont
- [ BoldFont = WenQuanYi~Zen~Hei , ItalicFont = AR~PL~UKai~CN ] { AR~PL~UMing~CN }
- \setCJKsansfont { WenQuanYi~Zen~Hei }
- \setCJKmonofont { AR~PL~UMing~CN }
- \setCJKfamilyfont { zhsong } { AR~PL~UMing~CN }
- \setCJKfamilyfont { zhhei } { WenQuanYi~Zen~Hei }
- \setCJKfamilyfont { zhkai } { AR~PL~UKai~CN }
+ \sys_if_engine_uptex:TF
+ {
+ \ctex_set_upfonts:nnnnnn
+ { uming.ttc } { wqy-zenhei.ttc } { ukai.ttc }
+ { wqy-zenhei.ttc } { wqy-zenhei.ttc }
+ { uming.ttc }
+ \ctex_set_upfamily:nnn { zhsong } { upzhserif } {}
+ \ctex_set_upfamily:nnn { zhhei } { upzhsans } {}
+ \ctex_set_upfamily:nnn { zhkai } { upzhserifit } {}
+ }
+ {
+ \setCJKmainfont
+ [ BoldFont = WenQuanYi~Zen~Hei , ItalicFont = AR~PL~UKai~CN ] { AR~PL~UMing~CN }
+ \setCJKsansfont { WenQuanYi~Zen~Hei }
+ \setCJKmonofont { AR~PL~UMing~CN }
+ \setCJKfamilyfont { zhsong } { AR~PL~UMing~CN }
+ \setCJKfamilyfont { zhhei } { WenQuanYi~Zen~Hei }
+ \setCJKfamilyfont { zhkai } { AR~PL~UKai~CN }
+ }
}
% \end{macrocode}
%
@@ -9309,7 +9616,7 @@ This package consists of the file ctex.dtx, and the derived files
% \begin{macrocode}
%<*windows>
\ProvidesFile{zhwindowsfonts.tex}%
- [2016/02/02 v2.3 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/04/23 v2.4 Windows font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@
\ProvidesFile{zhadobefonts.tex}%
- [2016/02/02 v2.3 Adobe font map loader for DVIPDFMx (CTEX)]
+ [2016/04/23 v2.4 Adobe font map loader for DVIPDFMx (CTEX)]
\ifzhmappdf
%% pdfTeX does not support OTF fonts
@@ -9417,7 +9724,7 @@ This package consists of the file ctex.dtx, and the derived files
% \begin{macrocode}
%<*fandol>
\ProvidesFile{zhfandolfonts.tex}%
- [2016/02/02 v2.3 Fandol font map loader for DVIPDFMx (CTEX)]
+ [2016/04/23 v2.4 Fandol font map loader for DVIPDFMx (CTEX)]
\ifzhmappdf
%% pdfTeX does not support OTF fonts
@@ -9453,7 +9760,7 @@ This package consists of the file ctex.dtx, and the derived files
% \begin{macrocode}
%<*founder>
\ProvidesFile{zhfounderfonts.tex}%
- [2016/02/02 v2.3 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/04/23 v2.4 Founder font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@
\ProvidesFile{zhubuntufonts.tex}%
- [2016/02/02 v2.3 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)]
+ [2016/04/23 v2.4 Ubuntu font map loader for pdfTeX and DVIPDFMx (CTEX)]
\ifzhmappdf
\pdfmapline{=gbk@UGBK@
+
+This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version. The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Leo Liu.
+
+This work consists of the files
+ makemetrics.lua
+ upzhm-{h,v}.pl
+ upzhfandolfonts.tex
+ upzhfandolfongs-test.tex
+ README.md
+and the derived files
+ upzhserif-{h,v}.tfm
+ upzhserifit-{h,v}.tfm
+ upzhserifb-{h,v}.tfm
+ upzhsans-{h,v}.tfm
+ upzhsnasb-{h,v}.tfm
+ upzhmono-{h,v}.tfm
+ upzhserif-{h,v}.vf
+ upzhserifit-{h,v}.vf
+ upzhserifb-{h,v}.vf
+ upzhsans-{h,v}.vf
+ upzhsnasb-{h,v}.vf
+ upzhmono-{h,v}.vf
+ upserif-{h,v}.tfm
+ upserifit-{h,v}.tfm
+ upserifb-{h,v}.tfm
+ upsans-{h,v}.tfm
+ upsnasb-{h,v}.tfm
+ upmono-{h,v}.tfm
diff --git a/zhmetrics-uptex/build.lua b/zhmetrics-uptex/build.lua
new file mode 100644
index 00000000..62156b4f
--- /dev/null
+++ b/zhmetrics-uptex/build.lua
@@ -0,0 +1,144 @@
+#!/usr/bin/env texlua
+
+-- zhmetrics-uptex v1.0
+-- Copyright (C) 2016 by Leo Liu
+
+local fonts = {'serif', 'serifit', 'serifb', 'sans', 'sansb', 'mono'}
+
+function copyfile(path_src, path_dst)
+ local cp = 'cp -f'
+ if os.type == 'windows' then
+ cp = 'copy /y'
+ path_src = path_src:gsub('/', '\\')
+ path_dst = path_dst:gsub('/', '\\')
+ end
+ os.execute(cp .. ' ' .. path_src .. ' ' .. path_dst)
+end
+
+function move(path_src, path_dst)
+ local mv = 'mv -f'
+ if os.type == 'windows' then
+ mv = 'move /y'
+ path_src = path_src:gsub('/', '\\')
+ path_dst = path_dst:gsub('/', '\\')
+ end
+ os.execute(mv .. ' ' .. path_src .. ' ' .. path_dst)
+end
+
+function mkdir(dir)
+ if lfs.attributes(dir) ~= nil then
+ do return end
+ end
+ local md = 'mkdir -p'
+ if os.type == 'windows' then
+ md = 'mkdir'
+ dir = dir:gsub('/', '\\')
+ end
+ os.execute(md .. ' ' .. dir)
+end
+
+function rmdir(dir)
+ if lfs.attributes(dir) == nil then
+ do return end
+ end
+ local rd = 'rm -r -f'
+ if os.type == windows then
+ rd = 'rmdir /s /q'
+ dir = dir:gsub('/', '\\')
+ end
+ os.execute(rd .. ' ' .. dir)
+end
+
+function packfiles(zipname, workdir, tfmdir, vfdir, texdir, sourcedir, docdir)
+ mkdir(tfmdir)
+ mkdir(vfdir)
+ mkdir(texdir)
+ mkdir(sourcedir)
+ mkdir(docdir)
+ for _, hv in pairs({'h', 'v'}) do
+ for _, fnt in pairs(fonts) do
+ local jfm = string.format('upzh%s-%s.tfm', fnt, hv)
+ local vf = string.format('upzh%s-%s.vf', fnt, hv)
+ local pstfm = string.format('up%s-%s.tfm', fnt, hv)
+ copyfile(jfm, tfmdir .. '/')
+ copyfile(pstfm, tfmdir .. '/')
+ copyfile(vf, vfdir .. '/')
+ end
+ local pl = string.format('upzhm-%s.pl', hv)
+ copyfile(pl, sourcedir .. '/')
+ end
+ copyfile('makemetrics.lua', sourcedir .. '/')
+ copyfile('upzhfandolfonts.tex', texdir .. '/')
+ copyfile('README.md', docdir .. '/')
+ copyfile('upzhfandolfonts-test.tex', docdir .. '/')
+ copyfile('upzhfandolfonts-test.pdf', docdir .. '/')
+ local tdszipname = 'zhmetrics-uptex.tds.zip'
+ if lfs.attributes(zipname) then
+ os.remove(zipname)
+ end
+ local curdir = lfs.currentdir()
+ lfs.chdir(workdir)
+ os.execute('zip -r ' .. curdir .. '/' .. zipname .. ' *')
+ lfs.chdir(curdir)
+end
+
+function tds()
+ packfiles('zhmetrics-uptex.tds.zip', 'tds',
+ 'tds/fonts/tfm/zhmetrics-uptex',
+ 'tds/fonts/vf/zhmetrics-uptex',
+ 'tds/tex/uptex/zhmetrics-uptex',
+ 'tds/source/fonts/zhmetrics-uptex',
+ 'tds/doc/fonts/zhmetrics-uptex')
+end
+
+function ctan()
+ packfiles('zhmetrics-uptex.zip', 'ctan',
+ 'ctan/tfm',
+ 'ctan/vf',
+ 'ctan/tex',
+ 'ctan/source',
+ 'ctan/doc')
+ copyfile('README.md', 'ctan/')
+ os.execute('zip zhmetrics-uptex.zip README.md')
+end
+
+function clean()
+ for _, hv in pairs({'h', 'v'}) do
+ for _, fnt in pairs(fonts) do
+ local jfm = string.format('upzh%s-%s.tfm', fnt, hv)
+ local vf = string.format('upzh%s-%s.vf', fnt, hv)
+ local pstfm = string.format('up%s-%s.tfm', fnt, hv)
+ os.remove(jfm)
+ os.remove(vf)
+ os.remove(pstfm)
+ end
+ end
+ rmdir('tds')
+ rmdir('ctan')
+end
+
+function main(target)
+ local unpack = function()
+ dofile('makemetrics.lua')
+ os.execute('uplatex upzhfandolfonts-test')
+ os.execute('dvipdfmx upzhfandolfonts-test')
+ for _, suf in pairs({'.aux', '.log', '.dvi'}) do
+ os.remove('upzhfandolfonts-test' .. suf)
+ end
+ end
+ if target == 'unpack' then
+ unpack()
+ elseif target == 'tds' then
+ unpack()
+ tds()
+ elseif target == 'ctan' then
+ unpack()
+ ctan()
+ elseif target == 'clean' then
+ clean()
+ else
+ print('Usage: ' .. arg[0] .. ' [unpack|tds|ctan|clean]')
+ end
+end
+
+main(arg[1])
diff --git a/zhmetrics-uptex/makemetrics.lua b/zhmetrics-uptex/makemetrics.lua
new file mode 100644
index 00000000..80cbf3f8
--- /dev/null
+++ b/zhmetrics-uptex/makemetrics.lua
@@ -0,0 +1,19 @@
+#!/usr/bin/env texlua
+
+-- zhmetrics-uptex v1.0
+-- Copyright (C) 2016 by Leo Liu
+
+local fonts = {'serif', 'serifit', 'serifb', 'sans', 'sansb', 'mono'}
+local pltopf = 'uppltotf -kanji=uptex'
+local makejvf = 'makejvf -i -u gb'
+
+for _, hv in pairs({'h', 'v'}) do
+ for _, fnt in pairs(fonts) do
+ local pl = string.format('upzhm-%s.pl', hv)
+ local jfm = string.format('upzh%s-%s.tfm', fnt, hv)
+ local vf = string.format('upzh%s-%s.vf', fnt, hv)
+ local pstfm = string.format('up%s-%s.tfm', fnt, hv)
+ os.execute(string.format('%s %s %s', pltopf, pl, jfm))
+ os.execute(string.format('%s %s %s', makejvf, jfm, pstfm))
+ end
+end
diff --git a/zhmetrics-uptex/upzhfandolfonts-test.tex b/zhmetrics-uptex/upzhfandolfonts-test.tex
new file mode 100644
index 00000000..d4cdd8b4
--- /dev/null
+++ b/zhmetrics-uptex/upzhfandolfonts-test.tex
@@ -0,0 +1,42 @@
+\documentclass{article}
+
+\usepackage[dvipdfm,a5paper,margin=1in]{geometry}
+\newcommand\vertical{%
+ \clearpage
+ \newgeometry{width=\textheight,height=\textwidth,left=1in,top=1in}%
+ \tate}
+
+\font\rm=upzhserif-h
+\font\it=upzhserifit-h
+\font\bf=upzhserifb-h
+\font\sf=upzhsans-h
+\font\sfbf=upzhsansb-h
+\font\tt=upzhmono-h
+\font\vrm=upzhserif-v
+\font\vit=upzhserifit-v
+\font\vbf=upzhserifb-v
+\font\vsf=upzhsans-v
+\font\vsfbf=upzhsansb-v
+\font\vtt=upzhmono-v
+
+\AtBeginDvi{\input{upzhfandolfonts}}
+
+\begin{document}
+
+\makeatletter
+\@for\fnt:=\rm,\it,\bf,\sf,\sfbf,\tt \do{%
+ {\fnt
+ 庄子曰:“吾生也有涯,而知也无涯。以有涯随无涯,殆已!已而为知者,殆而已矣!
+ 为善无近名,为恶无近刑,缘督以为经,可以保身,可以全生,可以养亲,可以尽年。”
+ \par}
+}
+
+\vertical
+
+\@for\fnt:=\vrm,\vit,\vbf,\vsf,\vsfbf,\vtt \do{%
+ {\fnt
+ 庄子曰:「吾生也有涯,而知也无涯。以有涯随无涯,殆已!已而为知者,殆而已矣!
+ 为善无近名,为恶无近刑,缘督以为经,可以保身,可以全生,可以养亲,可以尽年。」
+ \par}
+}
+\end{document}
diff --git a/zhmetrics-uptex/upzhfandolfonts.tex b/zhmetrics-uptex/upzhfandolfonts.tex
new file mode 100644
index 00000000..107014af
--- /dev/null
+++ b/zhmetrics-uptex/upzhfandolfonts.tex
@@ -0,0 +1,17 @@
+% Fandol font mapping for dvipdfmx
+
+\special{pdf:mapline upserif-h UniGB-UTF16-H FandolSong-Regular.otf}
+\special{pdf:mapline upserifit-h UniGB-UTF16-H FandolKai-Regular.otf}
+\special{pdf:mapline upserifb-h UniGB-UTF16-H FandolSong-Bold.otf}
+\special{pdf:mapline upsans-h UniGB-UTF16-H FandolHei-Regular.otf}
+\special{pdf:mapline upsansb-h UniGB-UTF16-H FandolHei-Bold.otf}
+\special{pdf:mapline upmono-h UniGB-UTF16-H FandolFang-Regular.otf}
+
+\special{pdf:mapline upserif-v UniGB-UTF16-V FandolSong-Regular.otf}
+\special{pdf:mapline upserifit-v UniGB-UTF16-V FandolKai-Regular.otf}
+\special{pdf:mapline upserifb-v UniGB-UTF16-V FandolSong-Bold.otf}
+\special{pdf:mapline upsans-v UniGB-UTF16-V FandolHei-Regular.otf}
+\special{pdf:mapline upsansb-v UniGB-UTF16-V FandolHei-Bold.otf}
+\special{pdf:mapline upmono-v UniGB-UTF16-V FandolFang-Regular.otf}
+
+\endinput
diff --git a/zhmetrics-uptex/upzhm-h.pl b/zhmetrics-uptex/upzhm-h.pl
new file mode 100644
index 00000000..48f3f4f4
--- /dev/null
+++ b/zhmetrics-uptex/upzhm-h.pl
@@ -0,0 +1,135 @@
+(COMMENT Chinese Font Metrics for upTeX Horizontal Typesetting)
+(DIRECTION YOKO)
+(FAMILY UPZHM HANZI)
+(FACE F MRR)
+(CODINGSCHEME TEX KANJI TEXT)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM O 0)
+(FONTDIMEN
+ (SLANT R 0.0)
+ (SPACE R 0.0)
+ (STRETCH R 0.100000)
+ (SHRINK R 0.0)
+ (XHEIGHT R 1.000000)
+ (QUAD R 1.000000)
+ (EXTRASPACE R 0.250000)
+ (EXTRASTRETCH R 0.200000)
+ (EXTRASHRINK R 0.125000)
+ )
+(GLUEKERN
+ (LABEL O 0)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (STOP)
+ (LABEL O 1)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (STOP)
+ (LABEL O 2)
+ (GLUE O 0 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.500000 R 0.0 R 0.500000)
+ (STOP)
+ (LABEL O 3)
+ (GLUE O 0 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 1 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 2 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 3 R 0.500000 R 0.0 R 0.250000)
+ (GLUE O 4 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.250000 R 0.0 R 0.250000)
+ (STOP)
+ (LABEL O 4)
+ (GLUE O 0 R 0.500000 R 0.0 R 0.0)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.0)
+ (GLUE O 3 R 0.750000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.500000 R 0.0 R 0.0)
+ (STOP)
+ (LABEL O 5)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (KRN O 5 R 0.0)
+ (STOP)
+ )
+(CHARSINTYPE O 1
+ ‘ “ ( 〔 [ { 〈 《 「 『
+ 【
+ UFF5F U3018 U3016 U301D
+ )
+(CHARSINTYPE O 2
+ 、 , ’ ” ) 〕 ] } 〉 》
+ 」 』 】
+ UFF60 U3019 U3017 U301F
+ )
+(CHARSINTYPE O 3
+ ・ : ;
+ )
+(CHARSINTYPE O 4
+ 。 .
+ )
+(CHARSINTYPE O 5
+ — ― … ‥
+ )
+(TYPE O 0
+ (CHARWD R 1.000000)
+ (CHARHT R 0.880000)
+ (CHARDP R 0.120000)
+ (COMMENT
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ )
+ )
+(TYPE O 1
+ (CHARWD R 0.500000)
+ (CHARHT R 0.880000)
+ (CHARDP R 0.120000)
+ (COMMENT
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ )
+ )
+(TYPE O 2
+ (CHARWD R 0.500000)
+ (CHARHT R 0.880000)
+ (CHARDP R 0.120000)
+ (COMMENT
+ (GLUE O 0 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.500000 R 0.0 R 0.500000)
+ )
+ )
+(TYPE O 3
+ (CHARWD R 0.500000)
+ (CHARHT R 0.880000)
+ (CHARDP R 0.120000)
+ (COMMENT
+ (GLUE O 0 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 1 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 2 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 3 R 0.500000 R 0.0 R 0.250000)
+ (GLUE O 4 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.250000 R 0.0 R 0.250000)
+ )
+ )
+(TYPE O 4
+ (CHARWD R 0.500000)
+ (CHARHT R 0.880000)
+ (CHARDP R 0.120000)
+ (COMMENT
+ (GLUE O 0 R 0.500000 R 0.0 R 0.0)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.0)
+ (GLUE O 3 R 0.750000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.500000 R 0.0 R 0.0)
+ )
+ )
+(TYPE O 5
+ (CHARWD R 1.000000)
+ (CHARHT R 0.880000)
+ (CHARDP R 0.120000)
+ (COMMENT
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (KRN O 5 R 0.0)
+ )
+ )
diff --git a/zhmetrics-uptex/upzhm-v.pl b/zhmetrics-uptex/upzhm-v.pl
new file mode 100644
index 00000000..53d04f3a
--- /dev/null
+++ b/zhmetrics-uptex/upzhm-v.pl
@@ -0,0 +1,135 @@
+(COMMENT Chinese Font Metrics for upTeX Vertical Typesetting)
+(DIRECTION TATE)
+(FAMILY UPZHM HANZI)
+(FACE F MRR)
+(CODINGSCHEME TEX KANJI TEXT)
+(DESIGNSIZE R 10.0)
+(COMMENT DESIGNSIZE IS IN POINTS)
+(COMMENT OTHER SIZES ARE MULTIPLES OF DESIGNSIZE)
+(CHECKSUM O 0)
+(FONTDIMEN
+ (SLANT R 0.0)
+ (SPACE R 0.0)
+ (STRETCH R 0.100000)
+ (SHRINK R 0.0)
+ (XHEIGHT R 1.000000)
+ (QUAD R 1.000000)
+ (EXTRASPACE R 0.250000)
+ (EXTRASTRETCH R 0.200000)
+ (EXTRASHRINK R 0.125000)
+ )
+(GLUEKERN
+ (LABEL O 0)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (STOP)
+ (LABEL O 1)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (STOP)
+ (LABEL O 2)
+ (GLUE O 0 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.500000 R 0.0 R 0.500000)
+ (STOP)
+ (LABEL O 3)
+ (GLUE O 0 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 1 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 2 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 3 R 0.500000 R 0.0 R 0.250000)
+ (GLUE O 4 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.250000 R 0.0 R 0.250000)
+ (STOP)
+ (LABEL O 4)
+ (GLUE O 0 R 0.500000 R 0.0 R 0.0)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.0)
+ (GLUE O 3 R 0.750000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.500000 R 0.0 R 0.0)
+ (STOP)
+ (LABEL O 5)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (KRN O 5 R 0.0)
+ (STOP)
+ )
+(CHARSINTYPE O 1
+ ‘ “ ( 〔 [ { 〈 《 「 『
+ 【
+ UFF5F U3018 U3016 U301D
+ )
+(CHARSINTYPE O 2
+ 、 , ’ ” ) 〕 ] } 〉 》
+ 」 』 】
+ UFF60 U3019 U3017 U301F
+ )
+(CHARSINTYPE O 3
+ ・ : ;
+ )
+(CHARSINTYPE O 4
+ 。 .
+ )
+(CHARSINTYPE O 5
+ — ― … ‥
+ )
+(TYPE O 0
+ (CHARWD R 1.000000)
+ (CHARHT R 0.500000)
+ (CHARDP R 0.500000)
+ (COMMENT
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ )
+ )
+(TYPE O 1
+ (CHARWD R 0.500000)
+ (CHARHT R 0.500000)
+ (CHARDP R 0.500000)
+ (COMMENT
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ )
+ )
+(TYPE O 2
+ (CHARWD R 0.500000)
+ (CHARHT R 0.500000)
+ (CHARDP R 0.500000)
+ (COMMENT
+ (GLUE O 0 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.500000 R 0.0 R 0.500000)
+ )
+ )
+(TYPE O 3
+ (CHARWD R 0.500000)
+ (CHARHT R 0.500000)
+ (CHARDP R 0.500000)
+ (COMMENT
+ (GLUE O 0 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 1 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 2 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 3 R 0.500000 R 0.0 R 0.250000)
+ (GLUE O 4 R 0.250000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.250000 R 0.0 R 0.250000)
+ )
+ )
+(TYPE O 4
+ (CHARWD R 0.500000)
+ (CHARHT R 0.500000)
+ (CHARDP R 0.500000)
+ (COMMENT
+ (GLUE O 0 R 0.500000 R 0.0 R 0.0)
+ (GLUE O 1 R 0.500000 R 0.0 R 0.0)
+ (GLUE O 3 R 0.750000 R 0.0 R 0.250000)
+ (GLUE O 5 R 0.500000 R 0.0 R 0.0)
+ )
+ )
+(TYPE O 5
+ (CHARWD R 1.000000)
+ (CHARHT R 0.500000)
+ (CHARDP R 0.500000)
+ (COMMENT
+ (GLUE O 1 R 0.500000 R 0.0 R 0.500000)
+ (GLUE O 3 R 0.250000 R 0.0 R 0.250000)
+ (KRN O 5 R 0.0)
+ )
+ )