summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-04-30 21:07:42 +0000
committerKarl Berry <karl@freefriends.org>2021-04-30 21:07:42 +0000
commitf36fee618493ae988de9fd5b9bb8ae876a340ca0 (patch)
tree23dbc9ec5d41d30b083ef00d97b48f3090e6fbf7 /Master/texmf-dist/tex/latex
parent510c61fbfa6454db89adf44b23014b13adadc46f (diff)
easybook (30apr21)
git-svn-id: svn://tug.org/texlive/trunk@59032 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls123
1 files changed, 62 insertions, 61 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index 427ba8dbace..3427b9a7aff 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,etoolbox}
-\ProvidesExplClass{easybook}{2021/04/29}{1.24w}{beta}
+\ProvidesExplClass{easybook}{2021/04/30}{1.24x}{beta}
\cs_generate_variant:Nn \eb_ctex_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
@@ -470,7 +470,7 @@
}
\seq_const_from_clist:Nn \c__eb_toc_headings_level_seq
- {part,chapter,section,subsection,lists}
+ {part,chapter,section,subsection,list}
\seq_map_inline:Nn \c__eb_toc_headings_level_seq
{
\ctex_define:n {tocset/#1 .meta:nn = {ctex/tocset/#1}{##1}}
@@ -494,10 +494,10 @@
\newbool{eb@titletoc@hang@fix}
\eb_ctex_define:nn {tocset}
{
- lists/lolskip .skip_set:N = \l__eb_toc_lolskip_skip,
- lists/lolskip .initial:n = 0.8pc,
- lists/belowoffset .dim_set:N = \l__eb_toc_listsoffset_dim,
- lists/belowoffset .initial:n =
+ list/lolskip .skip_set:N = \l__eb_toc_lolskip_skip,
+ list/lolskip .initial:n = 0.8pc,
+ list/belowoffset .dim_set:N = \l__eb_toc_listoffset_dim,
+ list/belowoffset .initial:n =
{\bool_if:NTF \l__eb_class_book_bool{0pc}{0.15pc}},
belowoffset .dim_set:N = \l__eb_toc_offset_dim,
belowoffset .initial:n =
@@ -507,21 +507,21 @@
{
\figurename\space#1
\notbool{eb@titletoc@hang@fix}
- {\hspace{\eb@toc@lists@numsep}}{}
+ {\hspace{\eb@toc@list@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@lists@numsep}}{}
+ {\hspace{\eb@toc@list@numsep}}{}
},
tocline-lst .tl_set:N = \eb@labelname@lol,
tocline-lst .initial:n =
{
\lstlistingname\space\thelstlisting
\notbool{eb@titletoc@hang@fix}
- {\hspace{\eb@toc@lists@numsep}}{}
+ {\hspace{\eb@toc@list@numsep}}{}
},
line-align .bool_set:N = \l__eb_toc_line_align_bool,
line-align .default:n = true,
@@ -556,7 +556,7 @@
chapter/numsep = {#1},
section/numsep = {#1},
subsection/numsep = {#1},
- lists/numsep = {#1}
+ list/numsep = {#1}
},
indent-all .meta:n =
{
@@ -564,7 +564,7 @@
chapter/indent = {#1},
section/indent = {#1},
subsection/indent = {#1},
- lists/indent = {#1}
+ list/indent = {#1}
}
}
\ctex_set:nn {tocset}
@@ -591,10 +591,10 @@
subsection/rule = \tocrule{$\cdot$},
subsection/numsep = \ccwd,
- lists/format = \addvspace{0.2pc},
- lists/indent = 0\ccwd,
- lists/rule = \tocrule{$\cdot$},
- lists/numsep = \ccwd
+ list/format = \addvspace{0.2pc},
+ list/indent = 0\ccwd,
+ list/rule = \tocrule{$\cdot$},
+ list/numsep = \ccwd
}
\NewDocumentCommand{\tocrule}{sO{0.7pc}D(){1.2}mO{}}
@@ -634,9 +634,9 @@
{chapter}{chapter},
{section}{section},
{subsection}{subsection},
- {figure}{lists},
- {table}{lists},
- {lstlisting}{lists}
+ {figure}{list},
+ {table}{list},
+ {lstlisting}{list}
}{\eb_titlecontents_set:nn #1}
\prop_new:N \l__eb_label_name_prop
@@ -686,6 +686,17 @@
The~\string\chapter\space~command~will~not~be~used.
}
+\tl_set:Nn \l__eb_toc_type_tl{book}
+\keys_define:nn {eb/listoc}
+ {
+ article .code:n = \tl_set:Nn \l__eb_toc_type_tl{article},
+ book .code:n = {},
+ multoc .bool_set:N = \l__eb_multoc_bool,
+ multoc .default:n = true,
+ multoc .initial:n = false,
+ title .tl_set:N = \eb@toc@title
+ }
+
\cs_new:Npn \eb_upper_nonumber_mark_bool:n #1
{
\bool_if:NTF \l__eb_uppercase_bool
@@ -704,17 +715,6 @@
\cs_new:Npn \eb@nonumber@markright#1
{\markright{\eb_upper_nonumber_mark_bool:n {#1}}}
-\tl_set:Nn \l__eb_toc_type_tl{book}
-\keys_define:nn {listoc}
- {
- article .code:n = \tl_set:Nn \l__eb_toc_type_tl{article},
- book .code:n = {},
- multoc .bool_set:N = \l__eb_multoc_bool,
- multoc .default:n = true,
- multoc .initial:n = false,
- title .tl_set:N = \eb@toc@title
- }
-
\cs_new_protected:Npn \eb_title_mark_intoc:n #1
{
\tl_if_eq:NnTF \l__eb_toc_type_tl{book}
@@ -743,7 +743,7 @@
{\eb@nonumber@markdouble{#1}}
}
}
-\cs_new_protected:Npn \eb_title_intoc_bool:nn #1#2
+\cs_new_protected:Npn \eb_title_number_intoc_bool:nn #1#2
{
\IfBooleanTF{#1}
{
@@ -756,7 +756,7 @@
{\eb_title_mark_intoc:n {\eb@toc@title}}
}
}
-\cs_new_protected:Npn \eb_class_title_bool:n #1
+\cs_new_protected:Npn \eb_class_title_level_bool:n #1
{
\bool_if:NTF \l__eb_class_book_bool
{
@@ -791,7 +791,7 @@
{
\group_begin:
\tl_set_eq:NN \eb@toc@title\contentsname
- \IfValueT{#1}{\keys_set:nn {listoc}{#1}}
+ \IfValueT{#1}{\keys_set:nn {eb/listoc}{#1}}
\eb_multoc_pre_bool:
\eb_title_mark_notoc:n {\eb@toc@title}
\vspace*{\dim_use:N \l__eb_toc_offset_dim}
@@ -803,10 +803,10 @@
{
\group_begin:
\tl_set_eq:NN \eb@toc@title\listfigurename
- \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+ \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}}
\eb_multoc_pre_bool:
- \eb_title_intoc_bool:nn {#2}{#1}
- \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \eb_title_number_intoc_bool:nn {#2}{#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim
\vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lof}
\eb_multoc_post_bool:
@@ -816,10 +816,10 @@
{
\group_begin:
\tl_set_eq:NN \eb@toc@title\listtablename
- \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+ \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}}
\eb_multoc_pre_bool:
- \eb_title_intoc_bool:nn {#2}{#1}
- \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \eb_title_number_intoc_bool:nn {#2}{#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim
\vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lot}
\eb_multoc_post_bool:
@@ -829,10 +829,10 @@
{
\group_begin:
\tl_set_eq:NN \eb@toc@title\lstlistlistingname
- \IfValueT{#3}{\keys_set:nn {listoc}{#3}}
+ \IfValueT{#3}{\keys_set:nn {eb/listoc}{#3}}
\eb_multoc_pre_bool:
- \eb_title_intoc_bool:nn {#2}{#1}
- \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listsoffset_dim
+ \eb_title_number_intoc_bool:nn {#2}{#1}
+ \dim_add:NV \l__eb_toc_offset_dim\l__eb_toc_listoffset_dim
\vspace*{\dim_use:N \l__eb_toc_offset_dim}
\@starttoc{lol}
\eb_multoc_post_bool:
@@ -842,28 +842,27 @@
\ctex_at_end_package:nn {imakeidx}
{
\makeindex[
- intoc,
- title = \eb@toc@title,
options = -M~texindy~-C~utf8,
program = truexindy,
columns = 2,
columnsep = 2\ccwd
]
- \indexsetup
- {
- level = \bool_if:NTF \l__eb_class_book_bool{\chapter*}{\section*},
- toclevel = \bool_if:NTF \l__eb_class_book_bool{chapter}{section},
- firstpagestyle = \bool_if:NTF \l__eb_class_book_bool{plain}{fancy}
- }
- \ctex_patch_cmd:Nnn \imki@indexheaders
- {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}}
- {\eb@nonumber@markdouble{\indexname}}
- \RenewDocumentCommand{\printindex}
- {D(){\imki@jobname}O{\imki@indexname}}
+ \RenewDocumentCommand{\printindex}{st+D(){\imki@jobname}o}
{
\group_begin:
- \tl_set:Nn \eb@toc@title{#2}
- \imki@putindex{#1}
+ \tl_set_eq:NN \eb@toc@title\indexname
+ \tl_set_eq:NN \imki@indexlevel\use_none:n
+ \setkeys{imki}{intoc = false}
+ \IfValueT{#4}{\keys_set:nn {eb/listoc}{#4}}
+ \bool_if:NTF \l__eb_class_book_bool
+ {\tl_gset:Nn \imki@firstpagestyle{plain}}
+ {
+ \tl_gset:Nn \imki@firstpagestyle{fancy}
+ \tl_set:Nn \l__eb_toc_type_tl{article}
+ }
+ \tl_set:Nn \imki@indexheaders
+ {\eb_title_number_intoc_bool:nn {#2}{#1}}
+ \imki@putindex{#3}
\group_end:
}
}
@@ -1405,9 +1404,10 @@
{
\group_begin:
\tl_set_eq:NN \eb@toc@title\bibname
- \IfValueT{##3}{\keys_set:nn {listoc}{##3}}
+ \IfValueT{##3}{\keys_set:nn {eb/listoc}{##3}}
\eb_multoc_pre_bool:
- \cs_set:Npn \bibsection{\eb_title_intoc_bool:nn {##2}{##1}}
+ \cs_set:Npn \bibsection
+ {\eb_title_number_intoc_bool:nn {##2}{##1}}
\exp_args:NV \bibliography\l__eb_bib_file_tl
\eb_multoc_post_bool:
\group_end:
@@ -1432,7 +1432,8 @@
{
\exp_args:NV \addbibresource\l__eb_bib_file_tl
\cs_gset:Npn \blx@default@theheading{bibintoc}
- \defbibheading{bibintoc}[\bibname]{\eb_class_title_bool:n {##1}}
+ \defbibheading{bibintoc}[\bibname]
+ {\eb_class_title_level_bool:n {##1}}
\skip_set:Nn \bibitemsep{0ex}
}
\eb_at_end_preamble:n
@@ -1722,13 +1723,13 @@
part =
{
pagestyle = empty,
+ tocline = \EbNumberline{#1}#2,
format = \color{ctex@frame}\sffamily\Huge,
aftername =
{
\bool_if:NTF \l__eb_title_newline_bool
{\par\nobreak}{\hspace{\ccwd}}
- },
- tocline = \CTEXifname{\CTEXthepart\hspace{\eb@toc@part@numsep}}{}#2
+ }
},
chapter =
{