summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-07-11 03:01:09 +0000
committerNorbert Preining <norbert@preining.info>2021-07-11 03:01:09 +0000
commite8fe5891061b5c99a322e9d1b364f92c1016b3d5 (patch)
tree8d2b4d565db662420b4d02d6e882bb8471f4a96f /macros
parenta429edf534c5a39d3dc3112b4ef98d0c2cfb9e76 (diff)
CTAN sync 202107110301
Diffstat (limited to 'macros')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx170
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin561450 -> 557312 bytes
-rw-r--r--macros/latex/contrib/iexec/DEPENDS.txt2
-rw-r--r--macros/latex/contrib/iexec/iexec.pdfbin103987 -> 108202 bytes
-rw-r--r--macros/latex/contrib/iexec/iexec.sty22
-rw-r--r--macros/latex/contrib/iexec/iexec.tex26
-rw-r--r--macros/luatex/generic/luatexko/ChangeLog12
-rw-r--r--macros/luatex/generic/luatexko/README2
-rw-r--r--macros/luatex/generic/luatexko/luatexko-doc.pdfbin338396 -> 338346 bytes
-rw-r--r--macros/luatex/generic/luatexko/luatexko-doc.tex2
-rw-r--r--macros/luatex/generic/luatexko/luatexko-normalize.lua4
-rw-r--r--macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua4
-rw-r--r--macros/luatex/generic/luatexko/luatexko.lua179
-rw-r--r--macros/luatex/generic/luatexko/luatexko.sty9
14 files changed, 264 insertions, 168 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index 0234a25dfe..974c6c2049 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -28,7 +28,7 @@
%
% \title{\sffamily easybook 文档类手册}
% \author{瞿毅}
-% \date{2021/07/08\hskip\ccwd\relax v1.26z\thanks{\url{https://gitee.com/texl3/easybook}}}
+% \date{2021/07/10\hskip\ccwd\relax v1.27\thanks{\url{https://gitee.com/texl3/easybook}}}
%
% \maketitle
% \begin{abstract}
@@ -159,7 +159,7 @@
% floatpage = <true|(false)>
% \end{syntax}
% 开启这个选项后浮动环境 \env{table} 和 \env{figure} 的比例参数会使用默认值,关闭它则尽可能避免出现浮动页,使图表环境与正文段落更加紧凑,减少多余的空白版面。
-% \changes{v1.26z}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
+% \changes{v1.26}{2021/06/15}{增加浮动环境比例参数选项 \opt{floatpage}。}
% \end{function}
%
% \subsection{article 模式}
@@ -241,7 +241,7 @@
% \tn{BeforeAddBitoc*}\marg{加入目录英文标题前的代码}
% \end{syntax}
% \tn{appendix} 命令后的章节标题变为附录形式。英文目录中附录标题的格式用可选参数修改,英文附录目录前名字默认为 Appendix\tn{space},后名字默认为空,名字之间用一个半角逗号分开,也可以只有一部分,表示英文附录目录前名字。英文附录目录数字输出命令默认为 \tn{Alph}\{chapter\}。
-% \changes{v1.26z}{2021/06/13}{增加调整英文目录格式的钩子 \tn{BeforeAddBitoc}。}
+% \changes{v1.26}{2021/06/13}{增加调整英文目录格式的钩子 \tn{BeforeAddBitoc}。}
% \end{function}
%
% \tn{BeforeAddBitoc} 是一个作用于局部范围的英文目录钩子,可以插入标题或目录设置的命令改变英文目录中标题的显示格式,也可以覆盖上述的目录前后名字和编号等设置,带有星号的命令会重置之前的代码,放置在导言区或 \tn{bichapter} 等命令前生效。
@@ -256,7 +256,7 @@
% \ \oarg{水平偏移|(0pt)}\parg{下标代码}
% \end{syntax}
% 上标和下标的功能来自 \pkg{spbmark} 宏包,\tn{super}、\tn{sub} 和 \tn{supersub} 三个命令可以用于输出上标和下标。它们根据当前处于文本模式还是数学模式来匹配相应的模式,或者可以使用它们的星号变体命令来强制使用数学模式。也可以使用键值列表对偏移量进行全局设置,详情见小节 \ref{subsubsec:super-sub-script}。
-% \changes{v1.26z}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
+% \changes{v1.26}{2021/06/28}{增加可以调整相对位置和格式的上标和下标命令 \tn{super}、\tn{sub} 和 \tn{supersub}。}
% \end{function}
%
% 垂直和水平偏移默认值都是 0 pt,\meta{对齐方式} 的参数与 \opt{supersubalign} 相同。\meta{格式代码} 用于格式化上标和下标,可以插入字体或颜色等命令。代码中的最后一个命令可以接受一个为上标或下标的参数。上标和下标命令还分别具有更简短的等价命令 \tn{sp}、\tn{sb} 和 \tn{spb}。
@@ -307,7 +307,7 @@
% \tn{DeclareThemeColor}\{<风格名称>,<ctex@frame>,<ctex@emph>,<ctex@verb>\}
% \end{syntax}
% 可以使用 \tn{DeclareThemeColor} 命令声明新的主题颜色,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成主题颜色。类似地更改超链接颜色见小节 \ref{subsec:hyperlinks}。
-% \changes{v1.26z}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
+% \changes{v1.26}{2021/07/03}{使用 \tn{DeclareThemeColor} 命令声明新的颜色风格。}
% \end{function}
% \item[color-all] 统一设置主题的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
% \item[multoc] 开启多栏目录,与节 \ref{sec:document command} 中目录命令的同名选项有相同效果。
@@ -372,7 +372,7 @@
% \tn{DeclareLinkColor}\{<风格名称>,<ctex@link>,<ctex@url>,<ctex@cite>\}
% \end{syntax}
% 可以使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色样式,它的参数以英文逗号分隔,第一部分为颜色风格名称,后面三部分为 HTML 颜色代码,构成超链接颜色。
-% \changes{v1.26z}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
+% \changes{v1.26}{2021/07/03}{使用 \tn{DeclareLinkColor} 命令声明新的超链接颜色。}
% \end{function}
% \item[linkcol-all] 统一设置超链接的各部分颜色,参数是 6 个十六进制数字组成的 HTML 颜色代码,任意颜色的代码可以在常见的图片处理工具拾色器中查看。
% \item[linktoc] 将目录中的超链接取消、置于标题上、置于页码上或置于标题和页码上。
@@ -493,7 +493,7 @@
% \end{syntax}
% \ding{229} 以上选项路径为 \opt{thmset/...}
% \changes{v1.21}{2021/01/12}{增加配置定理环境样式的选项。}
-% \changes{v1.26z}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
+% \changes{v1.26}{2021/07/01}{增加配置公式标签括号选项 \opt{brackets}。}
% \end{function}
%
% \begin{optdesc}
@@ -520,7 +520,7 @@
% 文档类已预置 8 个定理环境,环境名及对应的定理标题名见小节 \ref{subsec:theorem},如果需要新的定理标题名或定理样式可使用这两个命令,由 \pkg{thmtools} 提供支持,用法与它的同名命令一致。
% \changes{v1.23}{2021/03/12}{重新定义了新定理环境命令 \tn{newtheorem}。}
% \changes{v1.24}{2021/04/25}{增加定义定理环境命令 \tn{DeclareTheorem}。}
-% \changes{v1.26z}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
+% \changes{v1.26}{2021/06/15}{定义新定理环境的命令调整为 \tn{declaretheorem}。}
% \end{function}
%
% \begin{optdesc}
@@ -626,7 +626,7 @@
% \tn{markrule}\oarg{长度|(\tn{textwidth})}\parg{颜色名}\marg{线宽|(0.75pt)}[<上间距>+<下间距>]
% \end{syntax}
% 命令 \tn{easyhead} 和 \tn{easyfoot} 的使用方法与 \tn{fancyhead} 和 \tn{fancyfoot} 完全相同,它们需要在 \opt{head-foot} 选项中使用,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
-% \changes{v1.26z}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
+% \changes{v1.26}{2021/06/14}{增加页眉页脚的横线绘制命令 \tn{markrule}。}
% \end{function}
%
% 命令 \tn{markrule} 用于绘制页眉页脚横线,长度默认为页面文本区的宽度,上下间距为横线与上下方部件的间距,带有长度单位,间距长度之间用 + 号分开,若只有一部分则表示上间距,这个命令也可以在正文中绘制横线。下面举一个设置页眉内容的例子:
@@ -694,7 +694,7 @@
% \begin{ctexexam}
% \tocset
% {
-% chapter =
+% chapter =
% {
% format = \addvspace{8pt}\large,
% indent = 1.5\ccwd,
@@ -799,7 +799,7 @@
% \end{ctexexam}
%
% \subsubsection{主题列表}
-% 使用 \env{description} 环境可创建带有主题词的列表。
+% 使用 \env{description} 环境可创建带有主题词的列表:
% \begin{ctexexam}
% \begin{description}
% \item[主题一] 内容一
@@ -964,7 +964,7 @@
% \tn{UseCounter*}\oarg{父计数器}\parg{编号|(arabic)}\marg{计数器}\marg{内容}\oarg{分隔符|(.)}\parg{数值}
% \end{syntax}
% \tn{newcounter} 是 \LaTeX 自带的创建计数器命令,\tn{UseCounter} 将会以一定的格式使用由它创建的计数器,将会以 \tn{the}\meta{父计数器}\meta{分隔符}\tn{the}\meta{计数器}\meta{内容} 输出当前内容。
-% \changes{v1.26z}{2021/06/30}{增加计数器使用命令 \tn{UseCounter}。}
+% \changes{v1.26}{2021/06/30}{增加计数器使用命令 \tn{UseCounter}。}
% \end{function}
%
% 需要注意的是 \tn{UseCounter} 仅具有 \textbf{输出功能},并不会改变计数器原有的绑定关系。默认每使用一次命令 \meta{计数器} 的值增加 1,带有星号的命令使 \meta{计数器} 保持当前值,\meta{编号} 为 arabic 和 alpha 等格式,\meta{数值} 可以手动将 \meta{计数器} 设为指定值。
@@ -980,8 +980,8 @@
% \subsection{化学式}
% \begin{function}[added = 2021-01-05]{\ch,\chemfig}
% \begin{syntax}
-% \tn{ch}\oarg{键值列表}\marg{输入}
-% \tn{chemfig}\oarg{键值列表}\marg{分子代码}
+% \tn{ch}\oarg{键值列表}\marg{化学式}
+% \tn{chemfig}\oarg{键值列表}\marg{化学式}
% \end{syntax}
% 除了以普通公式的方式,化学式还可用 \pkg{chemformula} 实现,无机化学式使用 \tn{ch} 命令书写。有机化学式推荐在导言区载入 \pkg{chemfig} 宏包,使用 \tn{chemfig} 命令完成。
% \end{function}
@@ -1151,7 +1151,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/08}{1.26z}
+\ProvidesExplClass{easybook}{2021/07/10}{1.27}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -1398,10 +1398,10 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/08}{1.26z}
+\ProvidesExplPackage{easybase}{2021/07/10}{1.27}
{Typeset Chinese theses or books}
-\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
+\cs_generate_variant:Nn \ctex_define:nn { nx }
\cs_generate_variant:Nn \int_to_arabic:n { v }
\cs_generate_variant:Nn \int_to_alph:n { v }
\cs_generate_variant:Nn \dim_add:Nn { NV,Nv }
@@ -1410,7 +1410,7 @@
\cs_generate_variant:Nn \int_compare:nNnT { oNnT }
\cs_generate_variant:Nn \prop_set_from_keyval:Nn { NV }
\cs_generate_variant:Nn \eb_at_begin_environment:nn { on }
-\cs_new_protected:Npn \eb_ctex_define:nn #1
+\cs_new_protected:Npn \ctex_define:nn #1
{ \keys_define:nn { ctex/#1 } }
\cs_new_protected:Npn \eb_clist_map_inline:nn #1#2
{
@@ -1518,7 +1518,7 @@
{ \PassOptionsToPackage #1 }
\ProcessKeysOptions{easybase}
-\bool_new:N \l__eb_multoc_bool
+\bool_new:N \l__eb_toc_multi_column_bool
\bool_new:N \l__eb_mark_uppercase_bool
\bool_new:N \l__eb_chap_counter_withpart_bool
\tl_new:N \l__eb_foot_counter_parent_choice_tl
@@ -1531,9 +1531,10 @@
}
{
\ctex_define:n { #1 .meta:nn = { ctex/#1 } {##1} }
- \cs_new:cpn {#1} ##1 { \keys_set:nn { ctex/#1 } {##1} }
+ \cs_new:cpn {#1} ##1 { \ctex_set:nn {#1} {##1} }
}
\keys_define:nn { } { ctex/link .inherit:n = ctex/refset }
+\ctex_define:n { link .meta:nn = { ctex/link } {#1} }
\cs_set_eq:NN \link \refset
\cs_if_exist:NF \chapter
{
@@ -1555,15 +1556,9 @@
Your~document~class~is~in~article~mode. \\
The~\string\chapter\space~command~will~not~be~used.
}
-\ctex_define:n
- {
- link .meta:nn = { ctex/link } {#1},
- lstlistlistingname .tl_set:N = \listlstlistingname,
- lstlistingname .tl_set:N = \lstlistingname
- }
-\eb_ctex_define:nn { style }
+\ctex_define:nn { style }
{
- multoc .bool_set:N = \l__eb_multoc_bool,
+ multoc .bool_set:N = \l__eb_toc_multi_column_bool,
multoc .default:n = true,
withpart .bool_set:N = \l__eb_chap_counter_withpart_bool,
withpart .default:n = true,
@@ -1612,7 +1607,8 @@
{ caption } { 2020/08/24 },
{ fancyhdr } { 2021/01/28 },
{ siunitx } { 2021/06/22 },
- { tabularray } { 2021/07/01 }
+ { tabularray } { 2021/07/01 },
+ { spbmark } { 2021/06/30 }
}
{ \eb_package_date_check:nn #1 }
@@ -1630,7 +1626,7 @@
marginparwidth = 2.54cm
}
\clist_new:N \g__eb_geometry_clist
-\eb_ctex_define:nn { geoset }
+\ctex_define:nn { geoset }
{
headruleskip .tl_set:N = \headruleskip,
headruleskip .initial:n = 1.5pt,
@@ -1714,7 +1710,7 @@
}
{ \int_use:N #1 }
}
-\eb_ctex_define:nn { hdrset }
+\ctex_define:nn { hdrset }
{
head-foot .tl_set:N = \l__eb_fancyhf_content_tl,
head-foot .initial:n =
@@ -1831,7 +1827,7 @@
\cs_if_exist:NF \kaishu { \cs_gset_eq:NN \kaishu \itshape }
}
-\eb_ctex_define:nn { style }
+\ctex_define:nn { style }
{
footwith .choices:nn =
{ part,page,chapter }
@@ -1903,12 +1899,13 @@
\cs_set:Npn \thempfootnote { \eb_alph:n { mpfootnote } }
\contentsuse{lstlisting}{lol}
-\seq_const_from_clist:Nn \c__eb_toc_heading_level_seq
- { part,chapter,section,subsection,figure,table,lstlisting }
+\seq_put_right:Nn \c__ctex_headings_seq { figure }
+\seq_put_right:Nn \c__ctex_headings_seq { table }
+\seq_put_right:Nn \c__ctex_headings_seq { lstlisting }
\cs_new_protected:Npn \eb_toc_assign_keys:n #1
{
\ctex_define:n { tocset/#1 .meta:nn = { ctex/tocset/#1 } {##1} }
- \eb_ctex_define:nn { tocset }
+ \ctex_define:nn { tocset }
{
#1/format .tl_set:c = l__eb_toc_#1_format_tl,
#1/format+ .code:n =
@@ -1917,14 +1914,14 @@
{ \tl_put_right:cn { l__eb_toc_#1_format_tl } {##1} },
#1/indent .dim_set:c = l__eb_toc_#1_indent_dim,
#1/rule .tl_set:c = l__eb_toc_#1_rule_tl,
- #1/numsep .tl_set:c = eb@toc@#1@numsep
+ #1/numsep .dim_set:c = eb@toc@#1@numsep
}
- \seq_if_in:NnF \c__eb_toc_heading_level_seq { subsection }
+ \seq_if_in:NnF \c__ctex_headings_seq { subparagraph }
{
- \eb_ctex_define:nn { tocset }
+ \ctex_define:nn { tocset }
{ #1/belowoffset .dim_set:c = l__eb_toc_#1_offset_dim }
}
- \seq_pop:NN \c__eb_toc_heading_level_seq \l_tmpa_tl
+ \seq_pop:NN \c__ctex_headings_seq \l_tmpa_tl
\titlecontents{#1}
[\dim_use:c { l__eb_toc_#1_indent_dim }]
{\tl_use:c { l__eb_toc_#1_format_tl }}
@@ -1943,12 +1940,12 @@
{\tl_use:c { l__eb_toc_#1_rule_tl }}
}
\seq_map_function:NN
-\c__eb_toc_heading_level_seq \eb_toc_assign_keys:n
+\c__ctex_headings_seq \eb_toc_assign_keys:n
\ctex_define:n { tocset/list .meta:nn = { ctex/tocset/list } {#1} }
\eb_clist_map_inline:nn
{ format,format+,format~+,indent,rule,numsep,belowoffset }
{
- \eb_ctex_define:nn { tocset }
+ \ctex_define:nn { tocset }
{
list/#1 .meta:n =
{
@@ -1964,16 +1961,17 @@
\CTEXifname
{
\ifbool{eb@titletoc@hang@fix}
- { \protect\numberline{\use:c { CTEXthe#1 }} }
+ {\eb@numberline{\use:c { CTEXthe#1 }}}
{
\use:c { CTEXthe#1 }
\hspace{\use:c { eb@toc@#1@numsep }}
}
}{}
}
+\cs_new:Npn \eb@numberline { \protect\numberline }
\cs_set_eq:NN \EBNumberLine \CTEXnumberline
\newbool{eb@titletoc@hang@fix}
-\eb_ctex_define:nn { tocset }
+\ctex_define:nn { tocset }
{
lolskip .skip_set:N = \l__eb_toc_lolskip_skip,
lolskip .initial:n = 0.8pc,
@@ -2097,7 +2095,7 @@
{
\addcontentsline{#1}{#2}
{
- \ifbool{eb@titletoc@hang@fix}{\protect\numberline}{}
+ \ifbool{eb@titletoc@hang@fix}{\eb@numberline}{}
{\prop_item:Nn \l__eb_label_name_prop {#2}{#3}}#4
}
}
@@ -2109,7 +2107,7 @@
{
\addcontentsline{lol}{lstlisting}
{
- \ifbool{eb@titletoc@hang@fix}{\protect\numberline}{}
+ \ifbool{eb@titletoc@hang@fix}{\eb@numberline}{}
{\eb@labelname@lol}\lst@@caption
}
}
@@ -2203,7 +2201,7 @@
}
}
-\eb_ctex_define:nn { style }
+\ctex_define:nn { style }
{
figure-con .tl_set:N = \l__eb_figure_connector_tl,
table-con .tl_set:N = \l__eb_table_connector_tl,
@@ -2241,7 +2239,7 @@
chapter .code:n = { },
article .meta:n = section,
book .meta:n = chapter,
- multoc .bool_set:N = \l__eb_multoc_bool,
+ multoc .bool_set:N = \l__eb_toc_multi_column_bool,
multoc .default:n = true,
multoc .initial:n = false,
title .code:n = \eb_assign_toc_title:n {#1},
@@ -2308,7 +2306,7 @@
}
\cs_new_protected:Npn \eb_toc_start_multicol_bool:n #1
{
- \bool_if:NTF \l__eb_multoc_bool
+ \bool_if:NTF \l__eb_toc_multi_column_bool
{
\begin{multicols}{\int_use:N \l__eb_toc_columns_int}
\@starttoc{#1}
@@ -2388,7 +2386,7 @@
}
}
-\eb_ctex_define:nn { chapter }
+\ctex_define:nn { chapter }
{
biname .code:n =
{ \ctex_assign_heading_name:nn { bichapter } {#1} },
@@ -2442,7 +2440,7 @@
\tl_new:N \l__eb_subfont_listing_tl
\tl_new:N \l__eb_subfont_footnote_tl
-\eb_ctex_define:nn { subfont }
+\ctex_define:nn { subfont }
{
table-cap .tl_set:N = \l__eb_subfont_table_tl,
table-cap .initial:n = \sffamily\small,
@@ -2492,7 +2490,7 @@
\fp_new:N \l__eb_spread_caption_fp
\fp_new:N \l__eb_spread_footnote_fp
-\eb_ctex_define:nn { spread }
+\ctex_define:nn { spread }
{
line .fp_set:N = \l__eb_spread_line_fp,
line .initial:n = 1.3,
@@ -2592,6 +2590,7 @@
\setcounter{bottomnumber}{4}
\setcounter{totalnumber}{8}
\allowdisplaybreaks[4]
+\everymath{\displaystyle}
\tl_gset:Nn \ULthickness { \l__eb_rule_width_dim }
\DeclareGraphicsExtensions{.pdf,.png,.jpg,.eps,.tif}
@@ -2629,7 +2628,7 @@
\setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *}
\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
-\cs_new_protected:Npn \eb_thmname_set:nnn #1#2#3
+\cs_new_protected:Npn \eb_thm_name_set:nnn #1#2#3
{
\tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
{ \tl_const:cn { c__eb_name_#1_tl } {#3} }
@@ -2640,7 +2639,7 @@
{
\ctex_at_end_preamble:n
{
- \eb_thmname_set:nnn {#1} {#2} {#3}
+ \eb_thm_name_set:nnn {#1} {#2} {#3}
\exp_args:No \declaretheorem@i
{
name = \tl_use:c { c__eb_name_#1_tl },
@@ -2677,7 +2676,7 @@
\prop_set_from_keyval:NV
\l__eb_thmtools_entry_prop \c__eb_thmtools_entry_clist
\prop_map_inline:Nn \l__eb_thmtools_entry_prop
- { \eb_ctex_define:nn { thmset } { #1 .tl_set:N = #2 } }
+ { \ctex_define:nn { thmset } { #1 .tl_set:N = #2 } }
\NewDocumentCommand{\eb_assign_tag_brackets:n}
{>{\SplitArgument{1}{,}}m}
{\eb_assign_tag_brackets_pos:nn #1}
@@ -2696,7 +2695,7 @@
\eb@tag@brackets@right
}
}
-\eb_ctex_define:nn { thmset }
+\ctex_define:nn { thmset }
{
thmbox .bool_set:N = \l__eb_thmbox_bool,
thmbox .default:n = true,
@@ -2718,7 +2717,7 @@
{
\exp_last_unbraced:NNV
\declaretheoremstyle[\c__eb_thmtools_entry_clist]{easy-theorem}
- \eb_thmname_set:nnn { exercise } { Exercise } { 练习 }
+ \eb_thm_name_set:nnn { exercise } { Exercise } { 练习 }
\cs_undefine:N \proof
\clist_map_inline:nn
{
@@ -2781,10 +2780,10 @@
}
\ctex_after_end_preamble:n
{
- \skip_set:Nn \abovedisplayskip { 5pt plus 1pt minus 1pt }
- \skip_set:Nn \belowdisplayskip { 5pt plus 1pt minus 1pt }
+ \skip_set:Nn \abovedisplayskip { 6pt plus 1pt minus 1pt }
+ \skip_set:Nn \belowdisplayskip { 6pt plus 1pt minus 1pt }
\skip_set:Nn \abovedisplayshortskip { 0pt }
- \skip_set:Nn \belowdisplayshortskip { 5pt plus 1pt minus 1pt }
+ \skip_set:Nn \belowdisplayshortskip { 6pt plus 1pt minus 1pt }
}
\ctex_at_end_package:nn { unicode-math }
{ \msg_redirect_module:nnn { unicode-math } { warning } { info } }
@@ -2815,7 +2814,7 @@
\tl_new:N \l__eb_bib_citestyle_tl
\clist_new:N \l__eb_bib_datafile_clist
-\eb_ctex_define:nn { bibset }
+\ctex_define:nn { bibset }
{
backend .choice:,
backend .value_required:n = true,
@@ -2864,7 +2863,7 @@
{ \exp_args:NV \setcitestyle \l__eb_bib_citestyle_tl }
\skip_zero:N \bibsep
\AtEndEnvironment{thebibliography}
- {\bool_if:NT \l__eb_multoc_bool { \end{multicols} }}
+ {\bool_if:NT \l__eb_toc_multi_column_bool { \end{multicols} }}
\NewDocumentCommand{\printbibliography}{st+o}
{
\group_begin:
@@ -2873,7 +2872,7 @@
\tl_set:Nn \bibsection
{
\eb_title_number_intoc_bool:nn {##2} {##1}
- \bool_if:NT \l__eb_multoc_bool
+ \bool_if:NT \l__eb_toc_multi_column_bool
{ \begin{multicols}{\int_use:N \l__eb_toc_columns_int} }
}
\exp_args:NV \bibliography \l__eb_bib_datafile_clist
@@ -2972,7 +2971,7 @@
% numbers = left,
numberstyle = \footnotesize,
aboveskip = 1.5ex plus .2ex minus .1ex,
- belowskip = 0.55ex plus .2ex minus .1ex,
+ belowskip = 1ex plus .2ex minus .1ex,
keepspaces = true,
framerule = \l__eb_rule_width_dim,
columns = flexible,
@@ -2984,23 +2983,23 @@
\clist_new:N \l__eb_hyperref_clist
\cs_new_protected:Npn \eb_put_hyperref:n #1
{ \clist_put_right:Nn \l__eb_hyperref_clist {#1} }
-\cs_new_protected:Npn \eb_define_linkcolor:nnn #1#2#3
+\cs_new_protected:Npn \eb_define_link_color:nnn #1#2#3
{ \definecolorset{HTML}{ctex@}{}{link,#1;url,#2;cite,#3} }
-\cs_new_protected:Npn \eb_define_themecolor:nnn #1#2#3
+\cs_new_protected:Npn \eb_define_theme_color:nnn #1#2#3
{ \definecolorset{HTML}{ctex@}{}{frame,#1;emph,#2;verb,#3} }
-\cs_new_protected:Npn \eb_define_linkcolor:n #1
+\cs_new_protected:Npn \eb_define_link_color:n #1
{ \definecolorset{HTML}{ctex@}{}{link,#1;url,#1;cite,#1} }
-\cs_new_protected:Npn \eb_define_themecolor:n #1
+\cs_new_protected:Npn \eb_define_theme_color:n #1
{ \definecolorset{HTML}{ctex@}{}{frame,#1;emph,#1;verb,#1} }
\cs_new_protected:Npn \DeclareLinkColor #1
- { \eb_ctex_define:nx { refset } { \eb_linkcolor_set:n {#1} } }
+ { \ctex_define:nx { refset } { \eb_link_color_set:n {#1} } }
\cs_new_protected:Npn \DeclareThemeColor #1
- { \eb_ctex_define:nx { style } { \eb_themecolor_set:n {#1} } }
-\cs_new:Npn \eb_linkcolor_set:n #1
+ { \ctex_define:nx { style } { \eb_theme_color_set:n {#1} } }
+\cs_new:Npn \eb_link_color_set:n #1
{
linkcolor/\clist_item:nn {#1} { 1 } .code:n =
{
- \eb_define_linkcolor:nnn
+ \eb_define_link_color:nnn
{ \clist_item:nn {#1} { 2 } }
{ \clist_item:nn {#1} { 3 } }
{ \clist_item:nn {#1} { 4 } }
@@ -3012,11 +3011,11 @@
}
},
}
-\cs_new:Npn \eb_themecolor_set:n #1
+\cs_new:Npn \eb_theme_color_set:n #1
{
color/\clist_item:nn {#1} {1} .code:n =
{
- \eb_define_themecolor:nnn
+ \eb_define_theme_color:nnn
{ \clist_item:nn {#1} { 2 } }
{ \clist_item:nn {#1} { 3 } }
{ \clist_item:nn {#1} { 4 } }
@@ -3024,7 +3023,7 @@
}
\bool_set_false:N \l__eb_toc_number_color_bool
-\eb_ctex_define:nn { refset }
+\ctex_define:nn { refset }
{
linktype .choice:,
linktype .value_required:n = true,
@@ -3057,7 +3056,7 @@
}
}
}
-\eb_ctex_define:nx { refset }
+\ctex_define:nx { refset }
{
linkcolor .choice:,
\clist_map_function:nN
@@ -3067,14 +3066,14 @@
{ navyblue, 000080,004986,eb6877 },
{ crimson, dc143c,00c1c9,afcd20 }
}
- \eb_linkcolor_set:n
+ \eb_link_color_set:n
linkcolor .default:n = navyblue,
linkcolor .initial:n = navyblue,
linkcol-all .code:n =
- { \eb_define_linkcolor:n { \exp_not:n {#1} } }
+ { \eb_define_link_color:n { \exp_not:n {#1} } }
}
\colorlet{ctex@toc@number}{ctex@link}
-\eb_ctex_define:nx { style }
+\ctex_define:nx { style }
{
color .choice:,
color .value_required:n = true,
@@ -3085,10 +3084,10 @@
{ energy, f39800,00a0e9,893895 },
{ cyberpunk, 601986,eb6877,a4005b }
}
- \eb_themecolor_set:n
+ \eb_theme_color_set:n
color .initial:n = none,
color-all .code:n =
- { \eb_define_themecolor:n { \exp_not:n {#1} } }
+ { \eb_define_theme_color:n { \exp_not:n {#1} } }
}
\cs_new:Npn \eb_allow_urlbreak:
@@ -3118,6 +3117,11 @@
\labelformat{figure}{\figurename~#1}
\labelformat{table}{\tablename~#1}
\cs_if_free:NT \bibname { \cs_set_eq:NN \bibname \refname }
+\ctex_define:n
+ {
+ lstlistlistingname .tl_set:N = \listlstlistingname,
+ lstlistingname .tl_set:N = \lstlistingname
+ }
\tl_if_eq:NnTF \l__ctex_scheme_tl { chinese }
{
\keys_set_known:nn { ctex }
@@ -3147,7 +3151,7 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/08}{1.26z}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/10}{1.27}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1
@@ -3258,7 +3262,7 @@
}
}{
\group_begin:
- \ctex_set:nn { section } { format += \centering }
+ \ctex_set:n { section/format += \centering }
\IfValueT{#4}{\ctex_set:nn { section } {#4}}
\IfBooleanTF{#1}
{\section*{\eb@tc@exercise@title}}
@@ -3310,7 +3314,7 @@
left = 8pt,right = 8pt,middle= 8pt,
sharpish~corners,
bottomtitle = 8pt,
- beforeafter~skip = 1.5ex,
+ beforeafter~skip = 2ex,
colframe = #2,coltitle = #2,#4
}
\DeclareTotalTCBox{\ebemph}{O{DarkSeaGreen}vO{}}
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index d09bd1e928..8a95bd0721 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/iexec/DEPENDS.txt b/macros/latex/contrib/iexec/DEPENDS.txt
new file mode 100644
index 0000000000..6645129e89
--- /dev/null
+++ b/macros/latex/contrib/iexec/DEPENDS.txt
@@ -0,0 +1,2 @@
+hard shellesc
+hard xkeyval
diff --git a/macros/latex/contrib/iexec/iexec.pdf b/macros/latex/contrib/iexec/iexec.pdf
index a12a6b9d2b..044e9bea67 100644
--- a/macros/latex/contrib/iexec/iexec.pdf
+++ b/macros/latex/contrib/iexec/iexec.pdf
Binary files differ
diff --git a/macros/latex/contrib/iexec/iexec.sty b/macros/latex/contrib/iexec/iexec.sty
index a84c53e458..91d10955c3 100644
--- a/macros/latex/contrib/iexec/iexec.sty
+++ b/macros/latex/contrib/iexec/iexec.sty
@@ -21,22 +21,24 @@
% SOFTWARE.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{iexec}[2021/07/08 0.1.0 Inputable Shell Executions]
+\ProvidesPackage{iexec}[2021/07/10 0.3.0 Inputable Shell Executions]
-\makeatletter\newcommand\exec[1]{%
+\RequirePackage{shellesc}
+
+\RequirePackage{xkeyval}
+\newif\iftrace
+\DeclareOptionX{trace}{\tracetrue}
+\ProcessOptionsX\relax
+
+\makeatletter\newcommand\iexec[2][iexec.tmp]{%
\begingroup%
\let\%\@percentchar%
\let\{\@charlb%
\let\}\@charrb%
- \ShellEscape{#1}%
+ \ShellEscape{#2 > #1}%
\endgroup%
-}\makeatother
-
-\newcommand\iexec[1]{%
- \exec{#1 > iexec.tmp}%
- \exec{echo >> iexec.tmp}%
- \input{iexec.tmp}\unskip%
- \exec{rm iexec.tmp}%
+ \input{#1}\unskip%
+ \iftrace\else\exec{rm #1}\fi%
}\makeatother
\endinput
diff --git a/macros/latex/contrib/iexec/iexec.tex b/macros/latex/contrib/iexec/iexec.tex
index a61b55178b..150c8fa882 100644
--- a/macros/latex/contrib/iexec/iexec.tex
+++ b/macros/latex/contrib/iexec/iexec.tex
@@ -21,13 +21,13 @@
% SOFTWARE.
\documentclass[12pt]{article}
+\usepackage[trace]{iexec}
\usepackage[tt=false,type1=true]{libertine}
\usepackage{multicol}
\usepackage{ffcode}
-\usepackage{iexec}
\title{\ff{iexec}: \LaTeX{} Package \\ for Inputable Shell Executions}
\author{Yegor Bugayenko}
-\date{0.1.0 2021/07/08}
+\date{0.3.0 2021/07/10}
\begin{document}
\pagenumbering{gobble}
\raggedbottom
@@ -43,25 +43,35 @@ document and then put their output to the document:
\setlength{\parskip}{0pt}
\scriptsize
\raggedcolumns
-\begin{verbatim}
+\begin{ffcode}
\documentclass{article}
\usepackage{iexec}
\begin{document}
Today is \iexec{date +\%e-\%b-\%Y}.
\end{document}
-\end{verbatim}
+\end{ffcode}
\columnbreak
Today is \iexec{date +\%e-\%b-\%Y}.
\end{multicols}
-You have to run \ff{pdflatex} with the \ff{--shell-escape} flag
+You have to run \ff{pdflatex} (or just \ff{latex}) with the \ff{--shell-escape} flag
in order to let \ff{ShellEscape} (the package we use) to run shell.
-There are two commands: \ff{\char`\\exec} and \ff{\char`\\iexec}.
-The first one executes, while the second one also inputs the output
-of the execution.
+If you don't want the output to be visible,
+use \ff{\char`\\phantom\char`\{\char`\\iexec\char`\{...\char`\}\char`\}}.
+
+The output of your code is saved into the file provided as the
+second optional argument of \ff{\char`\\iexec} (the default value is \ff{iexec.tmp}):
+
+\begin{ffcode}
+Today is \iexec[date.txt]{date +\%e-\%b-\%Y}.
+\end{ffcode}
+
+The file specified will be deleted right after its usage. If you don't
+want this to happen, use \ff{trace} package option: all files will remain
+in the directory.
More details about this package you can find
in the \ff{yegor256/iexec} GitHub repository.
diff --git a/macros/luatex/generic/luatexko/ChangeLog b/macros/luatex/generic/luatexko/ChangeLog
index 07a26993c6..62e73af1e4 100644
--- a/macros/luatex/generic/luatexko/ChangeLog
+++ b/macros/luatex/generic/luatexko/ChangeLog
@@ -1,3 +1,15 @@
+2021-07-10 Dohyun Kim <nomos at ktug org>
+
+ Version 3.3
+
+ * luatexko.sty:
+ - respect 'para/end' hook
+ - allow linebreak before CJK Unified Ideographs Extension G
+
+ * luatexko.lua:
+ - normalize node sequence 'LV, T'
+ - fix a bug wrt detection of HB fonts
+
2021-06-10 Dohyun Kim <nomos at ktug org>
Version 3.2
diff --git a/macros/luatex/generic/luatexko/README b/macros/luatex/generic/luatexko/README
index f3e1feb636..fd2b7fd95b 100644
--- a/macros/luatex/generic/luatexko/README
+++ b/macros/luatex/generic/luatexko/README
@@ -1,4 +1,4 @@
-LuaTeX-ko Package version 3.2 (2021/06/10)
+LuaTeX-ko Package version 3.3 (2021/07/10)
===========================================
This is a Lua(La)TeX macro package that supports typesetting Korean
diff --git a/macros/luatex/generic/luatexko/luatexko-doc.pdf b/macros/luatex/generic/luatexko/luatexko-doc.pdf
index 7b4c4336e6..033ac28c5b 100644
--- a/macros/luatex/generic/luatexko/luatexko-doc.pdf
+++ b/macros/luatex/generic/luatexko/luatexko-doc.pdf
Binary files differ
diff --git a/macros/luatex/generic/luatexko/luatexko-doc.tex b/macros/luatex/generic/luatexko/luatexko-doc.tex
index 9153b572ed..8b32a6f49e 100644
--- a/macros/luatex/generic/luatexko/luatexko-doc.tex
+++ b/macros/luatex/generic/luatexko/luatexko-doc.tex
@@ -142,7 +142,7 @@
\author{Dohyun Kim \normalsize |<nomos at ktug org>| \and
Soojin Nam \normalsize |<jsunam at gmail com>| \and
\normalsize <\url{http://github.com/dohyunkim/luatexko}>}
-\date{Version 3.2\quad 2021/06/10}
+\date{Version 3.3\quad 2021/07/10}
\maketitle
\begin{quote}
diff --git a/macros/luatex/generic/luatexko/luatexko-normalize.lua b/macros/luatex/generic/luatexko/luatexko-normalize.lua
index 96a0d12cf3..961d581c79 100644
--- a/macros/luatex/generic/luatexko/luatexko-normalize.lua
+++ b/macros/luatex/generic/luatexko/luatexko-normalize.lua
@@ -13,8 +13,8 @@
luatexbase.provides_module({
name = "luatexko-normalize",
- version = "3.2",
- date = "2021/06/10",
+ version = "3.3",
+ date = "2021/07/10",
author = "Dohyun Kim, Soojin Nam",
description = "Hangul normalization",
license = "LPPL v1.3+",
diff --git a/macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua b/macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua
index 2c5fd64f9e..1a48a48693 100644
--- a/macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua
+++ b/macros/luatex/generic/luatexko/luatexko-uhc2utf8.lua
@@ -13,8 +13,8 @@
luatexbase.provides_module({
name = "luatexko-uhc2utf8",
- version = "3.2",
- date = "2021/06/10",
+ version = "3.3",
+ date = "2021/07/10",
author = "Dohyun Kim, Soojin Nam",
description = "UHC (CP949) input encoding",
license = "LPPL v1.3+",
diff --git a/macros/luatex/generic/luatexko/luatexko.lua b/macros/luatex/generic/luatexko/luatexko.lua
index aa1aa4149f..6b82a190f5 100644
--- a/macros/luatex/generic/luatexko/luatexko.lua
+++ b/macros/luatex/generic/luatexko/luatexko.lua
@@ -13,8 +13,8 @@
luatexbase.provides_module {
name = 'luatexko',
- date = '2021/06/10',
- version = '3.2',
+ date = '2021/07/10',
+ version = '3.3',
description = 'typesetting Korean with LuaTeX',
author = 'Dohyun Kim, Soojin Nam',
license = 'LPPL v1.3+',
@@ -184,7 +184,12 @@ local os2tag = harfbuzz and harfbuzz.Tag.new"OS/2"
local fontoptions = {
is_not_harf = setmetatable( {}, { __index = function (t, fid)
if fid then
- local bool = has_harf_data(fid) and false or true
+ local bool
+ if has_harf_data(fid) then
+ bool = false
+ else
+ bool = true
+ end
t[fid] = bool
return bool
end
@@ -415,8 +420,8 @@ end
local function is_hanja (c)
return c >= 0x3400 and c <= 0xA4C6
- or c >= 0xF900 and c <= 0xFAD9
- or c >= 0x20000 and c <= 0x2FFFD
+ or c >= 0xF900 and c <= 0xFAFF
+ or c >= 0x20000 and c <= 0x3FFFD
or c >= 0x2E81 and c <= 0x2FD5
end
@@ -447,16 +452,18 @@ local function is_compat_jamo (c)
return c >= 0x3131 and c <= 0x318E
end
-local function is_unicode_var_sel (c)
- return c >= 0xFE00 and c <= 0xFE0F
- or c >= 0xE0100 and c <= 0xE01EF
-end
-
-local function is_cjk_combining (c)
+local function is_combining (c)
return c >= 0x302A and c <= 0x302F
- or c >= 0x3099 and c <= 0x309C
- or c >= 0xFF9E and c <= 0xFF9F
- or is_unicode_var_sel(c)
+ or c == 0x3099 or c == 0x309A
+ -- variation selectors
+ or c >= 0xFE00 and c <= 0xFE0F
+ or c >= 0xE0100 and c <= 0xE01EF
+ -- others (probably non-cjk)
+ or c >= 0x0300 and c <= 0x036F
+ or c >= 0x1AB0 and c <= 0x1AFF
+ or c >= 0x1DC0 and c <= 0x1DFF
+ or c >= 0x20D0 and c <= 0x20FF
+ or c >= 0xFE20 and c <= 0xFE2F
end
local function is_noncjk_char (c)
@@ -465,12 +472,12 @@ local function is_noncjk_char (c)
or c >= 0x61 and c <= 0x7A
or c >= 0xC0 and c <= 0xD6
or c >= 0xD8 and c <= 0xF6
- or c >= 0xF8 and c <= 0x10FC
- or c >= 0x1200 and c <= 0x1FFE
- or c >= 0xA4D0 and c <= 0xA877
- or c >= 0xAB01 and c <= 0xABBF
- or c >= 0xFB00 and c <= 0xFDFD
- or c >= 0xFE70 and c <= 0xFEFC
+ or c >= 0xF8 and c <= 0x10FF
+ or c >= 0x1200 and c <= 0x1FFF
+ or c >= 0xA4D0 and c <= 0xA95F
+ or c >= 0xA980 and c <= 0xABFF
+ or c >= 0xFB00 and c <= 0xFDFF
+ or c >= 0xFE70 and c <= 0xFEFF
end
local function is_kana (c)
@@ -564,17 +571,19 @@ local breakable_after = setmetatable({
[0x2013] = true, [0x2014] = true, [0x25A1] = true, [0x25CB] = true,
[0x2E80] = true, [0x3003] = true, [0x3005] = true, [0x3007] = true,
[0x301C] = true, [0x3035] = true, [0x303B] = true, [0x303C] = true,
+ [0x309B] = true, [0x309C] = true,
[0x309D] = true, [0x309E] = true, [0x30A0] = true, [0x30FC] = true,
[0x30FD] = true, [0x30FE] = true, [0xFE13] = true, [0xFE14] = true,
[0xFE32] = true, [0xFE50] = true, [0xFE51] = true, [0xFE52] = true,
[0xFE54] = true, [0xFE55] = true, [0xFE57] = true, [0xFE57] = true,
[0xFE58] = true, [0xFE5A] = true, [0xFE5C] = true, [0xFE5E] = true,
[0xFF1E] = true, [0xFF5E] = true, [0xFF70] = true, [0x226B] = true, -- ≫
+ [0xFF9E] = true, [0xFF9F] = true,
},{ __index = function (_,c)
return is_hangul_jamo(c) -- chosong also is breakable_after
or is_noncjk_char(c)
or is_hanja(c)
- or is_cjk_combining(c)
+ or is_combining(c)
or is_kana(c)
or charclass[c] >= 2
end })
@@ -600,6 +609,8 @@ local breakable_before = setmetatable({
[0xFF6B] = 1000, [0xFF6C] = 1000, [0xFF6D] = 1000, [0xFF6E] = 1000,
[0xFF6F] = 1000, [0x1B150] = 1000, [0x1B151] = 1000, [0x1B152] = 1000,
[0x1B164] = 1000, [0x1B165] = 1000, [0x1B166] = 1000, [0x1B167] = 1000,
+ -- nonstarter
+ [0xA015] = false, -- YI SYLLABLE WU
},{ __index = function(_,c)
return is_hangul(c)
or is_compat_jamo(c)
@@ -614,7 +625,7 @@ luatexko.breakablebefore = breakable_before
local function is_cjk_char (c)
return is_hangul_jamo(c)
or is_hanja(c)
- or is_cjk_combining(c)
+ or hangul_tonemark[c]
or is_kana(c)
or charclass[c] >= 1
or rawget(breakable_before, c) and c >= 0x2000
@@ -696,22 +707,33 @@ local function process_fonts (head)
local c = curr.char
- if is_cjk_combining(c) then
+ local done
+ if is_combining(c) then
local p = getprev(curr)
- if p.id == glyphid and curr.font ~= p.font then
- hangul_space_skip(curr, p.font)
- curr.font = p.font
+ if p and p.id == glyphid then
+ if curr.font ~= p.font then
+ hangul_space_skip(curr, p.font)
+ curr.font = p.font
+ end
curr.lang = p.lang
- end
- if not active_processes.reorderTM and
- hangul_tonemark[c] and
- fontoptions.is_not_harf[curr.font] and
- fontoptions.is_hangulscript[curr.font] then
- luatexko.activate("reorderTM") -- activate reorderTM here
+ if hangul_tonemark[c] then
+ if not active_processes.reorderTM and
+ fontoptions.is_not_harf[curr.font] and
+ fontoptions.is_hangulscript[curr.font] then
+ luatexko.activate("reorderTM") -- activate reorderTM here
+ end
+
+ set_attribute(curr, unicodeattr, c)
+ else
+ curr.attr = p.attr -- inherit previous attr including unicodeattr
+ end
+ done = true
end
+ end
+
+ if not done then
- else
if curr.subtype == 1 and curr.lang ~= nohyphen and is_cjk_char(c) then
curr.lang = langkor -- suppress hyphenation of cjk chars
end
@@ -740,14 +762,13 @@ local function process_fonts (head)
end
end
end
+ set_attribute(curr, unicodeattr, c)
end
-
- set_attribute(curr, unicodeattr, c)
end
elseif id == discid then
- curr.pre = process_fonts(curr.pre)
- curr.post = process_fonts(curr.post)
- curr.replace = process_fonts(curr.replace)
+ process_fonts(curr.pre)
+ process_fonts(curr.post)
+ process_fonts(curr.replace)
elseif id == mathid then
curr = end_of_math(curr)
elseif id == whatsitid and
@@ -761,7 +782,6 @@ local function process_fonts (head)
end
curr = getnext(curr)
end
- return head
end
-- linebreak
@@ -787,7 +807,7 @@ local function hbox_char_font (box, init, glyfonly)
local id = curr.id
if id == glyphid then
local c = has_attribute(curr, unicodeattr) or curr.char
- if c and not is_cjk_combining(c) then
+ if c and not is_combining(c) then
return c, curr.font
end
elseif curr.list then
@@ -866,7 +886,7 @@ local function process_linebreak (head, par)
local id = curr.id
if id == glyphid then
local c = has_attribute(curr, unicodeattr) or curr.char
- if c and not is_unicode_var_sel(c) then
+ if c and not is_combining(curr.char) then -- we are in pre-shaping stage
local old = has_attribute(curr, classicattr)
head, pc, pcl = maybe_linebreak(head, curr, pc, pcl, c, old, curr.font, par)
end
@@ -921,7 +941,7 @@ local function process_interhangul (head, par)
local id = curr.id
if id == glyphid then
local c = has_attribute(curr, unicodeattr) or curr.char
- if c and not is_unicode_var_sel(c) then
+ if c and not is_combining(curr.char) then -- we are in pre-shaping stage
head, pc = do_interhangul_option(head, curr, pc, c, curr.font, par)
if is_jungsong(c) or is_jongsong(c) or hangul_tonemark[c] then
@@ -983,7 +1003,7 @@ local function process_interlatincjk (head, par)
local id = curr.id
if id == glyphid then
local c = has_attribute(curr, unicodeattr) or curr.char
- if c and not is_unicode_var_sel(c) then
+ if c and not is_combining(curr.char) then -- we are in pre-shaping stage
head, pc, pf, pcl = do_interlatincjk_option(head, curr, pc, pf, pcl, c, curr.font, par)
pc = breakable_after[c] and pc or 0
end
@@ -1095,7 +1115,7 @@ local function process_remove_spaces (head)
local vchar, vfont
if id == glyphid and v.lang ~= nohyphen then
local c = has_attribute(v, unicodeattr) or v.char or 0
- if is_unicode_var_sel(c) then
+ if is_combining(c) then
v = getprev(v) or v
end
vchar, vfont = has_attribute(v, unicodeattr) or v.char, v.font
@@ -1335,18 +1355,23 @@ local function process_dotemph (head)
elseif curr.id == glyphid then
local dotattr = has_attribute(curr, dotemphattr)
if dotattr and dotemphbox[dotattr] then
- local c = has_attribute(curr, unicodeattr) or curr.char
- if is_hangul(c) or
- is_compat_jamo(c) or
- is_chosong(c) or
- is_hanja(c) or
- is_kana(c) then
-
- -- harf font: skip reordered tone mark
- if harf_reordered_tonemark(curr) then
- curr = getnext(curr)
+
+ local ok
+ if hangul_tonemark[curr.char] and harf_reordered_tonemark(curr) then
+ curr = getnext(curr)
+ if is_hangul_jamo(has_attribute(curr, unicodeattr) or curr.char) then
+ ok = true
end
+ else
+ if not is_combining(curr.char) then -- bypass unicodeattr inherited
+ local c = has_attribute(curr, unicodeattr) or curr.char
+ if is_hangul(c) or is_compat_jamo(c) or is_chosong(c) or is_hanja(c) or is_kana(c) then
+ ok = true
+ end
+ end
+ end
+ if ok then
local currwd = curr.width
if currwd >= fontoptions.en_size[curr.font] then
local box = nodecopy(dotemphbox[dotattr]).list
@@ -2016,6 +2041,7 @@ local function process_fake_slant_corr (head) -- for font fallback
else
break
end
+ elseif p.id == whatsitid then
else
break
end
@@ -2076,18 +2102,55 @@ local function process_fake_slant_font (fontdata, fsl)
end
end
+-- AC00 11A8, AC00 11F0 ...
+-- these should not happen in KS-observing documents
+-- but HarfBuzz supports these sequences anyway.
+local function normalize_syllable_TC (head)
+ local curr = head
+ while curr do
+ if curr.id == glyphid then
+ local c, f = curr.char, curr.font
+ if is_hangul(c) and (c - 0xAC00) % 28 == 0 then
+ local t = getnext(curr)
+ if t then
+ if t.id == glyphid then
+ local tc, tf = t.char, t.font
+ if is_jongsong(tc) and f == tf then
+ if tc <= 0x11C2 then
+ curr.char = c + tc - 0x11A7
+ noderemove(head, t)
+ nodefree(t)
+ else
+ c = (c - 0xAC00) // 28
+ curr.char = c // 21 + 0x1100
+ local v = nodecopy(curr)
+ v.char = c % 21 + 0x1161
+ insert_after(head, curr, v)
+ curr = t
+ end
+ end
+ else
+ curr = t
+ end
+ end
+ end
+ end
+ curr = getnext(curr)
+ end
+end
+
-- wrap up
add_to_callback ("hyphenate",
function(head)
- local head = process_fonts(head)
+ normalize_syllable_TC(head)
+ process_fonts(head)
lang.hyphenate(head)
end,
"luatexko.hyphenate.fonts_and_languages")
-local pass_fun = function(...) return ... end
-create_callback("luatexko_prelinebreak_first", "data", pass_fun)
-create_callback("luatexko_prelinebreak_second", "data", pass_fun)
+create_callback("luatexko_prelinebreak_first", "data", function(...) return ... end)
+create_callback("luatexko_prelinebreak_second", "data", function(...) return ... end)
add_to_callback("pre_shaping_filter", function(h, gc)
local par = gc == ""
diff --git a/macros/luatex/generic/luatexko/luatexko.sty b/macros/luatex/generic/luatexko/luatexko.sty
index b3f78f4ba4..0cfb6da6a9 100644
--- a/macros/luatex/generic/luatexko/luatexko.sty
+++ b/macros/luatex/generic/luatexko/luatexko.sty
@@ -14,7 +14,7 @@
\ifdefined\luatexkohangulfontattr \endinput\fi
\ifdefined\ProvidesPackage
\NeedsTeXFormat{LaTeX2e}[2021/06/01]
- \ProvidesPackage{luatexko}[2021/06/10 v3.2 typesetting Korean with LuaTeX]
+ \ProvidesPackage{luatexko}[2021/07/10 v3.3 typesetting Korean with LuaTeX]
\RequirePackage{luatexbase}
\RequirePackage{fontspec}[2020/02/03]
\else
@@ -351,6 +351,7 @@
\fi
\typesetvertical }
\protected\def\endvertical{%
+ \ifinner\else \par\fi
\egroup
\luatexkorotatebox\z@
\box\z@ }
@@ -381,6 +382,7 @@
\fi
\typesetmodern }
\protected\def\endhorizontal{%
+ \ifinner\else \par\fi
\egroup
\luatexkounrotatebox\z@
\raise\luatexkohorizboxmoveright
@@ -464,7 +466,7 @@
\unexpanded\expandafter{\plainoutput}}%
\def\pagebody{\setbox\z@\vbox to\hsize{\boxmaxdepth=\maxdepth \pagecontents}%
\luatexkorotatebox\z@\box\z@}%
- \maxdepth\z@ \typesetvertical
+ \typesetvertical
\let\verticaltypesetting\relax % prevent multiple running
}
\def\beginverticaltypesetting{\vfill\supereject \begingroup \verticaltypesetting}
@@ -539,7 +541,7 @@
\expandafter\textwidth\expandafter\textheight
\@outputpage
}%
- \maxdepth\z@ \typesetvertical
+ \typesetvertical
\let\verticaltypesetting\relax % prevent multiple running
}
\def\endverticaltypesetting{%
@@ -964,6 +966,7 @@
\def\는{는}\def\은{은}\def\을{을}\def\를{를}\def\와{와}\def\과{과}%
\def\가{가}\def\이{이}\def\라{라}\def\으{으}\def\로{로}%
\def\hellipsis{...}}}{}
+ \@ifpackageloaded{pxrubrica}{\let\ruby\jruby}{}
\if@hangul \RequirePackage{konames-utf}\fi
}
% misc