summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-12-06 22:18:55 +0000
committerKarl Berry <karl@freefriends.org>2020-12-06 22:18:55 +0000
commit11d73f40315808cfcaa8823606fa692da7fc3137 (patch)
treeefd5ab85d98a95ebad100e5718c37f715d27c8db /Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
parentc5191e7839a682324ae912126031442c286d27a4 (diff)
l3kernel (6dec20)
git-svn-id: svn://tug.org/texlive/trunk@57085 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx59
1 files changed, 33 insertions, 26 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index f4d6810d9a5..220fe5564a8 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2020-12-03}
+% \date{Released 2020-12-05}
%
% \maketitle
%
@@ -715,10 +715,13 @@
}
\cs_new_protected:Npx \@@_set_vertical_aux:
{
- \cs_if_exist:NT \linewidth
- { \dim_set_eq:NN \linewidth \tex_hsize:D }
- \cs_if_exist:NT \columnwidth
- { \dim_set_eq:NN \columnwidth \tex_hsize:D }
+ \bool_lazy_and:nnT
+ { \cs_if_exist_p:N \fmtname }
+ { \str_if_eq_p:Vn \fmtname { LaTeX2e } }
+ {
+ \dim_set_eq:NN \exp_not:N \linewidth \tex_hsize:D
+ \dim_set_eq:NN \exp_not:N \columnwidth \tex_hsize:D
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2235,35 +2238,40 @@
% Stores the settings used to print coffin data: this keeps things
% flexible.
% \begin{macrocode}
-\tl_new:N \l_@@_display_font_tl
-\cs_if_exist:NTF \AtBeginDocument
- { \AtBeginDocument }
- { \use:n }
+\tl_new:N \l_@@_display_font_tl
+\bool_lazy_and:nnT
+ { \cs_if_exist_p:N \fmtname }
+ { \str_if_eq_p:Vn \fmtname { LaTeX2e } }
{
- \__kernel_tl_set:Nx \l_@@_display_font_tl
- {
- \cs_if_exist:NT \sffamily { \exp_not:N \sffamily }
- \cs_if_exist:NT \tiny { \exp_not:N \tiny }
- }
+ \tl_set:Nn \l_@@_display_font_tl
+ { \sffamily \tiny }
}
% \end{macrocode}
% \end{variable}
%
% \begin{macro}{\@@_color:n}
% Calls \tn{color}, and otherwise does nothing if \tn{color} is not defined.
+% As this is relatively rarely used, we have it self-define rather than delay
+% using a hook.
% \begin{macrocode}
-\cs_if_exist:NTF \AtBeginDocument
- { \AtBeginDocument }
- { \use:n }
+\cs_new_protected:Npn \@@_color:n #1 {#1}
+\bool_lazy_and:nnT
+ { \cs_if_exist_p:N \fmtname }
+ { \str_if_eq_p:Vn \fmtname { LaTeX2e } }
{
- \cs_new_protected:Npx \@@_color:n #1
+ \cs_gset_protected:Npn \@@_color:n
{
- \cs_if_exist:NTF \color_select:n
- { \color_select:n {#1} }
+ \cs_gset_protected:Npx \@@_color:n
{
- \cs_if_exist:NT \color
- { \exp_not:N \color {#1} }
+ \cs_if_exist:NTF \color_select:n
+ { \color_select:n }
+ {
+ \cs_if_exist:NTF \color
+ { \exp_not:N \color }
+ { \exp_not:N \use_none:n }
+ }
}
+ \@@_color:n
}
}
% \end{macrocode}
@@ -2272,11 +2280,10 @@
% \begin{macro}{\@@_rule:nn}
% Abstract out creation of rules here until there is a higher-level interface.
% \begin{macrocode}
-\cs_new_protected:Npx \@@_rule:nn #1#2
+\cs_new_protected:Npn \@@_rule:nn #1#2
{
- \cs_if_exist:NTF \rule
- { \exp_not:N \rule {#1} {#2} }
- { \hbox:n { \tex_vrule:D width #1 height #2 \scan_stop: } }
+ \mode_leave_vertical:
+ \hbox:n { \tex_vrule:D width #1 height #2 \scan_stop: }
}
% \end{macrocode}
% \end{macro}