summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/easybook
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-18 03:01:07 +0000
committerNorbert Preining <norbert@preining.info>2022-01-18 03:01:07 +0000
commit42225b2641eab592f67f238c364b237ee036bf0a (patch)
tree80da1bff81f487c45384ea40a060c77a372583dd /macros/latex/contrib/easybook
parenta98801f61d66bae07d8786d2891bed0bece7d96e (diff)
CTAN sync 202201180301
Diffstat (limited to 'macros/latex/contrib/easybook')
-rw-r--r--macros/latex/contrib/easybook/easybook.dtx62
-rw-r--r--macros/latex/contrib/easybook/easybook.pdfbin595578 -> 595806 bytes
-rw-r--r--macros/latex/contrib/easybook/easybook.tex14
3 files changed, 45 insertions, 31 deletions
diff --git a/macros/latex/contrib/easybook/easybook.dtx b/macros/latex/contrib/easybook/easybook.dtx
index ec8cfcee74..578d585706 100644
--- a/macros/latex/contrib/easybook/easybook.dtx
+++ b/macros/latex/contrib/easybook/easybook.dtx
@@ -15,7 +15,7 @@
%<*class>
\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
@@ -305,7 +305,7 @@
%<*package>
\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 }
@@ -566,9 +566,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
@@ -654,14 +654,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},
@@ -680,20 +700,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
{
@@ -1577,8 +1588,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
@@ -1845,7 +1856,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}
@@ -2119,7 +2130,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 }
}
@@ -2372,6 +2383,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}{}
@@ -2419,7 +2433,7 @@
}
%</package>
%<*tcolorbox>
-\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
diff --git a/macros/latex/contrib/easybook/easybook.pdf b/macros/latex/contrib/easybook/easybook.pdf
index bcb1d7e974..633011029a 100644
--- a/macros/latex/contrib/easybook/easybook.pdf
+++ b/macros/latex/contrib/easybook/easybook.pdf
Binary files differ
diff --git a/macros/latex/contrib/easybook/easybook.tex b/macros/latex/contrib/easybook/easybook.tex
index 39b0334c40..865f7bf26f 100644
--- a/macros/latex/contrib/easybook/easybook.tex
+++ b/macros/latex/contrib/easybook/easybook.tex
@@ -21,8 +21,8 @@
name = easybook,
color-scheme = blue,
title = EASYBOOK 使用手册,
- version = v1.46C,
- date = 2022/01/15,
+ version = v1.46E,
+ date = 2022/01/16,
authors = 瞿毅,
info = 排版简体中文学位论文和书籍,
email = q1jx@foxmail.com,
@@ -415,7 +415,7 @@
style =
{
fntnumwith = page,
- uppercase = false
+ uppercase = first
}
}
\ebstyle{hyphen-figure = {-}}
@@ -440,9 +440,9 @@
\keybool{withpart}\Default{false}
使章标题跟随部分计数器编号,当开启新的一部分时章编号从 1 开始。
\keychoice{fntnumwith}{part,chapter,page}\Default{chapter}
- 使脚注跟随编号的计数器名。默认跟随章计数器,当开启新的一章时脚注编号从 1 开始。
- \keybool{uppercase}\Default{true}
- 使用 \cs*{rightmark} 和 \cs*{leftmark} 等标题标记命令获取标题内容时英文是否大写。
+ 使脚注跟随编号的计数器名。默认跟随章计数器,即开启新的一章时脚注编号从 1 开始。
+ \keychoice{uppercase}{all,first,none}\Default{all}
+ 使用 \cs*{rightmark} 和 \cs*{leftmark} 等标题标记命令获取标题内容用于页眉页脚时其中英文的大小写类型。\code{all} 为标题标记中的英文字母全部大写,\code{first} 为标记以英文起始时仅第一个字母大写,\code{none} 则不改变标记中英文字母的大小写形式。
\kvsplit{brackets}{左括号,右括号}\Default{\Carg{(\black{,})}}
设置行间公式编号标签的括号及格式,以英文逗号分隔,分别代表左右括号。\meta{左括号} 可以是带有一个参数的命令,用于接受编号和 \meta{右括号}。将标签括号设置为方括号,并使用无衬线字体:
\begin{ctexexam}
@@ -708,7 +708,7 @@
\subsection{页眉页脚}
\label{subsec:header and footer}
-模块 \module*{hdrset} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。在 \cls*{book} 模式时使用章节标题标记选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致。标题标记由标签和标题组成,选项中参数 \code{\#1} 代表当前章、节或小节的标题。也可以直接重新定义这些选项对应的标题标记命令,但此时标记大写选项 \option{uppercase} 失效。
+模块 \module*{hdrset} 设置的命令由 \pkg*{fancyhdr} 宏包提供支持。标题标记由标签和标题组成,选项中参数 \code{\#1} 代表当前章、节或小节的标题。在 \cls*{book} 模式时使用标题标记选项 \option{chap-mark} 和 \option{sec-mark},在 \cls*{article} 模式时使用 \option{sec-mark} 和 \option{subsec-mark} 选项,这与标准文档类的行为一致。重新设置标题标记选项时标记大小写选项 \option{uppercase} 会失效。
\begin{options}
\keyval-{chap-mark}{标题标记}\Module{hdrset}
标题标记命令 \cs*{chaptermark} 的内容,包括了标签选项 \option{chap-label} 的内容。