summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/joinbox
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-08-21 20:20:20 +0000
committerKarl Berry <karl@freefriends.org>2023-08-21 20:20:20 +0000
commita603b064f75b6ae004c4bf8906425b4406587683 (patch)
tree5d9be6fa72c2b895a061bb745e974d22edc790a5 /Master/texmf-dist/tex/latex/joinbox
parent77118abb24751e78b075b9b725e6d13f224b6dec (diff)
joinbox (21aug23)
git-svn-id: svn://tug.org/texlive/trunk@68003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/joinbox')
-rw-r--r--Master/texmf-dist/tex/latex/joinbox/joinbox.sty56
1 files changed, 53 insertions, 3 deletions
diff --git a/Master/texmf-dist/tex/latex/joinbox/joinbox.sty b/Master/texmf-dist/tex/latex/joinbox/joinbox.sty
index a3117aa5ac8..06077c23f12 100644
--- a/Master/texmf-dist/tex/latex/joinbox/joinbox.sty
+++ b/Master/texmf-dist/tex/latex/joinbox/joinbox.sty
@@ -7,7 +7,7 @@
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}
-\ProvidesExplPackage{joinbox}{2023-08-13}{v1.0.1}
+\ProvidesExplPackage{joinbox}{2023-08-21}{v1.0.2}
{Join figures to same height or width with LaTeX3}
\RequirePackage{xparse}
@@ -417,6 +417,31 @@
}
}
}
+
+ % 按指定输出高度缩放输出盒子
+ \bool_if:nT { \l__joinbox_out_scale_bool && \l__joinbox_only_first_bool }
+ {
+ \bool_if:NTF \l__joinbox_vertical_bool
+ {
+ \coffin_scale:Nnn \l__joinbox_tmpa_coffin
+ {
+ \dim_ratio:nn { \l__joinbox_out_length_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ }
+ {
+ \dim_ratio:nn { \l__joinbox_out_length_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ }
+ }
+ {
+ \coffin_scale:Nnn \l__joinbox_tmpa_coffin
+ {
+ \dim_ratio:nn { \l__joinbox_out_length_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ }
+ {
+ \dim_ratio:nn { \l__joinbox_out_length_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ }
+ }
+ }
+
\__joinbox_typeout_coffin:N \l__joinbox_tmpa_coffin
}
@@ -458,6 +483,31 @@
}
}
}
+
+ % 按指定输出高度缩放输出盒子
+ \bool_if:nT { \l__joinbox_out_scale_bool && \l__joinbox_only_first_bool }
+ {
+ \bool_if:NTF \l__joinbox_vertical_bool
+ {
+ \coffin_scale:Nnn \l__joinbox_tmpa_coffin
+ {
+ \dim_ratio:nn { \l__joinbox_out_length_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ }
+ {
+ \dim_ratio:nn { \l__joinbox_out_length_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+ }
+ }
+ {
+ \coffin_scale:Nnn \l__joinbox_tmpa_coffin
+ {
+ \dim_ratio:nn { \l__joinbox_out_length_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ }
+ {
+ \dim_ratio:nn { \l__joinbox_out_length_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+ }
+ }
+ }
+
\__joinbox_typeout_coffin:N \l__joinbox_tmpa_coffin
}
@@ -467,7 +517,7 @@
% #2---可选参数,用key-value选项指定拼接参数
% #3---第1个盒子的内容
% #4---第2个盒子的内容
-\NewDocumentCommand{\joinbox}{ s O{} m m}
+\NewDocumentCommand{\joinbox}{ s O{} +m +m}
{
\IfBooleanTF{#1}
{
@@ -510,7 +560,7 @@
% #1---是否为*命令,如有*则采用水平拼接,无*则采用垂直拼接
% #2---可选参数,用key-value选项指定拼接参数
% #3---必选参数,用逗号分隔的,需要拼接内容(各个内容应该置于大括号内)
-\NewDocumentCommand{\joinboxes}{ s O{} m}
+\NewDocumentCommand{\joinboxes}{ s O{} +m}
{
\IfBooleanTF{#1}
{