summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/easybook
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-05-12 20:02:13 +0000
committerKarl Berry <karl@freefriends.org>2021-05-12 20:02:13 +0000
commitbfa1cf26ca0726c4904180a447aedb629cbad1ab (patch)
treec591a7f5bfeaaeb75f9447ffab4ec0913afe5be9 /Master/texmf-dist/tex/latex/easybook
parent74e8bc59b909d2ed54214f9f9e4e7cc7f8c3fa4c (diff)
easybook (12may21)
git-svn-id: svn://tug.org/texlive/trunk@59174 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/easybook')
-rw-r--r--Master/texmf-dist/tex/latex/easybook/easybook.cls204
1 files changed, 142 insertions, 62 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls
index ec5e0a26b01..bd59841b3b9 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/05/10}{1.25g}{beta}
+\ProvidesExplClass{easybook}{2021/05/12}{1.25h}{beta}
\cs_generate_variant:Nn \eb_ctex_define:nn { nx }
\cs_generate_variant:Nn \int_to_arabic:n { v }
@@ -25,12 +25,17 @@
{ \PassOptionsToClass{#1}{ctexbook} }
\cs_new_protected:Npn \eb_patch_cmd:Nnn #1#2#3
{
- \ctex_patch_cmd_once:NnnnTF #1 { } { #2 } { #3 }
+ \ctex_patch_cmd_once:NnnnTF #1 { } {#2} {#3}
{ } { \ctex_patch_failure:N #1 }
}
\cs_new_protected:Npn \eb_appto_cmd:Nn #1#2
{
- \ctex_appto_cmd:NnnTF #1 { } { #2 }
+ \ctex_appto_cmd:NnnTF #1 { } {#2}
+ { } { \ctex_patch_failure:N #1 }
+ }
+\cs_new_protected:Npn \eb_preto_cmd:Nn #1#2
+ {
+ \ctex_preto_cmd:NnnTF #1 { } {#2}
{ } { \ctex_patch_failure:N #1 }
}
\cs_new_protected:Npn \eb_at_end_preamble:n
@@ -103,7 +108,7 @@
\clist_map_inline:nn
{
{ svgnames } { xcolor },
- { hang,stable } { footmisc },
+ { stable } { footmisc },
{ normalem } { ulem },
{ protrusion = false } { microtype },
{ list = off } { bicaption },
@@ -340,12 +345,6 @@
\clist_new:N \g__eb_geometry_clist
\eb_ctex_define:nn { geoset }
{
- footnotemargin .dim_set:N = \footnotemargin,
- footnotemargin .initial:n = 0.5\ccwd,
- footparskip .tl_set:N = \hangfootparskip,
- footparskip .initial:n = 0ex,
- footparindent .tl_set:N = \hangfootparindent,
- footparindent .initial:n = 2\ccwd,
unknown .code:n =
{
\clist_gput_right:Nx \g__eb_geometry_clist
@@ -445,8 +444,31 @@
\hrule width 0.35\columnwidth height \l__eb_rule_width_dim
\vspace*{2.6pt}
\group_end:
- }
+ },
+
+ fnmargin .dim_set:N = \footnotemargin,
+ fnmargin .initial:n = 0.75\ccwd,
+ fnparskip .tl_set:N = \hangfootparskip,
+ fnparskip .initial:n = 0ex,
+ fnparindent .tl_set:N = \hangfootparindent,
+ fnparindent .initial:n = 2\ccwd,
+
+ fnhang .bool_set:N = \l__eb_footnote_hang_bool,
+ fnhang .default:n = true,
+ fnhang .initial:n = true,
+ fnmark-pos .tl_set:N = \l__eb_fnmark_position_tl,
+ fnmark-pos .initial:n = super,
+ afterfnmark .tl_set:N = \l__eb_fnmark_after_tl,
+ afterfnmark .initial:n =
+ { \tl_if_eq:NnF \l__eb_fnmark_position_tl { super } { \space } },
+ fnmark-form .tl_set:N = \l__eb_fnmark_format_tl,
+
+ fnmark-num .choices:nn =
+ { plain,pifont,pifont*,pifont-sans,pifont-sans* }
+ { \tl_gset_eq:NN \l__eb_fnmark_number_tl \l_keys_choice_tl },
+ fnmark-num .value_required:n = true
}
+
\cs_new:Npn \eb_upper_number_mark_bool:nn #1#2
{
\bool_if:NT \l__eb_uppercase_bool
@@ -490,6 +512,108 @@
}
}
+\eb_at_end_preamble:n
+ {
+ \group_begin:
+ \footnotesize
+ \exp_args:Nx
+ \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
+ \exp_args:NNNo \group_end:
+ \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
+ \bool_if:NT \l__eb_chap_withpart_bool
+ { \counterwithin*{chapter}{part} }
+ \tl_if_eq:NnT \l__eb_foot_numberwith_tl { part }
+ {
+ \counterwithout*{footnote}{chapter}
+ \counterwithin*{footnote}{part}
+ }
+ \tl_if_eq:NnT \l__eb_foot_numberwith_tl { page }
+ {
+ \counterwithout*{footnote}{chapter}
+ \counterwithin*{footnote}{page}
+ }
+ \bool_if:NTF \l__eb_footnote_hang_bool
+ { \booltrue{FN@hangfoot} } { \boolfalse{FN@hangfoot} }
+ }
+\eb_patch_cmd:Nnn \@footnotetext
+ { \reset@font }
+ {
+ \linespread{\fp_use:N \l__eb_spread_footnote_fp}
+ \selectfont\ignorespaces
+ \l__eb_font_footnote_tl
+ }
+\eb_patch_cmd:Nnn \@mpfootnotetext
+ { \reset@font }
+ {
+ \linespread{\fp_use:N \l__eb_spread_footnote_fp}
+ \selectfont\ignorespaces
+ \l__eb_font_footnote_tl
+ }
+\ctex_after_end_preamble:n
+ {
+ \ExplSyntaxOn\char_set_catcode_letter:N \@
+ \eb_patch_cmd:Nnn \@footnotemark
+ { \@makefnmark }
+ {
+ \tl_use:N \l__eb_font_footnote_tl
+ \tl_use:N \l__eb_fnmark_format_tl
+ {\hbox:n { \textsuperscript{\@thefnmark} }}
+ }
+ \ExplSyntaxOff\char_set_catcode_other:N \@
+ }
+\cs_set:Npn \@makefnmark
+ {
+ \tl_use:N \l__eb_font_footnote_tl
+ \tl_use:N \l__eb_fnmark_format_tl
+ {
+ \hbox:n
+ {
+ \tl_if_eq:NnT \l__eb_fnmark_position_tl {super}
+ { \textsuperscript }{\@thefnmark}
+ \tl_use:N \l__eb_fnmark_after_tl
+ }
+ }
+ }
+\cs_set:Npn \thefootnote { \eb_footnote_counter:N \c@footnote }
+\cs_set:Npn \thempfootnote { \int_to_alph:n { \c@mpfootnote } }
+
+\cs_new_protected:Npn \eb_fnmark_number_set:nn #1#2
+ { \tl_const:cn { c__eb_fnmark_number_#1_tl } {#2} }
+\clist_map_inline:nn
+ {
+ { plain } { plain },
+ { pifont } { pifont },
+ { pifont_neg } { pifont* },
+ { pifont_sans } { pifont-sans },
+ { pifont_sans_neg } { pifont-sans* }
+ }
+ { \eb_fnmark_number_set:nn #1 }
+\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
+ { \ding{\int_eval:n { 181 + #1 }} }
+\cs_new:Npn \eb_fnmark_counter_pifont_sans:N #1
+ { \ding{\int_eval:n { 191 + #1 }} }
+\cs_new:Npn \eb_fnmark_counter_pifont_sans_neg:N #1
+ { \ding{\int_eval:n { 201 + #1 }} }
+\cs_new:Npn \eb_footnote_counter:N #1
+ {
+ \tl_case:NnF \l__eb_fnmark_number_tl
+ {
+ \c__eb_fnmark_number_plain_tl
+ { \int_use:N #1 }
+ \c__eb_fnmark_number_pifont_tl
+ { \eb_fnmark_counter_pifont:N #1 }
+ \c__eb_fnmark_number_pifont_neg_tl
+ { \eb_fnmark_counter_pifont_neg:N #1 }
+ \c__eb_fnmark_number_pifont_sans_tl
+ { \eb_fnmark_counter_pifont_sans:N #1 }
+ \c__eb_fnmark_number_pifont_sans_neg_tl
+ { \eb_fnmark_counter_pifont_sans_neg:N #1 }
+ }
+ { \int_use:N #1 }
+ }
+
\seq_const_from_clist:Nn \c__eb_toc_headings_level_seq
{ part,chapter,section,subsection,list }
\seq_map_inline:Nn \c__eb_toc_headings_level_seq
@@ -614,12 +738,12 @@
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.5\ccwd } { 0\ccwd } },
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.8\ccwd } { 1.4\ccwd } },
subsection/rule = \tocrule{$\cdot$},
list/format = \addvspace{0.2pc},
@@ -1472,7 +1596,7 @@
\tl_new:N \l__eb_bib_style_tl
\tl_new:N \l__eb_bib_otherstyle_tl
\tl_new:N \l__eb_bib_citestyle_tl
-\tl_new:N \l__eb_bib_file_tl
+\tl_new:N \l__eb_bib_datafile_tl
\eb_ctex_define:nn { bibset }
{
@@ -1499,12 +1623,7 @@
cite-style .code:n =
{ \tl_set:Nn \l__eb_bib_citestyle_tl {#1} },
- datafile .tl_set:N = \l__eb_bib_file_tl,
- datafile .initial:n = refs.bib,
-
- loadpkg .bool_set:N = \l__eb_bib_loadpkg_bool,
- loadpkg .default:n = true,
- loadpkg .initial:n = true,
+ datafile .tl_set:N = \l__eb_bib_datafile_tl,
bitoc-title .tl_set:N = \l__eb_bib_bitoc_title,
bitoc-title .initial:n = Reference
@@ -1535,7 +1654,7 @@
\eb_multoc_pre_bool:
\tl_set:Nn \bibsection
{ \eb_title_number_intoc_bool:nn {##2} {##1} }
- \exp_args:NV \bibliography \l__eb_bib_file_tl
+ \exp_args:NV \bibliography \l__eb_bib_datafile_tl
\eb_multoc_post_bool:
\group_end:
}
@@ -1558,7 +1677,7 @@
}
\cs_new_protected:Npn \EbBiblatexPostset
{
- \exp_args:NV \addbibresource \l__eb_bib_file_tl
+ \exp_args:NV \addbibresource \l__eb_bib_datafile_tl
\tl_gset:Nn \blx@default@theheading { bibintoc }
\defbibheading{bibintoc}[\bibname]
{\eb_biber_title_level_bool:n {##1}}
@@ -1566,7 +1685,7 @@
}
\eb_at_end_preamble:n
{
- \bool_if:NT \l__eb_bib_loadpkg_bool
+ \tl_if_empty:NF \l__eb_bib_datafile_tl
{
\bool_if:NTF \l__eb_backend_bibtex_bool
{
@@ -1581,45 +1700,6 @@
}
}
-\eb_at_end_preamble:n
- {
- \group_begin:
- \footnotesize
- \exp_args:Nx
- \linespread{\fp_use:N \l__eb_spread_footnote_fp}\selectfont
- \exp_args:NNNo \group_end:
- \dim_set:Nn \footnotesep { \dim_use:N \box_ht:N \strutbox }
- \bool_if:NT \l__eb_chap_withpart_bool
- { \counterwithin*{chapter}{part} }
- \tl_if_eq:NnT \l__eb_foot_numberwith_tl { part }
- {
- \counterwithout*{footnote}{chapter}
- \counterwithin*{footnote}{part}
- }
- \tl_if_eq:NnT \l__eb_foot_numberwith_tl { page }
- {
- \counterwithout*{footnote}{chapter}
- \counterwithin*{footnote}{page}
- }
- }
-\eb_patch_cmd:Nnn \@footnotetext
- { \reset@font }
- {
- \linespread{\fp_use:N \l__eb_spread_footnote_fp}
- \selectfont\ignorespaces
- \l__eb_font_footnote_tl
- }
-\eb_patch_cmd:Nnn \@mpfootnotetext
- { \reset@font }
- {
- \linespread{\fp_use:N \l__eb_spread_footnote_fp}
- \selectfont\ignorespaces
- \l__eb_font_footnote_tl
- }
-\eb_patch_cmd:Nnn \@makefnmark
- { \normalfont } { \l__eb_font_footnote_tl }
-\cs_gset:Npn \thempfootnote { \int_to_alph:n { \c@mpfootnote } }
-
\lstdefinestyle{easy-listings}
{
language = [LaTeX]TeX,