summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-09-08 20:41:47 +0000
committerKarl Berry <karl@freefriends.org>2021-09-08 20:41:47 +0000
commit89f268e81191e3ba4fbd6aa9af911e271da44ba5 (patch)
treefeffbd540f7e6497d591da0b835c8ab0e3a6cbd4 /Master/texmf-dist/source
parenta4744c566f2db68394ceb7958316b04085e849a3 (diff)
easybook (8sep21)
git-svn-id: svn://tug.org/texlive/trunk@60453 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/easybook/easybook.dtx201
1 files changed, 99 insertions, 102 deletions
diff --git a/Master/texmf-dist/source/latex/easybook/easybook.dtx b/Master/texmf-dist/source/latex/easybook/easybook.dtx
index c21f742ba70..ee291bcbb18 100644
--- a/Master/texmf-dist/source/latex/easybook/easybook.dtx
+++ b/Master/texmf-dist/source/latex/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/09/06}{1.29p}
+\ProvidesExplClass{easybook}{2021/09/08}{1.3a}
{Typeset Chinese theses or books}
\bool_set_false:N \l__eb_compile_draft_bool
@@ -297,10 +297,9 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}[2020/10/01]
\RequirePackage{l3keys2e,etoolbox}
-\ProvidesExplPackage{easybase}{2021/09/06}{1.29p}
+\ProvidesExplPackage{easybase}{2021/09/08}{1.3a}
{Typeset Chinese theses or books}
-\cs_generate_variant:Nn \dim_add:Nn { NV,Nv }
\cs_generate_variant:Nn \dim_set:Nn { NV }
\cs_generate_variant:Nn \dim_sign:n { V }
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -1128,12 +1127,6 @@
#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 }
- {
- \ctex_define:nn { tocset }
- { #1/belowoffset .dim_set:c = l__eb_toc_#1_offset_dim }
- }
- \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 }}
@@ -1155,7 +1148,16 @@
\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 }
+ { figure,table,lstlisting }
+ {
+ \ctex_define:nn { tocset }
+ {
+ #1/voffset .skip_set:c = l__eb_toc_#1_voffset_skip,
+ #1/tocline .cs_set:cp = { eb@labelname@#1 } ##1,
+ }
+ }
+\eb_clist_map_inline:nn
+ { format,format+,format~+,indent,rule,numsep,voffset,tocline }
{
\ctex_define:nn { tocset }
{
@@ -1186,67 +1188,45 @@
\newbool{eb@titletoc@hang@fix}
\ctex_define:nn { tocset }
{
- lolskip .skip_set:N = \l__eb_toc_lolskip_skip,
- lolskip .initial:n = 0.8pc,
- belowoffset .dim_set:N = \l__eb_toc_offset_dim,
- belowoffset .initial:n =
- { \bool_if:NTF \l__eb_class_book_bool { -1pc } { -0.35pc } },
+ lolskip .skip_set:N = \eb@toc@lolskip,
+ lolskip .initial:n = 10pt,
+ toc-voffset .skip_set:N = \l__eb_toc_voffset_skip,
+ toc-voffset .initial:n =
+ { \bool_if:NTF \l__eb_class_book_bool { 1pc } { 0.35pc } },
line-align .bool_set:N = \l__eb_toc_line_align_bool,
line-align .default:n = true,
line-align .initial:n = true,
- tocline-fig .cs_set:Np = \eb@labelname@lof #1,
- tocline-fig .initial:n =
- {
- \figurename\space #1
- \notbool{eb@titletoc@hang@fix}
- {\hspace{\eb@toc@figure@numsep}}{}
- },
- tocline-tab .cs_set:Np = \eb@labelname@lot #1,
- tocline-tab .initial:n =
- {
- \tablename\space #1
- \notbool{eb@titletoc@hang@fix}
- {\hspace{\eb@toc@table@numsep}}{}
- },
- tocline-lst .tl_set:N = \eb@labelname@lol,
- tocline-lst .initial:n =
- {
- \lstlistingname\space\thelstlisting
- \notbool{eb@titletoc@hang@fix}
- {\hspace{\eb@toc@lstlisting@numsep}}{}
- },
-
hang .choice:,
- hang/true .code:n = \booltrue{eb@titletoc@hang@fix},
- hang/false .code:n = { },
- hang .default:n = true,
- hang .initial:n = false,
-
- numsep-all .meta:n =
- {
- part/numsep = #1,
- chapter/numsep = #1,
- section/numsep = #1,
- subsection/numsep = #1,
- list/numsep = #1
+ hang/true .code:n = \booltrue{eb@titletoc@hang@fix},
+ hang/false .code:n = { },
+ hang .default:n = true,
+ hang .initial:n = false,
+
+ numsep-all .meta:n =
+ {
+ part/numsep = #1,
+ chapter/numsep = #1,
+ section/numsep = #1,
+ subsection/numsep = #1,
+ list/numsep = #1
},
- numsep-all .initial:n = 1em,
- indent-all .meta:n =
- {
- part/indent = #1,
- chapter/indent = #1,
- section/indent = #1,
- subsection/indent = #1,
- list/indent = #1
+ numsep-all .initial:n = 1em,
+ indent-all .meta:n =
+ {
+ part/indent = #1,
+ chapter/indent = #1,
+ section/indent = #1,
+ subsection/indent = #1,
+ list/indent = #1
},
- rule-all .meta:n =
+ rule-all .meta:n =
{
- part/rule = #1,
- chapter/rule = #1,
- section/rule = #1,
- subsection/rule = #1,
- list/rule = #1
+ part/rule = #1,
+ chapter/rule = #1,
+ section/rule = #1,
+ subsection/rule = #1,
+ list/rule = #1
}
}
\ctex_set:n
@@ -1273,45 +1253,64 @@
}
\ctex_set:nn { tocset }
{
- part/format = \addvspace{1pc}\sffamily\large,
- part/indent = 0em,
- part/rule = \tocrule{}[\bfseries],
+ part/format = \addvspace{1pc}\sffamily\large,
+ part/indent = 0em,
+ part/rule = \tocrule{}[\bfseries],
- chapter/format = \addvspace{1pc}\sffamily\large,
- chapter/indent = 0em,
- chapter/rule = \tocrule{$\cdot$}[\bfseries],
+ chapter/format = \addvspace{1pc}\sffamily\large,
+ chapter/indent = 0em,
+ chapter/rule = \tocrule{$\cdot$}[\bfseries],
- section/format =
+ section/format =
{
\addvspace{0.35pc}
\bool_if:NF \l__eb_class_book_bool { \sffamily }
},
- section/indent =
+ section/indent =
{ \bool_if:NTF \l__eb_class_book_bool { 1.5em } { 0em } },
- section/rule =
+ section/rule =
{
\bool_if:NTF \l__eb_class_book_bool
{ \tocrule{$\cdot$} }
{ \tocrule{$\cdot$}[\bfseries] }
},
- subsection/format = \addvspace{0.35pc},
- subsection/indent =
+ subsection/format = \addvspace{0.35pc},
+ subsection/indent =
{ \bool_if:NTF \l__eb_class_book_bool { 3.8em } { 1.4em } },
- subsection/rule = \tocrule{$\cdot$},
+ subsection/rule = \tocrule{$\cdot$},
- list/format = \addvspace{0.2pc},
- list/indent = 0em,
- list/rule = \tocrule{$\cdot$},
- list/belowoffset =
- { \bool_if:NTF \l__eb_class_book_bool { 0pc } { 0.15pc } }
+ list/format = \addvspace{0.2pc},
+ list/indent = 0em,
+ list/rule = \tocrule{$\cdot$},
+ list/voffset =
+ { 0.2pc\bool_if:NT \l__eb_class_book_bool { + 10pt } },
+
+ figure/tocline =
+ {
+ \figurename\space #1
+ \notbool{eb@titletoc@hang@fix}
+ {\hspace{\eb@toc@figure@numsep}}{}
+ },
+ table/tocline =
+ {
+ \tablename\space #1
+ \notbool{eb@titletoc@hang@fix}
+ {\hspace{\eb@toc@table@numsep}}{}
+ },
+ lstlisting/tocline =
+ {
+ \lstlistingname\space\thelstlisting
+ \notbool{eb@titletoc@hang@fix}
+ {\hspace{\eb@toc@lstlisting@numsep}}{}
+ }
}
\prop_new:N \l__eb_list_label_name_prop
\prop_set_from_keyval:Nn \l__eb_list_label_name_prop
{
- figure = \eb@labelname@lof,
- table = \eb@labelname@lot
+ figure = \eb@labelname@figure,
+ table = \eb@labelname@table
}
\cs_gset:Npn \caption@@@addcontentsline #1#2#3#4
{
@@ -1330,7 +1329,7 @@
\addcontentsline{lol}{lstlisting}
{
\ifbool{eb@titletoc@hang@fix}{\eb@numberline}{}
- {\eb@labelname@lol}\lst@@caption
+ {\eb@labelname@lstlisting}\lst@@caption
}
}
@@ -1414,10 +1413,10 @@
{
\eb_appto_cmd:Nn \@chapter
{
- \skip_if_eq:nnF { \l__eb_toc_lolskip_skip } { \c_zero_skip }
+ \skip_if_eq:nnF { \eb@toc@lolskip } { \c_zero_skip }
{
\addtocontents{lol}
- {\protect\addvspace{\skip_use:N \l__eb_toc_lolskip_skip}}
+ {\protect\addvspace{\skip_use:N \eb@toc@lolskip}}
}
}
}
@@ -1542,9 +1541,7 @@
\tl_set_eq:Nc \eb@toc@title { list#4name }
\IfValueT{#3}{\keys_set:nn { eb/listoc } {#3}}
\eb_title_number_intoc_spec:nn {#2} {#1}
- \dim_add:Nv
- \l__eb_toc_offset_dim { l__eb_toc_#4_offset_dim }
- \vspace*{\dim_use:N \l__eb_toc_offset_dim}
+ \vspace*{-\dim_use:c { l__eb_toc_#4_voffset_skip }}
\eb_toc_start_multi_column_ext:n {#5}
\group_end:
}
@@ -1568,12 +1565,12 @@
\tl_set:Nn \eb@bitoc@title { Contents }
\IfValueT{#2}{\keys_set:nn { eb/listoc } {#2}}
\eb_title_mark_notoc:n { \eb@toc@title }
- \vspace*{\dim_use:N \l__eb_toc_offset_dim}
+ \vspace*{-\dim_use:N \l__eb_toc_voffset_skip}
\eb_toc_start_multi_column_ext:n { toc }#3
\IfBooleanT{#1}
{
\eb_title_mark_notoc:n { \eb@bitoc@title }
- \vspace*{\dim_use:N \l__eb_toc_offset_dim}
+ \vspace*{-\dim_use:N \l__eb_toc_voffset_skip}
\eb_toc_start_multi_column_ext:n { tec }
}
\group_end:
@@ -2075,9 +2072,9 @@
\cs_new_protected:Npn \setexercise #1
{ \keys_set:nn { eb/exercise } {#1} }
\cs_new_protected:Npn \addtcbstyle #1#2
- { \tcbset{tc-#1/.append~style = {#2}} }
+ { \tcbset{#1/.append~style = {#2}} }
\cs_new_protected:Npn \newtcbstyle #1#2
- { \tcbset{tc-#1/.style = {#2}} }
+ { \tcbset{#1/.style = {#2}} }
\cs_new_protected:Npn \tcbappstyle
{ \@ifstar{\newtcbstyle}{\addtcbstyle} }
\ctex_at_end_package:nn { tcolorbox }
@@ -2129,7 +2126,6 @@
{ \exp_args:NV \bibliographystyle \l__eb_bib_otherstyle_tl }
\tl_if_empty:NF \l__eb_bib_cite_style_tl
{ \exp_args:NV \setcitestyle \l__eb_bib_cite_style_tl }
- \skip_zero:N \bibsep
\AtEndEnvironment{thebibliography}
{\bool_if:NT \l__eb_toc_multi_column_bool { \end{multicols} }}
\NewDocumentCommand{\printbibliography}{st+o}
@@ -2146,6 +2142,7 @@
\exp_args:NV \bibliography \l__eb_bib_datafile_clist
\group_end:
}
+ \skip_zero:N \bibsep
}
\cs_new_protected:Npn \eb_put_biblatex:n #1
{ \PassOptionsToPackage{#1}{biblatex} }
@@ -2400,11 +2397,11 @@
}
%</package>
%<*tcolorbox>
-\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/06}{1.29p}
+\ProvidesExplFile{eb-tcolorbox.cfg}{2021/09/08}{1.3a}
{Customization of tcolorbox for easybook}
\tl_gset:Nn \eb@tc@line@skip { 0.5\baselineskip }
-\newtcbstyle{theorem}
+\newtcbstyle{tc-theorem}
{
enhanced~jigsaw,pad~at~break* = 3pt,
opacityback = 0,
@@ -2415,7 +2412,7 @@
top = \eb@tc@line@skip,bottom = \eb@tc@line@skip,
middle = \eb@tc@line@skip
}
-\newtcbstyle{outline}
+\newtcbstyle{tc-outline}
{
enhanced,nofloat,
tikznode~boxed~title,
@@ -2428,14 +2425,14 @@
arc = 3pt,
left = 2pc,right = 2pc,top = 1.5pc,bottom = 1pc
}
-\newtcbstyle{exercise}
+\newtcbstyle{tc-exercise}
{
blank,on~line,center,
sharpish~corners,
fontupper = \Large\sffamily,
beforeafter~skip = 3.75ex plus .2ex minus .1ex
}
-\newtcbstyle{easybox}
+\newtcbstyle{tc-easybox}
{
enhanced~jigsaw,pad~at~break* = 3pt,
center~title,
@@ -2449,7 +2446,7 @@
titlerule = 0pt,
beforeafter~skip = 1.75ex plus .2ex minus .1ex
}
-\newtcbstyle{ebparbox}
+\newtcbstyle{tc-ebparbox}
{
frame~hidden,
enhanced~jigsaw,pad~at~break* = 3pt,
@@ -2459,15 +2456,15 @@
middle = \eb@tc@line@skip,bottomtitle = \eb@tc@line@skip,
beforeafter~skip = 1.75ex plus .2ex minus .1ex
}
-\newtcbstyle{ebemph}{on~line,blank}
-\newtcbstyle{eblink}
+\newtcbstyle{tc-ebemph}{on~line,blank}
+\newtcbstyle{tc-eblink}
{
standard~jigsaw,on~line,
top = 1.5pt,bottom = 1.5pt,left = 1.5pt,right = 1.5pt,
boxrule = 0.75pt,arc = 1pt,
opacityback = 0.2
}
-\newtcbstyle{ebfbox}
+\newtcbstyle{tc-ebfbox}
{
on~line,sharpish~corners,
top = 2pt,bottom = 2pt,left = 1pt,right = 1pt,