diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-10 22:25:28 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-10 22:25:28 +0000 |
commit | 201406d49d5e88b2cbb3bf40a03dbda41d90b0a1 (patch) | |
tree | 4694be758e5870adebb3c156e390b58b4ba6ab94 /Master/texmf-dist/tex/latex/easybook | |
parent | 407e86511f9523fb44618117880ba880d017d399 (diff) |
easybook (10mar21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58261 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/easybook')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 107 |
1 files changed, 48 insertions, 59 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 29fb884d845..055b403aed3 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -9,7 +9,7 @@ %% https://creativecommons.org/licenses/by/4.0/legalcode \NeedsTeXFormat{LaTeX2e} \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2021/03/08}{1.23k}{} +\ProvidesExplClass{easybook}{2021/03/10}{1.23m}{} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -425,25 +425,25 @@ part/rule .tl_set:N = \l__toc_part_rule_tl, part/rule .initial:n = \tocrule{}[\bfseries], - chapter/format .tl_set:N = \l__toc_chap_format_tl, + chapter/format .tl_set:N = \l__toc_chapter_format_tl, chapter/format .initial:n = \addvspace{1pc}\sffamily\large, - chapter/indent .tl_set:N = \l__toc_chap_indent_tl, + chapter/indent .tl_set:N = \l__toc_chapter_indent_tl, chapter/indent .initial:n = 0\ccwd, - chapter/rule .tl_set:N = \l__toc_chap_rule_tl, + chapter/rule .tl_set:N = \l__toc_chapter_rule_tl, chapter/rule .initial:n = \tocrule{$\cdot$}[\bfseries], - section/format .tl_set:N = \l__toc_sec_format_tl, + section/format .tl_set:N = \l__toc_section_format_tl, section/format .initial:n = \addvspace{0.35pc}, - section/indent .tl_set:N = \l__toc_sec_indent_tl, + section/indent .tl_set:N = \l__toc_section_indent_tl, section/indent .initial:n = 1.5\ccwd, - section/rule .tl_set:N = \l__toc_sec_rule_tl, + section/rule .tl_set:N = \l__toc_section_rule_tl, section/rule .initial:n = \tocrule{$\cdot$}, - subsection/format .tl_set:N = \l__toc_subsec_format_tl, + subsection/format .tl_set:N = \l__toc_subsection_format_tl, subsection/format .initial:n = \addvspace{0.35pc}, - subsection/indent .tl_set:N = \l__toc_subsec_indent_tl, + subsection/indent .tl_set:N = \l__toc_subsection_indent_tl, subsection/indent .initial:n = 3.8\ccwd, - subsection/rule .tl_set:N = \l__toc_subsec_rule_tl, + subsection/rule .tl_set:N = \l__toc_subsection_rule_tl, subsection/rule .initial:n = \tocrule{$\cdot$}, lists/format .tl_set:N = \l__toc_lists_format_tl, @@ -466,35 +466,24 @@ \normalsize\normalfont \titlerule*[#1]{\scalebox{#2}{#3}}#4\contentspage } -\titlecontents{part} - [\l__toc_part_indent_tl] - {\l__toc_part_format_tl}{}{} - {\l__toc_part_rule_tl} -\titlecontents{chapter} - [\l__toc_chap_indent_tl] - {\l__toc_chap_format_tl}{}{} - {\l__toc_chap_rule_tl} -\titlecontents{section} - [\l__toc_sec_indent_tl] - {\l__toc_sec_format_tl}{}{} - {\l__toc_sec_rule_tl} -\titlecontents{subsection} - [\l__toc_subsec_indent_tl] - {\l__toc_subsec_format_tl}{}{} - {\l__toc_subsec_rule_tl} -\titlecontents{figure} - [\l__toc_lists_indent_tl] - {\l__toc_lists_format_tl}{}{} - {\l__toc_lists_rule_tl} -\titlecontents{table} - [\l__toc_lists_indent_tl] - {\l__toc_lists_format_tl}{}{} - {\l__toc_lists_rule_tl} +\cs_new_protected:Npn \__titlecontents_set:nn #1#2 + { + \titlecontents{#1} + [\use:c {l__toc_#2_indent_tl}] + {\use:c {l__toc_#2_format_tl}}{}{} + {\use:c {l__toc_#2_rule_tl}} + } \contentsuse{lstlisting}{lol} -\titlecontents{lstlisting} - [\l__toc_lists_indent_tl] - {\l__toc_lists_format_tl}{}{} - {\l__toc_lists_rule_tl} +\clist_map_inline:nn + { + {part}{part}, + {chapter}{chapter}, + {section}{section}, + {subsection}{subsection}, + {figure}{lists}, + {table}{lists}, + {lstlisting}{lists} + }{\__titlecontents_set:nn #1} \ctex_patch_cmd:Nnn \caption@@@addcontentsline {\addcontentsline{#1}{#2}{\protect\numberline{#3}{#4}}} {\addcontentsline{#1}{#2}{#3\hspace{\ccwd}#4}} @@ -763,7 +752,7 @@ \skip_set:Nn \plitemsep{.75ex plus .1ex} \skip_set:Nn \plparsep{0ex} -\cs_new_protected:Npn \__thmname_set:n #1#2 +\cs_new_protected:Npn \__thmname_set:nn #1#2 {\tl_const:cn {c__name_#1_tl}{#2}} \bool_if:NTF \l__lang_chinese_bool { @@ -777,7 +766,7 @@ {example}{例}, {remark}{注}, {exercise}{练习} - }{\__thmname_set:n #1} + }{\__thmname_set:nn #1} }{ \clist_map_inline:nn { @@ -789,7 +778,7 @@ {example}{Example}, {remark}{Remark}, {exercise}{Exercise} - }{\__thmname_set:n #1} + }{\__thmname_set:nn #1} } \bool_new:N \l__thmbox_bool @@ -1039,9 +1028,9 @@ }{#3} \bool_set_true:N \l__backend_bibtex_bool -\tl_new:N \l__bib_mysty_tl \tl_new:N \l__bib_style_tl -\tl_new:N \l__bib_citesty_tl +\tl_new:N \l__bib_otherstyle_tl +\tl_new:N \l__bib_citestyle_tl \tl_new:N \l__bib_file_tl \__ctex_define:nn {bibset} @@ -1056,26 +1045,26 @@ bib-style/numerical .code:n = { \tl_set:Nn \l__bib_style_tl{#1} - \tl_clear:N \l__bib_mysty_tl + \tl_clear:N \l__bib_otherstyle_tl }, bib-style/authoryear .code:n = { \tl_set:Nn \l__bib_style_tl{#1} - \tl_clear:N \l__bib_mysty_tl + \tl_clear:N \l__bib_otherstyle_tl }, bib-style/unknown .code:n = - {\tl_set_eq:NN \l__bib_mysty_tl\l_keys_value_tl}, + {\tl_set_eq:NN \l__bib_otherstyle_tl\l_keys_value_tl}, bib-style .initial:n = numerical, cite-style .code:n = - {\tl_set:Nn \l__bib_citesty_tl{#1}}, + {\tl_set:Nn \l__bib_citestyle_tl{#1}}, bibfile .tl_set:N = \l__bib_file_tl, - bibfile .initial:n = ref/refs.bib + bibfile .initial:n = refs.bib } \cs_new_protected:Npn \__bibtex_set: { - \tl_if_empty:NTF \l__bib_mysty_tl + \tl_if_empty:NTF \l__bib_otherstyle_tl { \tl_if_eq:VnT \l__bib_style_tl{numerical} { @@ -1086,10 +1075,10 @@ {\bibliographystyle{gbt7714-author-year}} \cs_set_eq:NN \cite\citep }{ - \exp_args:NV \bibliographystyle\l__bib_mysty_tl + \exp_args:NV \bibliographystyle\l__bib_otherstyle_tl } - \tl_if_empty:NF \l__bib_citesty_tl - {\exp_args:NV \setcitestyle\l__bib_citesty_tl} + \tl_if_empty:NF \l__bib_citestyle_tl + {\exp_args:NV \setcitestyle\l__bib_citestyle_tl} \cs_set:Npn \bibsection{\__title_mark_intoc:n \bibname} \skip_set:Nn \bibsep{0ex} \NewDocumentCommand{\printbibliography}{o} @@ -1099,17 +1088,17 @@ {\PassOptionsToPackage{#1}{biblatex}} \cs_new_protected:Npn \__biblatex_pre_set: { - \tl_if_empty:NTF \l__bib_mysty_tl + \tl_if_empty:NTF \l__bib_otherstyle_tl { \tl_if_eq:VnT \l__bib_style_tl{numerical} {\__put_biblatex:n {style = gb7714-2015}} \tl_if_eq:VnT \l__bib_style_tl{authoryear} {\__put_biblatex:n {style = gb7714-2015ay}} }{ - \__put_biblatex:n {style = \l__bib_mysty_tl} + \__put_biblatex:n {style = \l__bib_otherstyle_tl} } - \tl_if_empty:NF \l__bib_citesty_tl - {\__put_biblatex:n {citestyle = \l__bib_citesty_tl}} + \tl_if_empty:NF \l__bib_citestyle_tl + {\__put_biblatex:n {citestyle = \l__bib_citestyle_tl}} \__put_biblatex:n {backend = biber} } \cs_new_protected:Npn \__biblatex_after_set: @@ -1200,7 +1189,7 @@ style = mystyle, breaklines = true, resetmargins = true, - numbers = left, + % numbers = left, numberstyle = \footnotesize, abovecaptionskip = -1ex, belowcaptionskip = 1ex, @@ -1274,7 +1263,7 @@ {skyblue, 0000ff,004986,eb6877}, {crimson, dc143c,00c1c9,afcd20} } - \__linkcolor_set:n, + \__linkcolor_set:n linkcolor .default:n = fresh, linkcolor .initial:n = fresh, @@ -1295,7 +1284,7 @@ {energy, f39800,00a0e9,893895}, {cyberpunk, 601986,eb6877,a4005b} } - \__themecolor_set:n, + \__themecolor_set:n color .initial:n = none } |