summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/easybook
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-07-23 20:08:35 +0000
committerKarl Berry <karl@freefriends.org>2021-07-23 20:08:35 +0000
commit6ac7453f863d3ae49112f4eed4cc5232ae886b66 (patch)
tree302bcd71b38ec78aab8e87b5fdc5c9a1231b62b5 /Master/texmf-dist/tex/latex/easybook
parent27f6653ca7e4a5ffb42d5ce2a19ef55b4a66dff2 (diff)
easybook (23jul21)
git-svn-id: svn://tug.org/texlive/trunk@60026 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/easybook')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybase.sty119
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls12
-rw-r--r--Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg2
3 files changed, 101 insertions, 32 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty
index f5abbf1d13e..950d2f0032f 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/19}{1.27K}
+\ProvidesExplPackage{easybase}{2021/07/22}{1.27L}
{Typeset Chinese theses or books}
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -263,7 +263,7 @@
{
vmargin = 2.54cm,
hmargin = 3.17cm,
- columnsep = 2\ccwd,
+ columnsep = 2em,
headheight = 2.04cm,
headsep = 0.5cm,
footskip = 0.79cm,
@@ -361,11 +361,11 @@
subsec-mark .initial:n =
{ \CTEXifname{\eb@mark@subsection@label}{}#1 },
chap-label .code:n = \eb_mark_chapter_number_bool:n {#1},
- chap-label .initial:n = \hspace{\ccwd},
+ chap-label .initial:n = \hspace{1em},
sec-label .code:n = \eb_mark_section_number_bool:n {#1},
- sec-label .initial:n = \hspace{0.5\ccwd},
+ sec-label .initial:n = \hspace{0.5em},
subsec-label .code:n = \eb_mark_subsection_number_bool:n {#1},
- subsec-label .initial:n = \hspace{0.5\ccwd},
+ subsec-label .initial:n = \hspace{0.5em},
headrule .tl_gset:N = \headrule,
headrule .initial:n = \markrule{\l__eb_rule_width_dim},
@@ -439,11 +439,11 @@
\ctex_define:nn { hdrset }
{
fnmargin .dim_set:N = \footnoteindent,
- fnmargin .initial:n = 0.75\ccwd,
+ fnmargin .initial:n = 0.75em,
fnparskip .skip_set:N = \footparskip,
fnparskip .initial:n = 0ex,
fnparindent .dim_set:N = \footparindent,
- fnparindent .initial:n = 2\ccwd,
+ fnparindent .initial:n = 2em,
fntext-form .tl_set:N = \l__eb_fntext_format_tl,
fnmark-pos .tl_set:N = \l__eb_fnmark_position_tl,
@@ -771,7 +771,7 @@
subsection/numsep = #1,
list/numsep = #1
},
- numsep-all .initial:n = \ccwd,
+ numsep-all .initial:n = 1em,
indent-all .meta:n =
{
part/indent = #1,
@@ -814,25 +814,25 @@
\ctex_set:nn { tocset }
{
part/format = \addvspace{1pc}\sffamily\large,
- part/indent = 0\ccwd,
+ part/indent = 0em,
part/rule = \tocrule{}[\bfseries],
chapter/format = \addvspace{1pc}\sffamily\large,
- chapter/indent = 0\ccwd,
+ chapter/indent = 0em,
chapter/rule = \tocrule{$\cdot$}[\bfseries],
section/format = \addvspace{0.35pc},
section/indent =
- { \bool_if:NTF \l__eb_class_book_bool { 1.5\ccwd } { 0\ccwd } },
+ { \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
section/rule = \tocrule{$\cdot$},
subsection/format = \addvspace{0.35pc},
subsection/indent =
- { \bool_if:NTF \l__eb_class_book_bool { 3.8\ccwd } { 1.4\ccwd } },
+ { \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em } },
subsection/rule = \tocrule{$\cdot$},
list/format = \addvspace{0.2pc},
- list/indent = 0\ccwd,
+ list/indent = 0em,
list/rule = \tocrule{$\cdot$},
list/belowoffset =
{ \bool_if:NTF \l__eb_class_book_bool { 0pc } { 0.15pc } }
@@ -1257,7 +1257,6 @@
unknown .code:n = \eb_msg_unknown_option:n { spread }
}
-\DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}}
\DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)}
\DeclareCaptionFont{eb@table@font}{\l__eb_subfont_table_tl}
\DeclareCaptionFont{eb@figure@font}{\l__eb_subfont_figure_tl}
@@ -1267,7 +1266,7 @@
format = hang,
font = {stretch = \fp_use:N \l__eb_spread_caption_fp},
labelfont = {color = ctex@frame},
- labelsep = ccwd,
+ labelsep = quad,
singlelinecheck = true,
belowskip = 0pt,
aboveskip = 10pt
@@ -1364,21 +1363,91 @@
\SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*}
\setlist
{
- labelsep = 0.75\ccwd,listparindent = 2\ccwd,leftmargin = *,
+ labelsep = 0.75em,listparindent = 2em,leftmargin = *,
itemsep = 0.75ex plus .1ex,topsep = 0.75ex plus .1ex,
partopsep = 0ex,parsep = 0ex
}
\newlist{eb@outline@list}{itemize}{1}
\newlist{eb@exercise@list}{enumerate}{2}
+\newlist{eb@eqcomp@list}{description}{1}
\setlist[eb@outline@list]{label = outline,itemsep = 0.5ex plus .1ex}
-\setlist[eb@exercise@list]{labelsep = 0.5\ccwd}
+\setlist[eb@exercise@list]{labelsep = 0.5em}
+\setlist[eb@eqcomp@list]{labelsep = 0em,nosep}
\setlist[itemize,1]{label = bullet}
\setlist[itemize,2]{label = endash}
\setlist[itemize,3]{label = asterisk}
\setlist[enumerate,1]{label = arabic,ref = \arabic*}
\setlist[enumerate,2]{label = alph,ref = enumii}
\setlist[enumerate,3]{label = roman,ref = enumiii,labelwidth = *}
-\setlist[description]{font = sf,labelwidth = *,leftmargin = 2\ccwd}
+\setlist[description]{font = sf,labelwidth = *,leftmargin = 2em}
+
+\keys_define:nn { eb/eqcomp }
+ {
+ width .dim_set:N = \l__eb_eqsymb_width_dim,
+ width .initial:n = 2em,
+ delim .tl_set:N = \l__eb_eqsymb_delim_tl,
+ delim .initial:n = { —— },
+ space .dim_set:N = \l__eb_eqsymb_space_dim,
+ space .initial:n = 0.25em,
+ item-align .tl_set:N = \l__eb_eqsymb_item_align_tl,
+ item-align .initial:n = r,
+ delim-align .tl_set:N = \l__eb_eqsymb_delim_align_tl,
+ delim-align .initial:n = c,
+ intro .tl_set: = \l__eb_eqsymb_intro_tl,
+ font .tl_set:N = \l__eb_eqsymb_font_tl,
+ mode .tl_set:N = \l__eb_eqsymb_mode_tl,
+ mode .initial:n = math
+ }
+\cs_new_protected:Npn \seteqcomp #1
+ { \keys_set:nn { eb/eqcomp} {#1} }
+
+\cs_new:Npn \eb@itembox { \item\makebox }
+\cs_new:Npn \eb_eqsymb_left_margin_calc:
+ {
+ \hbox_set:Nn \l_tmpa_box { \l__eb_eqsymb_delim_tl }
+ \hbox_set:Nn \l_tmpb_box { \l__eb_eqsymb_intro_tl }
+ \dim_set:Nn \l_tmpa_dim
+ {
+ \box_wd:N \l_tmpb_box +
+ \l__eb_eqsymb_width_dim +
+ \l__eb_eqsymb_space_dim +
+ \box_wd:N \l_tmpa_box +
+ \l__eb_eqsymb_space_dim
+ }
+ }
+\NewDocumentEnvironment{eqcomp}{oD(){}+b}
+ {
+ \IfValueT{#1}{\keys_set:nn { eb/eqcomp } {#1}}
+ \eb_eqsymb_left_margin_calc:
+ \begin{eb@eqcomp@list}[#2]
+ #3
+ \end{eb@eqcomp@list}
+ }{}
+\NewDocumentCommand{\symb}{smO{\l__eb_eqsymb_delim_tl}}
+ {
+ \IfBooleanTF{#1}
+ {
+ \eb_eqsymb_left_margin_calc:
+ \makebox
+ }
+ {\eb@itembox}[\l_tmpa_dim]
+ {
+ \makebox[\box_wd:N \l_tmpb_box]{\l__eb_eqsymb_intro_tl}
+ \makebox[\l__eb_eqsymb_width_dim][\l__eb_eqsymb_item_align_tl]
+ {
+ \tl_use:N \l__eb_eqsymb_font_tl
+ {
+ \tl_if_eq:NnT \l__eb_eqsymb_mode_tl { math }
+ { \ensuremath }{#2}
+ }
+ }
+ \hspace{\l__eb_eqsymb_space_dim}
+ \makebox[\box_wd:N \l_tmpa_box][\l__eb_eqsymb_delim_align_tl]{#3}
+ \hspace{\l__eb_eqsymb_space_dim}
+ }
+ \tl_clear:N \l__eb_eqsymb_intro_tl
+ \ignorespaces
+ }
\cs_new_protected:Npn \eb_thm_name_set:nnn #1#2#3
{
@@ -1459,9 +1528,9 @@
{
spaceabove = 0.75ex plus .1ex,
spacebelow = 0.75ex plus .1ex,
- headindent = 0\ccwd,
+ headindent = 0em,
headfont = \color{ctex@emph}\sffamily,
- postheadspace = \ccwd,
+ postheadspace = 1em,
within = \bool_if:NT \l__eb_class_book_bool { chapter },
headformat = \NAME\space\NUMBER\NOTE
}
@@ -1488,7 +1557,7 @@
\setchemformula
{
math-scripts = false,
- charge-hshift = 0.25\ccwd,
+ charge-hshift = 0.25em,
subscript-vshift = -0.2ex
}
\IfPackageAtLeastTF{siunitx}{2021/06/22}
@@ -1550,7 +1619,7 @@
title .tl_set:N = \eb@tc@exercise@title,
title .initial:n = \c__eb_name_exercise_tl,
numsep .dim_set:N = \eb@toc@exercise@numsep,
- numsep .initial:n = 0.5\ccwd,
+ numsep .initial:n = 0.5em,
label .tl_set:N = \eb@tc@exercise@label
}
\cs_new_protected:Npn \setexercise #1
@@ -1860,9 +1929,9 @@
{
\keys_set_known:nn { ctex }
{
- contentsname = 目\hspace{\ccwd}录,
- indexname = 索\hspace{\ccwd}引,
- abstractname = 摘\hspace{\ccwd}要,
+ contentsname = 目\hspace{1em}录,
+ indexname = 索\hspace{1em}引,
+ abstractname = 摘\hspace{1em}要,
listfigurename = 图片索引,
listtablename = 表格索引,
lstlistlistingname = 代码索引,
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 8646f0003a0..8b259d36555 100644
--- a/Master/texmf-dist/tex/latex/easybook/easybook.cls
+++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls
@@ -13,7 +13,7 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/07/19}{1.27K}
+\ProvidesExplClass{easybook}{2021/07/22}{1.27L}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -248,7 +248,7 @@
{
\bool_if:NTF \l__eb_title_newline_bool
{ \par\nobreak }
- { \hspace{\ccwd} }
+ { \hspace{1em} }
}
},
chapter =
@@ -263,7 +263,7 @@
{
\bool_if:NTF \l__eb_title_newline_bool
{ \par\nobreak\vskip 1.5pc }
- { \hspace{\ccwd} }
+ { \hspace{1em} }
},
beforeskip = -1.5ex,
afterskip = 3ex,
@@ -274,7 +274,7 @@
{
hang = true,
format = \color{ctex@frame}\sffamily\Large,
- aftername = \hspace{0.5\ccwd},
+ aftername = \hspace{0.5em},
beforeskip = 1.5ex plus .2ex minus .1ex,
afterskip = 1.5ex plus .2ex minus .1ex
},
@@ -282,7 +282,7 @@
{
hang = true,
format = \color{ctex@frame}\sffamily\large,
- aftername = \hspace{0.5\ccwd},
+ aftername = \hspace{0.5em},
beforeskip = 1.3ex plus .2ex minus .1ex,
afterskip = 1.3ex plus .2ex minus .1ex
},
@@ -290,7 +290,7 @@
{
hang = true,
format = \color{ctex@frame}\sffamily,
- aftername = \hspace{0.5\ccwd},
+ aftername = \hspace{0.5em},
beforeskip = \parskip,
afterskip = \parskip
}
diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg
index 8d6caca1015..143d8c5e230 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/19}{1.27K}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/07/22}{1.27L}
{Customization of tcolorbox for easybook}
\cs_new_protected:Npn \eb_tcb_theorem_set:n #1