summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/multicolrule
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-10-04 20:48:54 +0000
committerKarl Berry <karl@freefriends.org>2019-10-04 20:48:54 +0000
commit4ae4c0f7b2ba8723d6be3e162b2b500104b60d69 (patch)
tree4edda2232ea00d2d6f55e63f834af737fb0f36c7 /Master/texmf-dist/tex/latex/multicolrule
parent20c7572c2469f784d294c30466c66479e7d8ac29 (diff)
multicolrule (4oct19)
git-svn-id: svn://tug.org/texlive/trunk@52283 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/multicolrule')
-rw-r--r--Master/texmf-dist/tex/latex/multicolrule/multicolrule.sty51
1 files changed, 39 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/latex/multicolrule/multicolrule.sty b/Master/texmf-dist/tex/latex/multicolrule/multicolrule.sty
index 93bcc3950f5..908796f96ff 100644
--- a/Master/texmf-dist/tex/latex/multicolrule/multicolrule.sty
+++ b/Master/texmf-dist/tex/latex/multicolrule/multicolrule.sty
@@ -15,10 +15,7 @@
%%
\RequirePackage{expl3}
\RequirePackage{xparse}
- % |\DeclareMCRulePattern| \marg{name} \marg{key-value list}
- % \end{syntax}
-
-\ProvidesExplPackage {multicolrule} {2019/01/01} {1.2}
+\ProvidesExplPackage {multicolrule} {2019/10/01} {1.3}
{Decorative vertical rules between columns}
\RequirePackage{l3keys2e}
\RequirePackage{xpatch}
@@ -63,6 +60,7 @@
\ProcessKeysOptions{mcrule-opts}
\cs_new:Npn \__mcrule_column_height: {}
\cs_new:Npn \__mcrule_column_depth: {}
+\cs_new:Npn \__mcrule_column_overflow: {0pt}
\cs_new_protected:Npn \__mcrule_patch_mcol_output:N #1
{
\xpatchcmd{#1} {\columnseprulecolor\vrule\@width\columnseprule}
@@ -85,7 +83,6 @@
\cs_gset:Npn \__mcrule_column_height: {\box_ht:N \@outputbox}
\cs_gset:Npn \__mcrule_column_depth: {\box_dp:N \@outputbox}
\__mcrule_patch_twocol_output:N \@outputdblcol
- \__mcrule_patch_twocol_output:N \@outputdblcol
\AfterPackage!{bidi}
{
\__mcrule_patch_twocol_output:N \RTL@outputdblcol
@@ -96,8 +93,18 @@
\RequirePackage{multicol}
\__mcrule_patch_mcol_output:N \LR@column@boxes
\__mcrule_patch_mcol_output:N \RL@column@boxes
- \cs_gset:Npn \__mcrule_column_height: {\box_ht:N \mult@rightbox}
- \cs_gset:Npn \__mcrule_column_depth: {\dimen\tw@}
+ \cs_gset:Npn \__mcrule_column_height:
+ {
+ \box_ht:N \mult@rightbox
+ }
+ \cs_gset:Npn \__mcrule_column_depth:
+ {
+ \dim_max:nn {\dimen\tw@}{\box_dp:N \mult@rightbox}
+ }
+\cs_gset:Npn \__mcrule_column_overflow:
+{
+ \dim_max:nn {\box_ht:N \mult@nat@firstbox - \box_ht:N \mult@rightbox}{0pt}
+}
\LRmulticolcolumns
\AfterPackage!{bidi}
{
@@ -124,7 +131,8 @@
{
\int_gset:Nn \g__mcrule_pattern_count_int {\c_one_int}
}
- \tl_set:Nx \l_tmpa_tl {\seq_item:Nn \l__mcrule_pattern_list_seq {\g__mcrule_pattern_count_int} }
+ \tl_set:Nx \l_tmpa_tl {\seq_item:Nn \l__mcrule_pattern_list_seq
+ {\g__mcrule_pattern_count_int} }
\tl_if_blank:VF \l_tmpa_tl
{
\__mcrule_set_pattern:V \l_tmpa_tl
@@ -151,11 +159,12 @@
\cs_new:Npn \__mcrule_column_total_height:
{
\dim_eval:n {\__mcrule_column_height: + \__mcrule_column_depth: +
- \__mcrule_extend_column_top: + \__mcrule_extend_column_bottom:}
+ \__mcrule_extend_column_top: + \__mcrule_column_overflow: + \__mcrule_extend_column_bottom:}
}
\cs_new:Npn \__mcrule_column_total_depth:
{
- \dim_eval:n {\__mcrule_column_depth: + \__mcrule_extend_column_bottom:}
+ \dim_eval:n {\__mcrule_column_depth: + \__mcrule_column_overflow: +
+ \__mcrule_extend_column_bottom:}
}
\cs_new:Npn \__mcrule_extend_column_top:
{
@@ -188,7 +197,9 @@
\vbox_to_ht:nn {\__mcrule_column_total_height:}
{
\tex_vfill:D
- \tex_kern:D #2 \hbox:n{#1} \tex_kern:D #3
+ \tex_kern:D \dim_eval:n {#2} \exp_stop_f:
+ \hbox:n{#1}
+ \tex_kern:D \dim_eval:n {#3} \exp_stop_f:
\tex_vfill:D
}
}
@@ -201,7 +212,9 @@
{
\tex_cleaders:D \vbox:n
{
- \tex_kern:D #2 \hbox:n{#1} \tex_kern:D #3
+ \tex_kern:D \dim_eval:n {#2} \exp_stop_f:
+ \hbox:n{#1}
+ \tex_kern:D \dim_eval:n {#3} \exp_stop_f:
}
\tex_vfill:D
}
@@ -221,6 +234,10 @@
{
\rule[-\__mcrule_column_total_depth:]{\columnseprule}{\__mcrule_column_total_height:}
}
+\cs_new:Npn \__mcrule_strut:
+{
+ \rule[-\__mcrule_column_total_depth:]{0pt}{\__mcrule_column_total_height:}
+}
\bool_if:NTF \g__mcrule_use_tikz_bool
{
\ExplSyntaxOff
@@ -306,11 +323,21 @@
extend-fill .bool_set:N = \l__mcrule_extend_fill_bool,
extend-fill .default:n = true,
extend-reserve .dim_set:N = \l__mcrule_extend_reserve_dim,
+ expand .code:n = {
+ \dim_set:Nn \l__mcrule_extend_bot_dim {#1}
+ \dim_set:Nn \l__mcrule_extend_top_dim {#1}
+ },
+ shift .code:n = {
+ \dim_set:Nn \l__mcrule_extend_bot_dim {#1}
+ \dim_set:Nn \l__mcrule_extend_top_dim {\fp_to_dim:n {-1 * \l__mcrule_extend_bot_dim}}
+ },
line-style .choice:,
line-style / default .code:n = \cs_set:Npn \mcrule_divider:
{\vrule\@width\columnseprule},
line-style / solid .code:n = \cs_set:Npn \mcrule_divider:
{\__mcrule_solid_line:},
+ line-style / strut .code:n = \cs_set:Npn \mcrule_divider:
+ {\__mcrule_strut:},
line-style / dots .code:n = \cs_set:Npn \mcrule_divider:
{\__mcrule_tile_pattern:nnn {.}{1pt}{1pt}},
line-style / dense-dots .code:n = \cs_set:Npn \mcrule_divider: