texlive[57431] Master/texmf-dist: easybook (15jan21)
commits+karl at tug.org
commits+karl at tug.org
Fri Jan 15 22:55:52 CET 2021
Revision: 57431
http://tug.org/svn/texlive?view=revision&revision=57431
Author: karl
Date: 2021-01-15 22:55:51 +0100 (Fri, 15 Jan 2021)
Log Message:
-----------
easybook (15jan21)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
trunk/Master/texmf-dist/doc/latex/easybook/easybook.pdf
trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex
trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex 2021-01-15 21:55:36 UTC (rev 57430)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook-demo.tex 2021-01-15 21:55:51 UTC (rev 57431)
@@ -56,10 +56,9 @@
},
hdrset =
{
- echead = \color{Teal}\kaishu\leftmark,
- ochead = \color{Teal}\kaishu\rightmark,
- elhead = \color{Teal}\thepage,
- orhead = \color{Teal}\thepage
+ \fancyhead[EC]{\color{Teal}\kaishu\leftmark}
+ \fancyhead[OC]{\color{Teal}\kaishu\rightmark}
+ \fancyhead[EL,OR]{\color{Teal}\thepage}
},
tocset =
{
@@ -96,7 +95,7 @@
\edge~\url{https://latexstudio.net} \\
\url{https://ctan.org/pkg/easybook}
}
- \date{2021/01/14\hskip\ccwd\relax v1.21d}
+ \date{2021/01/15\hskip\ccwd\relax v1.21e}
}
\begin{document}
Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex 2021-01-15 21:55:36 UTC (rev 57430)
+++ trunk/Master/texmf-dist/doc/latex/easybook/easybook.tex 2021-01-15 21:55:51 UTC (rev 57431)
@@ -8,7 +8,7 @@
\title{\sffamily easybook书籍文档类}
\author{瞿毅}
-\date{2021/01/14\hskip\ccwd\relax v1.21d\thanks{\url{https://gitee.com/texl3/easybook}}}
+\date{2021/01/15\hskip\ccwd\relax v1.21e\thanks{\url{https://gitee.com/texl3/easybook}}}
\begin{document}
\maketitle
@@ -285,26 +285,23 @@
\end{function}
\subsection{页眉页脚}
-\begin{function}[EXP,added = 2021-01-13]{hdrset/elhead,hdrset/echead,hdrset/ochead,hdrset/orhead,hdrset/olfoot,...}
+\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{hdrset,\fancyhead,\fancyfoot,...}
\begin{syntax}
- elhead = \tn{color{ctex at frame}}\tn{thepage}
- echead = \tn{color{ctex at frame}}\tn{kaishu}\tn{leftmark}
- ochead = \tn{color{ctex at frame}}\tn{kaishu}\tn{rightmark}
- orhead = \tn{color{ctex at frame}}\tn{thepage}
- olfoot = <未设置>
+ hdrset = <载入 \opt{fancyhdr} 的设置>
+ \tn{fancyhead}\oarg{位置}\marg{内容}
+ \tn{fancyfoot}\oarg{位置}\marg{内容}
\end{syntax}
\changes{v1.21}{2021/01/11}{修复单面文档时页眉横线消失的问题。}
\changes{v1.21c}{2021/01/13}{增加配置页眉页脚的选项。}
-\opt{hdrset} 将选项交给 \pkg{fancyhdr} 宏包页面风格命令 \tn{fancyhf} 处理,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成左中右和奇数页(odd)、偶数页(even)共12个部分,所以设置了对应的12个选项。\opt{head} 与 \opt{foot} 表示页眉与页脚区域,前缀e、o代表偶数、奇数,前缀l、c、r代表左、中、右部分。单面打印时,偶数前缀的选项无效。
+\opt{hdrset} 设置的命令由 \pkg{fancyhdr} 宏包提供支持,设置的是一个名为 \opt{fancy} 的页面风格。\pkg{fancyhdr} 将页眉页脚分成了左中右和奇数页(odd)、偶数页(even)共12个部分,可选参数中E、O代表偶数、奇数,L、C、R代表左、中、右部分。单面打印时,含有偶数的选项无效。
\begin{ctexexam}
\ctexset
{
hdrset =
{
- erhead = \leftmark,
- elhead = \textbf{\thepage},
- olhead = \rightmark,
- orhead = \textbf{\thepage}
+ \fancyhead[ER]{\leftmark}
+ \fancyhead[OL]{\rightmark}
+ \fancyhead[EL,OR]{\textbf{\thepage}}
}
}
\end{ctexexam}
@@ -311,17 +308,22 @@
\end{function}
\subsection{目录样式}
-\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-14]{tocset/.../format,tocset/.../indent,tocset/.../rule,tocset/lolskip,tocset/belowoffset,\tocrule}
+\begin{function}[EXP,added = 2021-01-13,updated = 2021-01-15]{tocset/.../format,tocset/.../indent,tocset/.../rule,lists/lolskip,lists/belowoffset,tocset/belowoffset,\tocrule}
\begin{syntax}
format = <目录标题格式>
indent = <目录标题左边缩进>
rule = <目录引导线样式>
lolskip = <(0.8pc)>
+ lists/belowoffset = <(0pc)>
belowoffset = <(-1pc)>
\tn{tocrule} = \oarg{引导点间距}\oarg{引导点大小}\marg{引导点}\oarg{页码格式}
\end{syntax}
\changes{v1.21c}{2021/01/13}{增加配置目录样式的选项。}
-\opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,预置了 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录标题,键值列表中的...代表它们。\opt{lists} 为图片、表格和代码目录格式的级别。\opt{lolskip} 是代码目录标题后的距离,与\CTeX 的 \opt{lotskip} 和 \opt{lofskip} 不太一样。\opt{belowoffset} 选项为目录总标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的间距。建议 \opt{lolskip+lists/format/addvspace = -belowoffset}。\tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
+\opt{tocset} 将目录样式交给 \pkg{titletoc} 处理,预置了 \opt{part}、\opt{chapter}、\opt{section}、\opt{subsection} 和 \opt{lists} 五种级别的目录标题,键值列表中的...代表它们。\opt{lists} 为图片、表格和代码目录格式的级别。
+
+\opt{lolskip} 是代码目录中章之间的代码标题的距离,使用刚性间距,与\CTeX 的 \opt{lotskip} 和 \opt{lofskip} 类似,它们的值均默认0.8pc。\opt{belowoffset} 选项为目录总标题 \tn{contentsname} 后的间距补偿,一般为负值,用于抵消 \opt{format} 中设置的间距。\opt{lists} 中的 \opt{belowoffset} 意义类似,但是一般为正值,在 \opt{lolskip = 0pc} 时使用。建议 \opt{lolskip+lists/format/addvspace = -belowoffset}。
+
+\tn{tocrule} 命令生成目录引导线,需要在 \opt{rule} 选项中使用,其中引导线间距需带有长度单位,引导点大小不带单位,为引导点符号正常大小的倍数,引导点一般为英文句号或 \tn{cdot} 中心点符号。页码格式的内容位于页码前面,可以设置页码字体、距离。
\begin{ctexexam}
\ctexset
{
Modified: trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls 2021-01-15 21:55:36 UTC (rev 57430)
+++ trunk/Master/texmf-dist/tex/latex/easybook/easybook.cls 2021-01-15 21:55:51 UTC (rev 57431)
@@ -9,12 +9,12 @@
%% https://creativecommons.org/licenses/by/4.0/legalcode
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3keys2e}
-\ProvidesExplClass{easybook}{2021/01/14}{1.21d}{}
+\ProvidesExplClass{easybook}{2021/01/15}{1.21e}{}
\cs_generate_variant:Nn \keys_define:nn {nx}
\cs_generate_variant:Nn \int_to_arabic:n {v}
\cs_generate_variant:Nn \dim_add:Nn {NV}
-\cs_new_protected:Npn \__ctex_define:n #1
+\cs_new_protected:Npn \__ctex_define:nn #1
{\keys_define:nn {ctex/#1}}
\cs_new_protected:Npn \__put_ctexbook:n #1
{\PassOptionsToClass{#1}{ctexbook}}
@@ -110,13 +110,12 @@
bibset .meta:nn = {ctex/bibset}{#1},
thmset .meta:nn = {ctex/thmset}{#1},
geoset .meta:nn = {ctex/geoset}{#1},
- hdrset .meta:nn = {ctex/hdrset}{#1},
tocset .meta:nn = {ctex/tocset}{#1},
config .tl_set:N = \g__config_tl,
lstlistlistingname .tl_set:N = \lstlistlistingname,
lstlistingname .tl_set:N = \lstlistingname
}
-\__ctex_define:n {style}
+\__ctex_define:nn {style}
{
capdash .bool_set:N = \l__capdash_bool,
capdash .default:n = true,
@@ -147,8 +146,6 @@
\RequirePackage{siunitx,physics,bm}
\RequirePackage[normalem]{ulem}
\RequirePackage[protrusion = false]{microtype}
-\RequirePackage{hologo}
-\hologoSetup{discretionarybreak = true}
\RequirePackage{rotfloat}
\RequirePackage{geometry,marginnote,changepage}
\RequirePackage{nccfoots,tablefootnote}
@@ -156,7 +153,7 @@
\RequirePackage{caption,bicaption,subcaption}
\RequirePackage{graphicx,wrapfig}
\RequirePackage{zhlipsum,fontawesome,pifont}
-\RequirePackage{tabularx,multirow,makecell,tabu,booktabs}
+\RequirePackage{tabularx,multirow,makecell,booktabs}
\RequirePackage{paralist,tasks}
\RequirePackage[shortlabels,inline]{enumitem}
\RequirePackage[most]{tcolorbox}
@@ -265,7 +262,7 @@
\cs_if_exist:NF \kaishu{\cs_gset_eq:NN \kaishu\normalfont}
\clist_new:N \g__geometry_clist
-\__ctex_define:n {geoset}
+\__ctex_define:nn {geoset}
{
unknown .code:n =
{
@@ -305,34 +302,16 @@
\pagenumbering{Roman}
}
-\__ctex_define:n {hdrset}
+\ctex_define:n
{
- elhead .tl_set:N = \l__fancyhead_EL_tl,
- elhead .initial:n = \color{ctex at frame}\thepage,
- echead .tl_set:N = \l__fancyhead_EC_tl,
- echead .initial:n = \color{ctex at frame}\kaishu\leftmark,
- erhead .tl_set:N = \l__fancyhead_ER_tl,
- erhead .initial:n = {},
- olhead .tl_set:N = \l__fancyhead_OL_tl,
- olhead .initial:n = {},
- ochead .tl_set:N = \l__fancyhead_OC_tl,
- ochead .initial:n = \color{ctex at frame}\kaishu\rightmark,
- orhead .tl_set:N = \l__fancyhead_OR_tl,
- orhead .initial:n = \color{ctex at frame}\thepage,
- elfoot .tl_set:N = \l__fancyfoot_EL_tl,
- elfoot .initial:n = {},
- ecfoot .tl_set:N = \l__fancyfoot_EC_tl,
- ecfoot .initial:n = {},
- erfoot .tl_set:N = \l__fancyfoot_ER_tl,
- erfoot .initial:n = {},
- olfoot .tl_set:N = \l__fancyfoot_OL_tl,
- olfoot .initial:n = {},
- ocfoot .tl_set:N = \l__fancyfoot_OC_tl,
- ocfoot .initial:n = {},
- orfoot .tl_set:N = \l__fancyfoot_OR_tl,
- orfoot .initial:n = {}
+ hdrset .tl_set:N = \l__fancyhf_content_tl,
+ hdrset .initial:n =
+ {
+ \fancyhead[EC]{\color{ctex at frame}\kaishu\leftmark}
+ \fancyhead[OC]{\color{ctex at frame}\kaishu\rightmark}
+ \fancyhead[EL,OR]{\color{ctex at frame}\thepage}
+ }
}
-
\ctex_at_end_preamble:n
{
\exp_args:NV \geometry\g__geometry_clist
@@ -367,18 +346,7 @@
}
}
}
- \fancyhead[EL]{\l__fancyhead_EL_tl}
- \fancyhead[EC]{\l__fancyhead_EC_tl}
- \fancyhead[ER]{\l__fancyhead_ER_tl}
- \fancyhead[OL]{\l__fancyhead_OL_tl}
- \fancyhead[OC]{\l__fancyhead_OC_tl}
- \fancyhead[OR]{\l__fancyhead_OR_tl}
- \fancyfoot[EL]{\l__fancyfoot_EL_tl}
- \fancyfoot[EC]{\l__fancyfoot_EC_tl}
- \fancyfoot[ER]{\l__fancyfoot_ER_tl}
- \fancyfoot[OL]{\l__fancyfoot_OL_tl}
- \fancyfoot[OC]{\l__fancyfoot_OC_tl}
- \fancyfoot[OR]{\l__fancyfoot_OR_tl}
+ \l__fancyhf_content_tl
\cs_gset_eq:NN \ps at plain\ps at empty
}{
\cs_gset:Npn \chaptermark#1
@@ -397,12 +365,7 @@
}
}{}
}
- \fancyhead[L]{\l__fancyhead_OL_tl}
- \fancyhead[C]{\l__fancyhead_OC_tl}
- \fancyhead[R]{\l__fancyhead_OR_tl}
- \fancyfoot[L]{\l__fancyfoot_OL_tl}
- \fancyfoot[C]{\l__fancyfoot_OC_tl}
- \fancyfoot[R]{\l__fancyfoot_OR_tl}
+ \l__fancyhf_content_tl
\cs_gset_eq:NN \ps at plain\ps at empty
}
\cs_gset:Npn \sectionmark#1
@@ -438,7 +401,7 @@
tocset/subsection .meta:nn = {ctex/tocset/subsection}{#1},
tocset/list .meta:nn = {ctex/tocset/list}{#1},
}
-\__ctex_define:n {tocset}
+\__ctex_define:nn {tocset}
{
part/format .tl_set:N = \l__toc_part_format_tl,
part/format .initial:n =
@@ -478,6 +441,8 @@
lists/rule .initial:n = \tocrule{$\cdot$},
lists/lolskip .dim_set:N = \l__toc_lolskip_dim,
lists/lolskip .initial:n = 0.8pc,
+ lists/belowoffset .dim_set:N = \l__toc_listsoffset_dim,
+ lists/belowoffset .initial:n = 0pc,
belowoffset .dim_set:N = \l__toc_offset_dim,
belowoffset .initial:n = -1pc
@@ -528,6 +493,11 @@
\addcontentsline{lol}{lstlisting}
{\thelstlisting\hspace{\ccwd}\lst@@caption}
}
+\__appto_cmd:Nn \@chapter
+ {
+ \addtocontents{lol}
+ {\protect\addvspace{\dim_use:N \l__toc_lolskip_dim}}
+ }
\cs_new_protected:Npn \__markboth:n #1
{
@@ -556,7 +526,7 @@
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
\__title_mark:n {\contentsname}
- \vspace*{\l__toc_offset_dim}
+ \vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{toc}
\if at restonecol
\twocolumn
@@ -574,7 +544,8 @@
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
\__title_mark_intoc:n {\listfigurename}
- \vspace*{\l__toc_offset_dim}
+ \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{lof}
\if at restonecol
\twocolumn
@@ -592,7 +563,8 @@
\bool_if:NT \l__multoc_bool{\twocolumn}
\fi
\__title_mark_intoc:n {\listtablename}
- \vspace*{\l__toc_offset_dim}
+ \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{lot}
\if at restonecol
\twocolumn
@@ -614,8 +586,8 @@
\fi
}
\__title_mark_intoc:n {\lstlistlistingname}
- \dim_add:NV \l__toc_offset_dim\l__toc_lolskip_dim
- \vspace*{\l__toc_offset_dim}
+ \dim_add:NV \l__toc_offset_dim\l__toc_listsoffset_dim
+ \vspace*{\dim_use:N \l__toc_offset_dim}
\@starttoc{lol}
\@ifundefined{@restonecoltrue}{}
{
@@ -651,7 +623,7 @@
\tl_new:N \l__foot_font_tl
\tl_new:N \l__margin_font_tl
-\__ctex_define:n {elfont}
+\__ctex_define:nn {elfont}
{
tabfont .tl_set:N = \l__tab_font_tl,
tabfont .initial:n = \sffamily\small,
@@ -723,7 +695,7 @@
\tl_new:N \l__foot_spread_tl
\tl_new:N \l__foot_fnsep_tl
-\__ctex_define:n {spread}
+\__ctex_define:nn {spread}
{
linespread .fp_set:N = \l__line_spread_fp,
linespread .initial:n = 1.3,
@@ -827,7 +799,7 @@
\tl_new:N \l__thm_spaceabove_tl
\tl_new:N \l__thm_spacebelow_tl
-\__ctex_define:n {thmset}
+\__ctex_define:nn {thmset}
{
thmbox .bool_set:N = \l__thmbox_bool,
thmbox .default:n = true,
@@ -1037,7 +1009,7 @@
\tl_new:N \l__bib_citesty_tl
\tl_new:N \l__bib_file_tl
-\__ctex_define:n {bibset}
+\__ctex_define:nn {bibset}
{
backend .choice:,
backend/bibtex .code:n = {},
More information about the tex-live-commits
mailing list.