summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-16 19:57:18 +0000
committerKarl Berry <karl@freefriends.org>2021-07-16 19:57:18 +0000
commit189cdddc0579b30df1ea73a5d8583a8c8ce7f66f (patch)
tree2fdb6ae2a5cab88f5bb480acb1208a4c1ee4a03d /Master/texmf-dist/tex
parent3c158eac975b16a9b1c8b73c3be9acf9e820ab5a (diff)
easybook (16jul21)
git-svn-id: svn://tug.org/texlive/trunk@59951 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybase.sty116
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls11
-rw-r--r--Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg6
3 files changed, 74 insertions, 59 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty
index 50e5b1ff603..0ae1f19d209 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybase.sty
+++ b/Master/texmf-dist/tex/latex/easybook/easybase.sty
@@ -13,7 +13,7 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/07/14}{1.27e}
+\ProvidesExplPackage{easybase}{2021/07/16}{1.27g}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -39,15 +39,20 @@
\seq_set_from_clist:Nn \l_tmpb_seq {#1}
\seq_map_function:NN \l_tmpb_seq #2
}
-\cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3
+\cs_new_protected:Npn \eb_char_patch_cmd:nnn #1#2#3
{
- \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3}
- { } { \ctex_patch_failure:N #1 }
+ \ExplSyntaxOn\makeatletter
+ \eb_clist_map_inline:nn {#1}
+ {
+ \ctex_patch_cmd_once:NnnnTF ##1 { } {#2} {#3}
+ { } { \ctex_patch_failure:N ##1 }
+ }
+ \ExplSyntaxOff\makeatother
}
-\cs_new_protected:Npn \eb_patch_cmd:nnn #1#2#3
+\cs_new_protected:Npn \eb_at_end_patch_cmd:nnn #1#2#3
{
- \eb_clist_map_inline:nn {#1}
- { \eb_patch_cmd:Nnn ##1 {#2} {#3} }
+ \eb_at_end_preamble:n
+ { \eb_char_patch_cmd:nnn {#1} {#2} {#3} }
}
\cs_new_protected:Npn \eb_preto_cmd:Nn #1#2
{
@@ -164,6 +169,20 @@
\keys_define:nn { } { ctex/link .inherit:n = ctex/refset }
\ctex_define:n { link .meta:nn = { ctex/link } {#1} }
\cs_set_eq:NN \link \refset
+\eb_clist_map_inline:nn
+ { style,subfont,spread,bibset,thmset,hdrset,tocset }
+ {
+ \msg_new:nnn { easybase } { ignore-#1 }
+ {
+ ##1~is~an~unknown~option~of~#1. \\
+ Please~check~the~user~manual~for~the~supported~options.
+ }
+ }
+\cs_new:Npn \eb_msg_unknown_option:n #1
+ {
+ \msg_warning:nnx
+ { easybase } { ignore-#1 } { \l_keys_key_str }
+ }
\cs_if_exist:NF \chapter
{
\newcounter{chapter}
@@ -419,7 +438,7 @@
}
\ctex_define:nn { hdrset }
{
- fnmargin .dim_set:N = \footnotemargin,
+ fnmargin .dim_set:N = \footnoteindent,
fnmargin .initial:n = 0.75\ccwd,
fnparskip .skip_set:N = \footparskip,
fnparskip .initial:n = 0ex,
@@ -449,16 +468,7 @@
{ \tl_set:Nn \l__eb_fnmark_number_choice_tl {#1} },
fnmark-num .value_required:n = true,
- unknown .code:n =
- {
- \msg_warning:nnx
- { easybase } { ignore-hdrset } { \l_keys_key_str }
- }
- }
-\msg_new:nnn { easybase } { ignore-hdrset }
- {
- #1~is~an~unknown~hdrset~option. \\
- Please~check~the~user~manual~for~the~supported~options.
+ unknown .code:n = \eb_msg_unknown_option:n { hdrset }
}
\eb_at_end_preamble:n
@@ -523,8 +533,8 @@
{
\hbox_set:Nn \l_tmpa_box
{
- \dim_compare:nNnTF { \footnotemargin } > { 0pt }
- { \hbox_to_wd:nn { \footnotemargin } { \eb@makefnmark\hss } }
+ \dim_compare:nNnTF { \footnoteindent } > { 0pt }
+ { \hbox_to_wd:nn { \footnoteindent } { \eb@makefnmark\hss } }
{ \eb@makefnmark }
}
\dim_set:Nn \leftmargin { \box_wd:N \l_tmpa_box }
@@ -538,16 +548,16 @@
}
{
\noindent
- \dim_compare:nNnTF { \footnotemargin } > { 0pt }
- { \hbox_to_wd:nn { \footnotemargin } { \hss\eb@makefnmark } }
+ \dim_compare:nNnTF { \footnoteindent } > { 0pt }
+ { \hbox_to_wd:nn { \footnoteindent } { \hss\eb@makefnmark } }
{
- \dim_compare:nNnTF { \footnotemargin } = { 0pt }
+ \dim_compare:nNnTF { \footnoteindent } = { 0pt }
{ \hbox_overlap_left:n { \eb@makefnmark } }
{
\hbox_overlap_left:n
{
\hbox_to_wd:nn
- { -\footnotemargin }
+ { -\footnoteindent }
{ \eb@makefnmark\hss }
}
}
@@ -559,7 +569,10 @@
\tl_if_eq:NnT \l__eb_footnotetype_choice_tl { hang } { \par }
\group_end:
}
-\eb_patch_cmd:nnn { \@footnotetext,\@mpfootnotetext }
+\cs_set_eq:NN \eb@makefntext \@makefntext
+\ctex_at_end_package:nn { footmisc }
+ { \cs_set_eq:NN \@makefntext \eb@makefntext }
+\eb_at_end_patch_cmd:nnn { \@footnotetext,\@mpfootnotetext }
{ \reset@font }
{
\linespread{\fp_use:N \l__eb_spread_footnote_fp}
@@ -568,6 +581,13 @@
}
\ProvideDocumentCommand{\super}{mo}{\textsuperscript{#1}}
\providecommand{\spb@textsuperscript@save}{\textsuperscript}
+\providecommand{\footref}[1]
+ {
+ \group_begin:
+ \unrestored@protected@xdef\@thefnmark{\ref{#1}}
+ \group_end:
+ \@footnotemark
+ }
\cs_set:Npn \@makefnmark
{
\hbox:n
@@ -600,6 +620,9 @@
\group_end:
}
}
+\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext }
+\cs_new:Npn \Footnotemark #1 { \eb@@makefnmark{#1}\@footnotemark }
+\cs_new:Npn \Footnotetext #1 { \eb@@makefnmark{#1}\@footnotetext }
\cs_new:Npn \eb_fnmark_counter_pifont:N #1
{ \ding{\int_eval:n { 171 + #1 }} }
\cs_new:Npn \eb_fnmark_counter_pifont_neg:N #1
@@ -620,9 +643,6 @@
}
{ \int_use:N #1 }
}
-\cs_new:Npn \Footnote #1 { \Footnotemark{#1}\@footnotetext }
-\cs_new:Npn \Footnotemark #1 { \eb@@makefnmark{#1}\@footnotemark }
-\cs_new:Npn \Footnotetext #1 { \eb@@makefnmark{#1}\@footnotetext }
\cs_new:Npn \eb_alph:n #1 { \int_to_alph:v { c@#1 } }
\cs_set:Npn \thefootnote { \eb_footnote_counter:N \c@footnote }
\cs_set:Npn \thempfootnote { \eb_alph:n { mpfootnote } }
@@ -646,7 +666,8 @@
{ \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 .dim_set:c = eb@toc@#1@numsep
+ #1/numsep .dim_set:c = eb@toc@#1@numsep,
+ #1/unknown .code:n = \eb_msg_unknown_option:n { tocset }
}
\seq_if_in:NnF \c__ctex_headings_seq { subparagraph }
{
@@ -688,6 +709,7 @@
}
}
+\cs_set_eq:NN \ctexnumberline \CTEXnumberline
\cs_set:Npn \CTEXnumberline #1
{
\CTEXifname
@@ -947,16 +969,7 @@
equation-con = #1
},
number-con .initial:n = { . },
- unknown .code:n =
- {
- \msg_warning:nnx
- { easybase } { ignore-style } { \l_keys_key_str }
- }
- }
-\msg_new:nnn { easybase } { ignore-style }
- {
- #1~is~an~unknown~style~option. \\
- Please~check~the~user~manual~for~the~supported~options.
+ unknown .code:n = \eb_msg_unknown_option:n { style }
}
\eb_clist_map_inline:nn
{ figure,table,lstlisting,equation }
@@ -1138,8 +1151,7 @@
\ctex_assign_heading_name:nn { biappendix } {#1}
\int_compare:nNnTF { \c@chapter } > { 0 }
{
- \ExplSyntaxOn\char_set_catcode_letter:N \@
- \eb_patch_cmd:Nnn \CTEX@addbitocline
+ \eb_char_patch_cmd:nnn \CTEX@addbitocline
{
\def\CTEX@prechapter{\CTEX@prebichapter}
\def\CTEX@thechapter{\CTEX@bichapter@number}
@@ -1150,7 +1162,6 @@
\def\CTEX@thechapter{#2}
\def\CTEX@postchapter{\CTEX@postbiappendix}
}
- \ExplSyntaxOff\char_set_catcode_other:N \@
\gdef\thechapter{\@Alph\c@chapter}
\gdef\thebichapter{\@Alph\c@bichapter}
\gdef\CTEX@prechapter{\CTEX@preappendix}
@@ -1196,7 +1207,8 @@
}
{ \tl_set:Nn \l__eb_subfont_math_choice_tl {#1} },
math .value_required:n = true,
- math .initial:n = times
+ math .initial:n = times,
+ unknown .code:n = \eb_msg_unknown_option:n { subfont }
}
\cs_new_protected:Npn \eb_put_newtxmath:n #1
@@ -1232,9 +1244,9 @@
math .fp_set:N = \l__eb_spread_math_fp,
math .initial:n = 1.05,
caption .fp_set:N = \l__eb_spread_caption_fp,
- caption .initial:n = 1,
+ caption .initial:n = 1.1,
footnote .fp_set:N = \l__eb_spread_footnote_fp,
- footnote .initial:n = 1,
+ footnote .initial:n = 1.1,
spread-all .meta:n =
{
line = #1,
@@ -1242,7 +1254,8 @@
math = #1,
caption = #1,
footnote = #1
- }
+ },
+ unknown .code:n = \eb_msg_unknown_option:n { spread }
}
\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
@@ -1440,7 +1453,8 @@
thmbox .default:n = true,
thmbox .initial:n = false,
brackets .code:n = \eb_assign_tag_brackets:n {#1},
- brackets .initial:n = { (,) }
+ brackets .initial:n = { (,) },
+ unknown .code:n = \eb_msg_unknown_option:n { thmset }
}
\ctex_set:nn { thmset }
{
@@ -1505,13 +1519,14 @@
\linespread{\fp_use:N \l__eb_spread_math_fp}
\selectfont\ignorespaces
}
-\eb_patch_cmd:nnn { \start@gather,\start@align,\start@multline }
+\eb_at_end_patch_cmd:nnn
+ { \start@gather,\start@align,\start@multline }
{ \collect@body }
{
\linespread{\fp_use:N \l__eb_spread_math_fp}
\selectfont\collect@body
}
-\eb_patch_cmd:Nnn \gather@split
+\eb_at_end_patch_cmd:nnn \gather@split
{ \spread@equation }
{
\linespread{\fp_use:N \l__eb_spread_math_fp}
@@ -1569,7 +1584,8 @@
{ \tl_set:Nn \l__eb_bib_cite_style_tl {#1} },
datafile .clist_set:N = \l__eb_bib_datafile_clist,
bitoc-title .tl_set:N = \l__eb_bib_en_bitoc_title_tl,
- bitoc-title .initial:n = Reference
+ bitoc-title .initial:n = Reference,
+ unknown .code:n = \eb_msg_unknown_option:n { bibset }
}
\cs_new_protected:Npn \BibtexPreSet
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 6443f40b195..da89ce00fef 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -13,12 +13,11 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/14}{1.27e}
+\ProvidesExplClass{easybook}{2021/07/16}{1.27g}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
\bool_set_false:N \l__eb_title_newline_bool
-\bool_set_false:N \l__eb_font_noto_bool
\bool_set_true:N \l__eb_page_twoside_bool
\bool_set_true:N \l__eb_class_book_bool
\tl_new:N \g__eb_config_tl
@@ -68,10 +67,10 @@
book .meta:n = { class = book },
article .meta:n = { class = article },
- config .tl_set:N = \g__eb_config_tl,
- floatpage .bool_set:N = \l__eb_float_page_bool,
- floatpage .default:n = true,
- unknown .code:n =
+ config .tl_set:N = \g__eb_config_tl,
+ floatpage .bool_set:N = \l__eb_float_page_bool,
+ floatpage .default:n = true,
+ unknown .code:n =
{ \clist_gput_right:NV \g__eb_options_clist \CurrentOption }
}
diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
index b9b27da34f9..e2a9f84d01d 100644
--- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
+++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
@@ -11,7 +11,7 @@
%% conditions of the CC-BY 4.0 License.
%% The latest version of this license is in
%% https://creativecommons.org/licenses/by/4.0/legalcode
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/14}{1.27e}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/16}{1.27g}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1
@@ -65,12 +65,12 @@
\tl_new:N \p@eb@exercise
\tl_new:N \eb@tc@list@prologue
\cs_new:Npn \exerprologue #1 { \tl_gset:Nn \eb@tc@list@prologue {#1} }
-\cs_new:Npn \tcphanifname #1#2
+\cs_new:Npn \tcphantomifname #1#2
{
\tl_gset:Nn \eb@tc@exercise@ifnametrue {#1}
\tl_gset:Nn \eb@tc@exercise@ifnamefalse {#2}
}
-\tcphanifname
+\tcphantomifname
{
\markright
{