diff options
author | Karl Berry <karl@freefriends.org> | 2022-01-17 20:56:46 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-01-17 20:56:46 +0000 |
commit | e4d6bacce38f34441ff02a9509c5c90c0c620ff8 (patch) | |
tree | 54184efa1df24fb23a5938db8095107cbd5eb424 /Master/texmf-dist/tex/latex | |
parent | 039ad675536b0349e4805af936ccca3763b0f851 (diff) |
easybook (17jan22)
git-svn-id: svn://tug.org/texlive/trunk@61635 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybase.sty | 58 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg | 2 |
3 files changed, 38 insertions, 24 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybase.sty b/Master/texmf-dist/tex/latex/easybook/easybase.sty index 2267065684c..47a75f83d1d 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybase.sty +++ b/Master/texmf-dist/tex/latex/easybook/easybase.sty @@ -20,7 +20,7 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e,etoolbox} -\ProvidesExplPackage{easybase}{2022/01/15}{1.46C} +\ProvidesExplPackage{easybase}{2022/01/16}{1.46E} {Typeset Chinese theses or books} \cs_generate_variant:Nn \dim_set:Nn { NV } @@ -281,9 +281,9 @@ withpart .bool_set:N = \l__eb_chap_counter_withpart_bool, withpart .default:n = true, withpart .initial:n = false, - uppercase .bool_set:N = \l__eb_mark_uppercase_bool, - uppercase .default:n = true, - uppercase .initial:n = true, + uppercase .tl_set:N = \l__eb_mark_uppercase_value_tl, + uppercase .default:n = all, + uppercase .initial:n = all, brackets .code:n = \eb_assign_tag_brackets:n {#1}, brackets .initial:n = { (,) }, figurepath .tl_set:N = \l_eb_graphics_path_tl @@ -369,14 +369,34 @@ \tl_if_novalue:nF {#5} { \vspace*{#5} } \group_end: } +\cs_new:Npn \eb_mark_uppercase_case_init:n + { + \str_case:Vn \l__eb_mark_uppercase_value_tl + { + { all } { \text_uppercase:n } + { first } { \text_titlecase_first:n } + } + } \ctex_define:nn { hdrset } { chap-mark .cs_set:Np = \eb_fancyhf_chapter_mark:n #1, - chap-mark .initial:n = \CTEXifname{\eb@mark@chapter@label}{}#1, + chap-mark .initial:n = + { + \CTEXifname{\eb@mark@chapter@label}{} + \eb_mark_uppercase_case_init:n {#1} + }, sec-mark .cs_set:Np = \eb_fancyhf_section_mark:n #1, - sec-mark .initial:n = \CTEXifname{\eb@mark@section@label}{}#1, + sec-mark .initial:n = + { + \CTEXifname{\eb@mark@section@label}{} + \eb_mark_uppercase_case_init:n {#1} + }, subsec-mark .cs_set:Np = \eb_fancyhf_subsection_mark:n #1, - subsec-mark .initial:n = \CTEXifname{\eb@mark@subsection@label}{}#1, + subsec-mark .initial:n = + { + \CTEXifname{\eb@mark@subsection@label}{} + \eb_mark_uppercase_case_init:n {#1} + }, chap-label .code:n = \eb_mark_chapter_name_parse:n {#1}, chap-label .initial:n = \hspace{1em}, sec-label .code:n = \eb_mark_section_name_parse:n {#1}, @@ -395,20 +415,11 @@ footnoterule .initial:n = \markrule[0.35\textwidth]{\eb@footnote@rule@wd}[|3pt] } -\cs_set_eq:NN \eb_mark_uppercase:n \text_uppercase:n -\cs_set_eq:NN \eb_mark_nouppercase:n \text_titlecase_first:n -\cs_new:Npn \eb_mark_if_uppercase:nn #1#2 - { - \bool_if:NTF \l__eb_mark_uppercase_bool - { \eb_mark_uppercase:n } - { \eb_mark_nouppercase:n } - { \use:c { eb_fancyhf_#1_mark:n } {#2} } - } \cs_set:Npn \markdouble #1 { \markboth{#1}{\ifbool{@twoside}{#1}{}} } \cs_new:Npn \eb@level@markdouble #1#2 - { \markdouble{\eb_mark_if_uppercase:nn {#1} {#2}} } + { \markdouble{\use:c { eb_fancyhf_#1_mark:n } {#2}} } \cs_new:Npn \eb@level@markright #1#2 - { \markright{\eb_mark_if_uppercase:nn {#1} {#2}} } + { \markright{\use:c { eb_fancyhf_#1_mark:n } {#2}} } \cs_gset:Npn \chaptermark #1 { \eb@level@markdouble{chapter}{#1} } \cs_gset:Npn \sectionmark #1 { @@ -1292,8 +1303,8 @@ \cs_new_protected:Npn \eb_biber_title_level_spec:n #1 { \bool_if:NTF \l__eb_class_mode_book_bool - { \bichapter*{#1}{\l__eb_bib_en_bitoc_title_tl} } - { \bisection*{#1}{\l__eb_bib_en_bitoc_title_tl} } + { \bichapter*{#1}{\eb@bib@bitoc@title} } + { \bisection*{#1}{\eb@bib@bitoc@title} } \sectionmark{#1} } \cs_new_protected:Npn \eb_toc_start_multi_column_ext:n #1 @@ -1560,7 +1571,7 @@ \SetEnumitemValue{font}{sf}{\color{ctex@emph}\normalfont\sffamily} \SetEnumitemValue{ref}{enumii}{\arabic{enumi}.\alph*} \SetEnumitemValue{ref}{enumiii}{\arabic{enumi}.\alph{enumii}.\roman*} -\setlist{nosep,labelsep = 0.5em,listparindent = 2em} +\setlist{nosep,labelsep = 0.5em,listparindent = \parindent} \setlist[1]{leftmargin = *,align = left,mode = unboxed} \setlist[itemize,1]{label = bullet} \setlist[itemize,2]{label = endash} @@ -1834,7 +1845,7 @@ bibstyle .initial:n = numerical, citestyle .tl_set:N = \l__eb_bib_cite_style_tl, datafile .clist_set:N = \l__eb_bib_datafile_clist, - bititle .tl_set:N = \l__eb_bib_en_bitoc_title_tl, + bititle .tl_set:N = \eb@bib@bitoc@title, bititle .initial:n = Bibliography, unknown .code:n = \eb_msg_abandon_option:n { bibset } } @@ -2087,6 +2098,9 @@ \exp_args:NV \hypersetup \l__eb_hyperref_clist } +\cs_set_eq:NN \eb@labelformat@save \labelformat +\cs_set_protected:Npn \labelformat #1#2 + { \AfterPreamble{\eb@labelformat@save{#1}{#2}} } \AtBeginDocument { \@ifpackageloaded{cleveref}{} diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index 81721cf89be..df6ea917497 100644 --- a/Master/texmf-dist/tex/latex/easybook/easybook.cls +++ b/Master/texmf-dist/tex/latex/easybook/easybook.cls @@ -20,7 +20,7 @@ %% This work has the LPPL maintenance status `maintained'. \NeedsTeXFormat{LaTeX2e}[2020/10/01] \RequirePackage{l3keys2e} -\ProvidesExplClass{easybook}{2022/01/15}{1.46C} +\ProvidesExplClass{easybook}{2022/01/16}{1.46E} {Typeset Chinese theses or books} \bool_set_false:N \l__eb_compile_draft_bool diff --git a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg index 655c82a915a..9c667943b6d 100644 --- a/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg +++ b/Master/texmf-dist/tex/latex/easybook/eb-tcolorbox.cfg @@ -18,7 +18,7 @@ %% LaTeX version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. -\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/15}{1.46C} +\ProvidesExplFile{eb-tcolorbox.cfg}{2022/01/16}{1.46E} {Customization of tcolorbox for easybook} \cs_set_protected:Npn \addtotcbstyle #1#2 |