summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx')
-rw-r--r--Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx84
1 files changed, 52 insertions, 32 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx b/Master/texmf-dist/source/latex/l3kernel/l3coffins.dtx
index 8c9f29e93b1..f828834daf4 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-07-17}
+% \date{Released 2020-08-07}
%
% \maketitle
%
@@ -408,7 +408,7 @@
% \section{\pkg{l3coffins} Implementation}
%
% \begin{macrocode}
-%<*initex|package>
+%<*package>
% \end{macrocode}
%
% \begin{macrocode}
@@ -667,6 +667,7 @@
% \vcoffin_gset:Nnn, \vcoffin_gset:cnn
% }
% \begin{macro}{\@@_set_vertical:NnnNN}
+% \begin{macro}{\@@_set_vertical_aux:}
% Setting vertical coffins is more complex. First, the material is
% typeset with a given width. The default handles and poles are set as
% for a horizontal coffin, before finding the top baseline using a
@@ -694,10 +695,7 @@
#4 #1
{
\dim_set:Nn \tex_hsize:D {#2}
-%<*package>
- \dim_set_eq:NN \linewidth \tex_hsize:D
- \dim_set_eq:NN \columnwidth \tex_hsize:D
-%</package>
+ \@@_set_vertical_aux:
#3
}
#5 #1
@@ -715,9 +713,17 @@
\box_clear:N \l_@@_internal_box
}
}
+\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 }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}
% {\hcoffin_set:Nw, \hcoffin_set:cw, \hcoffin_gset:Nw, \hcoffin_gset:cw}
@@ -783,10 +789,7 @@
{
#3 #1
\dim_set:Nn \tex_hsize:D {#2}
-%<*package>
- \dim_set_eq:NN \linewidth \tex_hsize:D
- \dim_set_eq:NN \columnwidth \tex_hsize:D
-%</package>
+ \@@_set_vertical_aux:
\cs_set_protected:Npn #4
{
#5
@@ -2233,17 +2236,48 @@
% flexible.
% \begin{macrocode}
\tl_new:N \l_@@_display_font_tl
-%<*package>
-\tl_set:Nn \l_@@_display_font_tl { \sffamily \tiny }
-%</package>
+\cs_if_exist:NTF \AtBeginDocument
+ { \AtBeginDocument }
+ { \use:n }
+ {
+ \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 }
+ }
+ }
% \end{macrocode}
% \end{variable}
%
% \begin{macro}{\@@_color:n}
% Calls \tn{color}, and otherwise does nothing if \tn{color} is not defined.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_color:n #1
- { \cs_if_exist:NT \color { \color {#1} } }
+\cs_if_exist:NTF \AtBeginDocument
+ { \AtBeginDocument }
+ { \use:n }
+ {
+ \cs_new_protected:Npx \@@_color:n #1
+ {
+ \cs_if_exist:NTF \color_select:n
+ { \color_select:n {#1} }
+ {
+ \cs_if_exist:NT \color
+ { \exp_not:N \color {#1} }
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \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_if_exist:NTF \rule
+ { \exp_not:N \rule {#1} {#2} }
+ { \hbox:n { \tex_vrule:D width #1 height #2 \scan_stop: } }
+ }
% \end{macrocode}
% \end{macro}
%
@@ -2259,21 +2293,14 @@
{
\hcoffin_set:Nn \l_@@_display_pole_coffin
{
-%<*initex>
- \hbox:n { \tex_vrule:D width 1pt height 1pt \scan_stop: }
-%</initex>
-%<*package>
\@@_color:n {#4}
- \rule { 1pt } { 1pt }
-%</package>
+ \@@_rule:nn { 1pt } { 1pt }
}
\@@_attach_mark:NnnNnnnn #1 {#2} {#3}
\l_@@_display_pole_coffin { hc } { vc } { 0pt } { 0pt }
\hcoffin_set:Nn \l_@@_display_coord_coffin
{
-%<*package>
\@@_color:n {#4}
-%</package>
\l_@@_display_font_tl
( \tl_to_str:n { #2 , #3 } )
}
@@ -2325,13 +2352,8 @@
{
\hcoffin_set:Nn \l_@@_display_pole_coffin
{
-%<*initex>
- \hbox:n { \tex_vrule:D width 1pt height 1pt \scan_stop: }
-%</initex>
-%<*package>
\@@_color:n {#2}
- \rule { 1pt } { 1pt }
-%</package>
+ \@@_rule:nn { 1pt } { 1pt }
}
\prop_set_eq:Nc \l_@@_display_poles_prop
{ coffin ~ \@@_to_value:N #1 ~ poles }
@@ -2371,9 +2393,7 @@
{ 0pt } { 0pt }
\hcoffin_set:Nn \l_@@_display_coord_coffin
{
-%<*package>
\@@_color:n {#6}
-%</package>
\l_@@_display_font_tl
( \tl_to_str:n { #1 , ##1 } )
}
@@ -2511,7 +2531,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-%</initex|package>
+%</package>
% \end{macrocode}
%
% \end{implementation}