diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-13 22:18:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-13 22:18:29 +0000 |
commit | 122c974d05b7cd8313c8fda65d2c8d9d06b7c3ab (patch) | |
tree | 0df13015d97e4c6da515dfce45d6a838ff23044a /Master/texmf-dist/tex | |
parent | edab3216d04a6bd4114eb1bba59e4fd6517f7aeb (diff) |
easybook (13feb21)
git-svn-id: svn://tug.org/texlive/trunk@57734 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/easybook/easybook.cls | 129 |
1 files changed, 66 insertions, 63 deletions
diff --git a/Master/texmf-dist/tex/latex/easybook/easybook.cls b/Master/texmf-dist/tex/latex/easybook/easybook.cls index e3f6b5ce9e1..305f33ac691 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/02/10}{1.23c}{} +\ProvidesExplClass{easybook}{2021/02/13}{1.23d}{} \cs_generate_variant:Nn \keys_define:nn {nx} \cs_generate_variant:Nn \int_to_arabic:n {v} @@ -126,7 +126,9 @@ perpage .initial:n = false, notomath .bool_set:N = \l__notomath_bool, notomath .default:n = true, - notomath .initial:n = true + notomath .initial:n = true, + rulewidth .dim_set:N = \l__rule_width_dim, + rulewidth .initial:n = 0.75pt } \clist_map_inline:nn @@ -389,7 +391,7 @@ \cs_gset:Npn \headrule { \color{ctex@frame}\vspace{2.5pt} - \hrule width\textwidth height 0.75pt + \hrule width\textwidth height \l__rule_width_dim } \bool_if:NT \l__draft_bool { @@ -432,7 +434,7 @@ section/rule .initial:n = \tocrule{$\cdot$}, subsection/format .tl_set:N = \l__toc_subsec_format_tl, - subsection/forma .initial:n = \addvspace{0.35pc}, + subsection/format .initial:n = \addvspace{0.35pc}, subsection/indent .tl_set:N = \l__toc_subsec_indent_tl, subsection/indent .initial:n = 3.8\ccwd, subsection/rule .tl_set:N = \l__toc_subsec_rule_tl, @@ -622,48 +624,48 @@ {\@mkboth{\MakeUppercase\indexname}{\MakeUppercase\indexname}} {\__markboth:n \indexname} -\tl_new:N \l__tab_font_tl -\tl_new:N \l__fig_font_tl -\tl_new:N \l__lst_font_tl -\tl_new:N \l__foot_font_tl -\tl_new:N \l__margin_font_tl +\tl_new:N \l__table_font_tl +\tl_new:N \l__figure_font_tl +\tl_new:N \l__listing_font_tl +\tl_new:N \l__footnote_font_tl +\tl_new:N \l__marginpar_font_tl \__ctex_define:nn {elfont} { - tabfont .tl_set:N = \l__tab_font_tl, - tabfont .initial:n = \sffamily\small, - figfont .tl_set:N = \l__fig_font_tl, - figfont .initial:n = \sffamily\small, - lstfont .tl_set:N = \l__lst_font_tl, - lstfont .initial:n = \sffamily\small, - fnfont .tl_set:N = \l__foot_font_tl, - fnfont .initial:n = \rmfamily, - marfont .tl_set:N = \l__margin_font_tl, - marfont .initial:n = \rmfamily\footnotesize + table-cap .tl_set:N = \l__table_font_tl, + table-cap .initial:n = \sffamily\small, + figure-cap .tl_set:N = \l__figure_font_tl, + figure-cap .initial:n = \sffamily\small, + listing-cap .tl_set:N = \l__listing_font_tl, + listing-cap .initial:n = \sffamily\small, + footnote .tl_set:N = \l__footnote_font_tl, + footnote .initial:n = \rmfamily, + marginpar .tl_set:N = \l__marginpar_font_tl, + marginpar .initial:n = \rmfamily\footnotesize } \DeclareCaptionLabelSeparator{ccwd}{\hspace{\ccwd}} \DeclareCaptionLabelFormat{parens}{\bothIfFirst{#1}{~}(#2)} -\DeclareCaptionFont{tabfont}{\l__tab_font_tl} -\DeclareCaptionFont{figfont}{\l__fig_font_tl} -\DeclareCaptionFont{lstfont}{\l__lst_font_tl} +\DeclareCaptionFont{tablefont}{\l__table_font_tl} +\DeclareCaptionFont{figurefont}{\l__figure_font_tl} +\DeclareCaptionFont{listingfont}{\l__listing_font_tl} \captionsetup { format = hang, % figurewithin = section, % tablewithin = section, - font = {stretch = {\fp_use:N \l__cap_spread_fp}}, + font = {stretch = {\fp_use:N \l__caption_spread_fp}}, labelfont = {color = ctex@frame}, labelsep = ccwd, belowskip = 0pt,aboveskip = 10pt } -\captionsetup[table]{font += tabfont} -\captionsetup[figure]{font += figfont} -\captionsetup[lstlisting]{singlelinecheck = false,font += lstfont} +\captionsetup[table]{font += tablefont} +\captionsetup[figure]{font += figurefont} +\captionsetup[lstlisting]{singlelinecheck = false,font += listingfont} \captionsetup[subfigure] { labelformat = parens, - font += figfont, + font += figurefont, belowskip = 2pt,aboveskip = 6pt } \captionsetup[figure][bi-second]{name = Figure} @@ -679,28 +681,28 @@ } } \AtBeginEnvironment{tabularx} - {\exp_args:Nx \linespread{\fp_use:N \l__tab_spread_fp}\selectfont\ignorespaces} + {\exp_args:Nx \linespread{\fp_use:N \l__table_spread_fp}\selectfont\ignorespaces} \AtBeginEnvironment{tabular} - {\exp_args:Nx \linespread{\fp_use:N \l__tab_spread_fp}\selectfont\ignorespaces} + {\exp_args:Nx \linespread{\fp_use:N \l__table_spread_fp}\selectfont\ignorespaces} \fp_new:N \l__line_spread_fp -\fp_new:N \l__tab_spread_fp +\fp_new:N \l__table_spread_fp \fp_new:N \l__math_spread_fp -\fp_new:N \l__cap_spread_fp -\fp_new:N \l__foot_spread_fp +\fp_new:N \l__caption_spread_fp +\fp_new:N \l__footnote_spread_fp \__ctex_define:nn {spread} { - linespread .fp_set:N = \l__line_spread_fp, - linespread .initial:n = 1.3, - tabspread .fp_set:N = \l__tab_spread_fp, - tabspread .initial:n = 1.05, - mathspread .fp_set:N = \l__math_spread_fp, - mathspread .initial:n = 1.05, - capspread .fp_set:N = \l__cap_spread_fp, - capspread .initial:n = 1, - fnspread .fp_set:N = \l__foot_spread_fp, - fnspread .initial:n = 1 + line .fp_set:N = \l__line_spread_fp, + line .initial:n = 1.3, + table .fp_set:N = \l__table_spread_fp, + table .initial:n = 1.05, + math .fp_set:N = \l__math_spread_fp, + math .initial:n = 1.05, + caption .fp_set:N = \l__caption_spread_fp, + caption .initial:n = 1, + footnote .fp_set:N = \l__footnote_spread_fp, + footnote .initial:n = 1 } \skip_set:Nn \parskip{0pt plus 2pt minus 1pt} @@ -933,7 +935,7 @@ left = 1.5pc,right = 1.5pc,top = 1pc,bottom = 0.5pc, boxsep = 5pt }, - exsty/.style = + exersty/.style = { enhanced,on~line, arc = 5pt, @@ -943,7 +945,7 @@ before~skip = 4ex,after~skip = 2.25ex }, breakable, - boxrule = .75pt + boxrule = \l__rule_width_dim } \ctex_at_end_preamble:n { @@ -965,15 +967,15 @@ \end{outlinelist} \end{tcolorbox} } -\NewDocumentEnvironment{exercise}{sO{black}O{1.}O{\c__name_exercise_tl}} +\NewDocumentEnvironment{exercise}{sO{LightYellow}O{1.}O{\c__name_exercise_tl}} { \begin{center} \bool_if:NTF \l__thmbox_bool { \tcbox[ - exsty, - colback = #2!8!white,colframe = #2!50!black, - drop~fuzzy~shadow = #2!50!white, + exersty, + colback = #2,colframe = black, + drop~fuzzy~shadow = #2, phantom = \IfBooleanF{#1} { @@ -999,10 +1001,10 @@ }{ \end{compactenum} } -\DeclareTColorBox{mybox}{so} +\DeclareTColorBox{mybox}{soO{MintCream}} { enhanced~jigsaw,pad~at~break* = 3pt, - IfBooleanF = {#1}{opacityback = 0,colframe = ctex@emph}, + IfBooleanTF = {#1}{colback = #3}{opacityback = 0,colframe = ctex@emph}, coltitle = black,opacitybacktitle = 0, fonttitle = \sffamily, left = .2pc,right = .2pc,top = .5pc,bottom = .5pc,middle= .5pc, @@ -1019,7 +1021,7 @@ { nobeforeafter,tcbox~raise~base, top = 2pt,bottom = 2.5pt,left = 2pt,right = 2pt, - boxsep = 0pt,arc = 1pt, + boxsep = 0pt,boxrule = 0.75pt,arc = 1pt, colback = #1!15!white,#2 }{#3} @@ -1119,13 +1121,13 @@ \skip_set:Nn \footnotemargin{0.5\ccwd} \group_begin: \footnotesize - \exp_args:Nx \linespread{\fp_use:N \l__foot_spread_fp}\selectfont + \exp_args:Nx \linespread{\fp_use:N \l__footnote_spread_fp}\selectfont \skip_gset:Nn \footnotesep{\ht\strutbox} \group_end: \cs_gset:Npn \hangfootparskip{0ex} \cs_gset:Npn \footnoterule { - \color{ctex@frame}\hrule width 0.35\columnwidth height 0.75pt + \color{ctex@frame}\hrule width 0.35\columnwidth height \l__rule_width_dim \vspace*{2.6pt}\color{black} } \bool_if:NT \l__lang_chinese_bool @@ -1145,13 +1147,13 @@ } \__patch_cmd:Nnn \@footnotetext {\reset@font} - {\def\baselinestretch{\fp_use:N \l__foot_spread_fp}\l__foot_font_tl} + {\def\baselinestretch{\fp_use:N \l__footnote_spread_fp}\l__footnote_font_tl} \__patch_cmd:Nnn \@mpfootnotetext {\reset@font} - {\def\baselinestretch{\fp_use:N \l__foot_spread_fp}\l__foot_font_tl} + {\def\baselinestretch{\fp_use:N \l__footnote_spread_fp}\l__footnote_font_tl} \__patch_cmd:Nnn \@makefnmark - {\normalfont}{\l__foot_font_tl} -\cs_gset:Npn \marginfont{\l__margin_font_tl} + {\normalfont}{\l__footnote_font_tl} +\cs_gset:Npn \marginfont{\l__marginpar_font_tl} \lstdefinestyle{mystyle} { @@ -1162,10 +1164,11 @@ \ttfamily\lst@ifdisplaystyle\small\else\color{ctex@verb}\fi, framexleftmargin = 0pt, framexrightmargin = 0pt, - xleftmargin = 0pt, - xrightmargin = 0pt, + xleftmargin = 3pt, + xrightmargin = 3pt, + numbersep = 10pt, framesep = 3pt, - frame = lines, + frame = single, rulecolor = \color{ctex@frame}, commentstyle = \color{gray}, emphstyle = \color{ctex@emph}, @@ -1189,11 +1192,11 @@ aboveskip = 1.5ex plus .2ex minus .1ex, belowskip = 0.55ex plus .2ex minus .1ex, keepspaces = true, - framerule = 0.75pt, + framerule = \l__rule_width_dim, columns = flexible } \lstloadlanguages{C,C++,Java,Python,Matlab} -\AtBeginEnvironment{verbatim}{\microtypesetup{activate=false}} +\AtBeginEnvironment{verbatim}{\microtypesetup{activate = false}} \clist_new:N \l__hyperref_clist \cs_new_protected:Npn \__put_hyperref:n #1 @@ -1275,7 +1278,7 @@ {none, 000000,000000,000000}, {seaside, 1381b2,004986,a40000}, {energy, f39800,00a0e9,893895}, - {cyberpunk, 005982,eb6877,a4005b} + {cyberpunk, 601986,eb6877,a4005b} } \__themecolor_set:n, color .initial:n = none |