texlive[67902] Master: joinbox (12aug23)

commits+karl at tug.org commits+karl at tug.org
Sat Aug 12 22:29:33 CEST 2023


Revision: 67902
          http://tug.org/svn/texlive?view=revision&revision=67902
Author:   karl
Date:     2023-08-12 22:29:33 +0200 (Sat, 12 Aug 2023)
Log Message:
-----------
joinbox (12aug23)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/joinbox/
    trunk/Master/texmf-dist/doc/latex/joinbox/README.md
    trunk/Master/texmf-dist/doc/latex/joinbox/build.sh
    trunk/Master/texmf-dist/doc/latex/joinbox/expl3.png
    trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf
    trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.tex
    trunk/Master/texmf-dist/doc/latex/joinbox/latexframe.png
    trunk/Master/texmf-dist/doc/latex/joinbox/tl-lion.pdf
    trunk/Master/texmf-dist/tex/latex/joinbox/
    trunk/Master/texmf-dist/tex/latex/joinbox/joinbox.sty
    trunk/Master/tlpkg/tlpsrc/joinbox.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/joinbox/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/joinbox/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/joinbox/README.md	2023-08-12 20:29:33 UTC (rev 67902)
@@ -0,0 +1,57 @@
+Boxes joinning package based on l3coffins developed with Expl3.
+=======
+
+`joinbox` is a box joinning package based on l3coffins developed with expl3, which provides the `\joinbox` and `\joinfigs` macros for vertical or horizontal joinning of boxes. Different types of joinning can be set up with the options or `\joinset` macro.
+
+Boxes can be joined vertically or horizontally. When using vertical joinning, all boxes to be joined will keep same width, while when using horizontal joined, all boxes to be joined will keep same height.
+
+The `\joinbox` and `\joinfigs` macros without star are used for vertical joinning, while the `\joinbox*` and `\joinfigs*` with star are used for horizontal joinning.
+
+You can read the manual (in Chinese/English) for more details and examples.
+
+Contributing
+------------
+
+1. gitee repository:
+    (1). repository: [joinbox](https://gitee.com/nwafu_nan/joinbox)
+    (2). Issues and pull requests are welcome. [issue](https://gitee.com/nwafu_nan/joinbox/issues) or [pull request](https://gitee.com/nwafu_nan/joinbox/pulls).
+
+joinbox 盒子拼接宏包
+=======
+
+`joinbox` 是一个基于`l3coffins`用`expl3`开发的盒子拼接宏包,它用于实现盒子的垂直或水平拼接。垂直拼接会以各对象等宽的方式拼接,而水平拼接会以各对象等高的方式拼接。
+
+该宏包提供了`\joinbox`和`\joinfigs`两个命令。其中,`\joinbox`用于拼接两个独立对象,`\joinfigs`用于拼接多个图像。这两个命令的不带`*`版本用于垂直拼接,而带`*`的版本用于水平拼接。同时,该宏包还提供了`\joinset`命令用于对拼接方式进行设置。
+
+可以通过阅读宏包手册(中文/英文)以也解该宏包更多的使用细节和使用样例。
+
+###  参与贡献
+---------------------
+
+1. gitee仓库:
+    (1). 仓库地址: [joinbox](https://gitee.com/nwafu_nan/joinbox)
+    (2). Issues and PR: [issue](https://gitee.com/nwafu_nan/joinbox/issues) or [pull request](https://gitee.com/nwafu_nan/joinbox/pulls).
+
+Copyright and Licence
+---------------------
+
+    Copyright (C) 2020-2023 by Nan Geng <nangeng at nwafu.edu.cn>
+    ----------------------------------------------------------------------
+
+    This work may be distributed and/or modified under the
+    conditions of the LaTeX Project Public License, either
+    version 1.3c of this license or (at your option) any later
+    version. This version of this license is in
+       http://www.latex-project.org/lppl/lppl-1-3c.txt
+    and the latest version of this license is in
+       http://www.latex-project.org/lppl.txt
+    and version 1.3 or later is part of all distributions of
+    LaTeX version 2005/12/01 or later.
+
+    This work has the LPPL maintenance status "maintained".
+
+    The Current Maintainer of this work is Nan Geng.
+    
+    This package consists of joinbox.sty, joinbox.tex and README.md(this file),
+                 and the derived files joinbox.pdf.
+


Property changes on: trunk/Master/texmf-dist/doc/latex/joinbox/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/joinbox/build.sh
===================================================================
--- trunk/Master/texmf-dist/doc/latex/joinbox/build.sh	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/joinbox/build.sh	2023-08-12 20:29:33 UTC (rev 67902)
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+xelatex joinbox.tex &&\
+makeindex -s gind.ist -o joinbox.ind joinbox.idx &&\
+makeindex -s gglo.ist -o joinbox.gls joinbox.glo &&\
+xelatex joinbox.tex &&\
+xelatex joinbox.tex &&\
+xelatex joinbox.tex


Property changes on: trunk/Master/texmf-dist/doc/latex/joinbox/build.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/joinbox/expl3.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/joinbox/expl3.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/joinbox/expl3.png	2023-08-12 20:27:34 UTC (rev 67901)
+++ trunk/Master/texmf-dist/doc/latex/joinbox/expl3.png	2023-08-12 20:29:33 UTC (rev 67902)

Property changes on: trunk/Master/texmf-dist/doc/latex/joinbox/expl3.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf	2023-08-12 20:27:34 UTC (rev 67901)
+++ trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf	2023-08-12 20:29:33 UTC (rev 67902)

Property changes on: trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.tex	2023-08-12 20:29:33 UTC (rev 67902)
@@ -0,0 +1,516 @@
+\documentclass[full]{l3doc}
+\usepackage[scheme=plain]{ctex}
+\usepackage{enumitem}
+\usepackage{indentfirst}
+\usepackage{titling}
+\usepackage{geometry}
+\usepackage{fancyvrb-ex}
+\usepackage{joinbox}
+
+\IndexPrologue
+  {
+    \section*{Index}
+    \markboth{Index}{Index}
+    \addcontentsline{toc}{section}{Index}
+    The~italic~numbers~denote~the~pages~where~the~
+    corresponding~entry~is~described,~
+    numbers~underlined~point~to~the~definition,~
+    all~others~indicate~the~places~where~it~is~used.
+  }
+
+\newcommand\tikzmark[1]{\tikz \coordinate[overlay, remember picture] (#1);}
+
+\geometry{
+  left=4.5cm,
+  right=2cm,
+  top=2cm,
+  bottom=2cm,
+}
+\hypersetup {
+  CJKbookmarks,
+  bookmarksopen,
+  bookmarksopenlevel=3,
+  pdfstartview=FitH,
+  pdfinfo = {
+   Title = The package joinbox ,
+   Subject = A LaTeX3 package ,
+   Author = Geng Nan
+ }
+}
+
+\DoNotIndex{\begin, \end}
+\setlength{\parskip}{\medskipamount}
+\DeclareDocumentEnvironment { noteen } { +b } {
+  \par\textbf{\textsf{NOTE:~}}#1\par
+} {}
+\DeclareDocumentEnvironment { notezh } { +b } {
+  \par\textbf{\textsf{注意:~}}#1\par
+} {}
+
+\AtEndDocument{
+  \newgeometry{
+    left=2cm,
+    right=2cm,
+    top=2cm,
+    bottom=2cm
+  }
+  \PrintIndex
+}
+
+\ExplSyntaxOn
+\dim_new:N \l__my_syntax_dim
+\box_new:N \g__my_syntax_box
+\NewDocumentEnvironment { Syntax } { s }
+  {
+    \dim_set:Nn \l__my_syntax_dim
+      { \textwidth }
+    \hbox_gset:Nw \g__my_syntax_box
+      \small \ttfamily
+      \begin{minipage}[t]{\l__my_syntax_dim}
+        \raggedright\obeyspaces\obeylines
+  }
+  {
+      \end{minipage}
+    \hbox_gset_end:
+    \IfValueF { #1 } { \smallskip }
+    \box_use_drop:N \g__my_syntax_box
+    \smallskip
+  }
+
+\DeclareDocumentEnvironment { Description } { o +b } {
+  \hbox_set:Nn \l_tmpa_box { #1 }
+  \dim_set:Nn \l_tmpa_dim { \box_wd:N \l_tmpa_box }
+  \begin{itemize}[labelwidth=\l_tmpa_dim, align=left]
+    #2
+  \end{itemize}
+} {  }
+
+\keys_define:nn { joinbox/doc } {
+  opt  .tl_set:N = \l_opt_tl,
+  desc .tl_set:N = \l_desc_tl,
+  init .tl_set:N = \l_init_tl,
+  init .initial:n = init-none,
+}
+
+\box_new:N \l__option_box
+\NewDocumentEnvironment { option } { m +b } {
+  \keys_set:nn { joinbox/doc } { #1 }
+  \hbox_set:Nw \l__option_box
+    \small \ttfamily
+    \begin{minipage}[t]{\textwidth}
+      \obeyspaces\obeylines
+      \textcolor{red}{
+        \l_opt_tl
+        \exp_args:Nx\SpecialOptionIndex{\l_opt_tl}
+      }
+      {~}\l_desc_tl
+      \hfill(
+      \tl_if_eq:NnTF \l_init_tl { init-none } { no~value }
+        { initially~\texttt{\l_init_tl} }
+      )
+    \end{minipage}
+  \hbox_gset_end:
+  \box_use_drop:N \l__option_box
+  #2
+  \medskip
+} {  }
+
+\DeclareDocumentCommand \opt { O{} m }
+  { \__codedoc_cmd:no {#1} { #2 } }
+\ExplSyntaxOff
+
+\def\vers{\texttt{v1.0.0}
+\thanks{\url{https://gitee.com/nwafu_nan/joinbox}}
+}
+
+\begin{document}
+\title{
+  \pkg{joinbox}盒子拼接宏包
+  \rlap{\makebox[4cm][r]{
+    \normalsize $\Longrightarrow$ \color{red}
+    \protect\hyperlink{en}{English Version}
+    \protect\hypertarget{zh}{}
+  }}
+}
+\author{\textit{耿楠} \texttt{<nangeng at nwafu.edu.cn>}}
+\date{\the\year 年\the\month 月\the\day 日\qquad \vers
+}
+\maketitle
+
+{\small
+\tableofcontents
+}
+\newpage
+
+\begin{documentation}
+
+\section{引言}
+
+\pkg{joinbox}是一个基于\pkg{l3coffins}用\pkg{expl3}开发的
+盒子拼接宏包,它用于实现盒子的垂直或水平拼接。垂直拼接
+会以各对象等宽的方式拼接,而水平拼接会以各对象等高的方式
+拼接。
+
+该宏包提供了\tn{joinbox}和\tn{joinfigs}两个命令。其中,
+\tn{joinbox}用于拼接两个独立对象,\tn{joinfigs}用于拼接
+多个图像。这两个命令的不带*(星号)版本用于垂直拼接,而带
+*(星号)的版本用于水平拼接。
+同时,该宏包还提供了\tn{joinset}命令用于对拼接方式进行设置。
+
+\section{用户接口}
+
+\subsection{\cs{joinbox}拼接两个对象命令}
+
+\begin{function}{\joinbox,\joinbox*}
+  \begin{syntax}
+    \cs{joinbox} \oarg{拼接方式} \marg{对象1} \marg{对象2}
+    \cs{joinbox*} \oarg{拼接方式} \marg{对象1} \marg{对象2}
+  \end{syntax}
+
+\end{function}
+
+  用于拼接两个对象。 该命令需要用两个必选参数\marg{对象1}和
+  \marg{对象2}指定需要拼接的对象。拼接对象将被置于coffin中,
+  然后按需求进行拼接。
+
+  在可选项\oarg{拼接方式}中,可以通过key-value指定输出结果
+  基线位置、 输出尺寸(垂直拼接是输出宽度,水平拼接是输出高度)
+  和拼接间距。
+
+\subsection{\cs{joinfigs}拼接多个图像命令}
+
+\begin{function}{\joinfigs,\joinfigs*}
+  \begin{syntax}
+    \cs{joinfigs} \oarg{拼接方式} \marg{文件名称列表}
+    \cs{joinfigs*} \oarg{拼接方式} \marg{文件名称列表}
+  \end{syntax}
+
+\end{function}
+
+  用于拼接多个图像。该命令需要用一个必选参数\marg{文件名称列表},
+  用于指定需要拼接图像,文件名称中可以包含路径,不同文件名称之
+  间用英文逗号进行分隔,最少需要有1个图像文件名称。
+
+  在\oarg{拼接方式}可选项中,可以通过key-value指定结果基线位置、
+  输出尺寸(垂直拼接是输出宽度,水平拼接是输出调试)、拼接间距。
+
+\subsection{\cs{joinset}}
+\begin{function}{\joinset}
+  \begin{syntax}
+    \cs{joinset} \marg{拼接方式}
+  \end{syntax}
+
+\end{function}
+
+  用于通过key-value指定拼接结果中的基线位置、
+  输出尺寸(垂直拼接是输出宽度,水平拼接是输出调试)、拼接间距。
+
+\section{拼接方式}
+
+\begin{option}{ opt = baseline, desc = {= \meta{t,vc,H,b}}, init=b }
+  设置joinbox或joinfigs拼接结果的输出基线位置,目前支持:
+\end{option}\\
+\begin{Description}
+  \item |t|--- 盒子顶端水平线、
+  \item |vc|---盒子水平中心线、
+  \item |H|---盒子内容基线、
+  \item |b|---盒子底端水平线。
+\end{Description}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  默认基线\fbox{
+    \joinbox{\LaTeX 科技排版}
+            {\LaTeX~Typesetting}
+  }
+
+  baseline=t\fbox{
+    \joinbox[baseline=t]{\LaTeX 科技排版}
+                        {\LaTeX~Typesetting}
+  }
+\end{SideBySideExample}
+
+\bigskip
+
+\begin{option}{ opt = outlen, desc = {= \meta{dim}}, init=0pt }
+  设置joinbox或joinfigs拼接结果的输出尺寸,对于垂直拼接,设置
+  输出宽度,对于水平拼接,设置输出高度。
+
+  若指定的输出尺寸$\le 0$,则表示使用被拼接对象中的最小尺寸输出。
+\end{option}\\
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  输出宽度\fbox{
+    \joinbox[outlen=2cm]{\LaTeX 科技排版}
+                        {\LaTeX~Typesetting}
+  }
+
+  输出高度\fbox{
+    \joinbox*[outlen=0.2cm]{\LaTeX 科技排版}
+                        {\LaTeX~Typesetting}
+  }
+\end{SideBySideExample}
+
+\bigskip
+
+\begin{option}{ opt = sep, desc = {= \meta{dim}}, init=0pt }
+  设置拼接对象之间的间距。
+\end{option}\\
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  垂直间距\fbox{
+    \joinbox[sep=5pt]{\LaTeX 科技排版}
+                  {\LaTeX~Typesetting}
+  }
+
+  水平间距\fbox{
+    \joinbox*[outlen=0.2cm,sep=5pt]
+             {\LaTeX 科技排版}
+             {\LaTeX~Typesetting}
+  }
+\end{SideBySideExample}
+
+\section{嵌套拼接}
+
+可以嵌套使用\tn{joinbox}命令以实现复杂对象拼接。
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  \joinbox*[outlen=0.04\textheight,sep=-5pt]
+        {
+          \joinbox[sep=5pt]{\LaTeX 科技排版}
+            {\qquad\LaTeX~Typesetting\qquad}
+        }{
+          \includegraphics[scale=0.2]{expl3}
+        }
+\end{SideBySideExample}
+
+
+\section{图像拼接}
+
+\subsection{原始图像}
+
+\begin{center}
+  \includegraphics[scale=0.4]{latexframe}\quad
+  \includegraphics[scale=0.4]{tl-lion}\quad
+  \includegraphics[scale=0.4]{expl3}
+\end{center}
+
+\subsection{垂直拼接图像}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  \joinfigs[outlen=3cm, sep=5pt]
+           {latexframe, tl-lion, expl3}
+\end{SideBySideExample}
+
+\subsection{水平拼接图像}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  \joinfigs*[outlen=1.3cm, sep=5pt]
+           {latexframe, tl-lion, expl3}
+\end{SideBySideExample}
+
+\subsection{嵌套拼接图像}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  \joinbox*[outlen=0.20\textheight, sep=5pt]
+          {
+            \joinfigs[outlen=0.25\textwidth]
+              {latexframe, tl-lion, expl3}
+          }{
+            \joinfigs[outlen=0.25\textwidth]
+              {expl3, tl-lion, latexframe}
+          }
+\end{SideBySideExample}
+
+\title{
+  \pkg{joinbox} package for Joinning Boxs or Figures
+  \rlap{\makebox[2.5cm][r]{
+    \normalsize $\Longrightarrow$ \color{red}
+    \protect\hyperlink{zh}{中文版本}
+    \protect\hypertarget{en}{}
+  }}
+}
+\author{Nan Geng \texttt{<nangeng at nwafu.edu.cn>}}
+\date{\today\qquad \vers}
+\maketitle
+
+\section{Introduction}
+
+\pkg{joinbox} is a box joinning package based on l3coffins developed with expl3,
+which provides the \cs{joinbox} and \cs{joinfigs} macros for vertical or horizontal
+joinning of boxes. Different types of joinning can be set up with the options or
+\cs{joinset} macro.
+
+Boxes can be joined vertically or horizontally. When using vertical joinning, all
+boxes to be joined will keep same width, while when using horizontal joined, all
+boxes to be joined will keep same height.
+
+The \cs{joinbox} and \cs{joinfigs} macros without star are used for vertical joinning,
+while the \cs{joinbox*} and \cs{joinfigs*} with star are used for horizontal joinning.
+
+\section{Interfaces}
+
+\subsection{\cs{joinbox} for Two Contents Joinning }
+
+\begin{function}{\joinbox,\joinbox*}
+  \begin{syntax}
+    \cs{joinbox} \oarg{options} \marg{content1} \marg{content2}
+    \cs{joinbox*} \oarg{options} \marg{content1} \marg{content2}
+  \end{syntax}
+
+\end{function}
+
+  Used to join two contents. It requires two arguments \marg{content1} and
+  \marg{content2} to specify the objects to be joined. The contents will
+  be placed in the coffin respectively and then joined.
+
+  In the \oarg{options}, the typeout baseline, typeout size
+  (vertical joinning is width, horizontal joinning is height), and 
+  joinning seperate spacing can be specified with \textit{key-value}.
+
+\subsection{\cs{joinfigs} for Figure Sets Joinning}
+
+\begin{function}{\joinfigs,\joinfigs*}
+  \begin{syntax}
+    \cs{joinfigs} \oarg{options} \marg{namelist}
+    \cs{joinfigs*} \oarg{options} \marg{namelist}
+  \end{syntax}
+
+\end{function}
+
+  Used for joinning multiple images. This command requires a argument\marg{namelist}
+  to specify the image to be joined. The file name can include a path, 
+  and different file names should be separated by commas. 
+  At least one image file name is required.
+
+  In the \oarg{options}, the typeout baseline, typeout size
+  (vertical joinning is width, horizontal joinning is height), and 
+  joinning seperate spacing can be specified with \textit{key-value}.
+
+\subsection{\cs{joinset} for Settings}
+\begin{function}{\joinset}
+  \begin{syntax}
+    \cs{joinset} \marg{options}
+  \end{syntax}
+
+\end{function}
+
+  Used to set the typeout baseline, typeout size
+  (vertical joinning is width, horizontal joinning is height), and 
+  joinning seperate spacing with \textit{key-value}.
+
+\section{Options}
+
+\begin{option}{ opt = baseline, desc = {= \meta{t,vc,H,b}}, init=b }
+  Set typeout baseline, currently as follows:
+\end{option}\\
+\begin{Description}
+  \item |t|--- a pole running along the top edge of the bounding box of the coffin;
+  \item |vc|---a pole running horizontally through the centre of the coffin half-way between the
+bottom and top edges of the bounding box (i.e. the “vertical centre”);
+  \item |H|---a pole running along the baseline of the typeset material contained in the coffin;
+  \item |b|---a pole running along the bottom edge of the bounding box of the coffin.
+\end{Description}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  baseline=b\fbox{
+    \joinbox{Hello \LaTeX}
+            {\LaTeX~Typesetting}
+  }
+
+  baseline=t\fbox{
+    \joinbox[baseline=t]{Hello \LaTeX}
+                        {\LaTeX~Typesetting}
+  }
+\end{SideBySideExample}
+
+\bigskip
+
+\begin{option}{ opt = outlen, desc = {= \meta{dim}}, init=0pt }
+  Used to set typeout size, vertical joinning is width and horizontal joinning is height.
+
+  If $outlen\le 0$,then the typeout size is minimal size of all contents.
+\end{option}\\
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  width: \fbox{
+    \joinbox[outlen=2cm]{Hello \LaTeX}
+                        {\LaTeX~Typesetting}
+  }
+
+  height: \fbox{
+    \joinbox*[outlen=0.2cm]{Hello \LaTeX}
+                        {\LaTeX~Typesetting}
+  }
+\end{SideBySideExample}
+
+\bigskip
+
+\begin{option}{ opt = sep, desc = {= \meta{dim}}, init=0pt }
+  Used to set joinning seperate spacing.
+\end{option}\\
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  vertical sep: \fbox{
+    \joinbox[sep=5pt]{Hello \LaTeX}
+                  {\LaTeX~Typesetting}
+  }
+
+  horizontal sep: \fbox{
+    \joinbox*[outlen=0.2cm,sep=5pt]
+             {Hello \LaTeX}
+             {\LaTeX~Typesetting}
+  }
+\end{SideBySideExample}
+
+\section{Nested Joinning}
+
+The \tn{joinbox} can be nested to get complex joinning.
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  \joinbox*[outlen=0.04\textheight,sep=-5pt]
+        {
+          \joinbox[sep=5pt]{Hello \LaTeX}
+            {\qquad\LaTeX~Typesetting\qquad}
+        }{
+          \includegraphics[scale=0.2]{expl3}
+        }
+\end{SideBySideExample}
+
+\section{Figures Joinning}
+
+\subsection{Original}
+
+\begin{center}
+  \includegraphics[scale=0.4]{latexframe}\quad
+  \includegraphics[scale=0.4]{tl-lion}\quad
+  \includegraphics[scale=0.4]{expl3}
+\end{center}
+
+\subsection{Vertical Joinning}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  \joinfigs[outlen=3cm, sep=5pt]
+           {latexframe, tl-lion, expl3}
+\end{SideBySideExample}
+
+\subsection{Horizontal Joinning}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  \joinfigs*[outlen=1.3cm, sep=5pt]
+           {latexframe, tl-lion, expl3}
+\end{SideBySideExample}
+
+\subsection{Nested Joinning}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+  \joinbox*[outlen=0.20\textheight, sep=5pt]
+          {
+            \joinfigs[outlen=0.25\textwidth]
+              {latexframe, tl-lion, expl3}
+          }{
+            \joinfigs[outlen=0.25\textwidth]
+              {expl3, tl-lion, latexframe}
+          }
+\end{SideBySideExample}
+
+\end{documentation}
+
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/joinbox/joinbox.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/joinbox/latexframe.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/joinbox/latexframe.png
===================================================================
--- trunk/Master/texmf-dist/doc/latex/joinbox/latexframe.png	2023-08-12 20:27:34 UTC (rev 67901)
+++ trunk/Master/texmf-dist/doc/latex/joinbox/latexframe.png	2023-08-12 20:29:33 UTC (rev 67902)

Property changes on: trunk/Master/texmf-dist/doc/latex/joinbox/latexframe.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/joinbox/tl-lion.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/joinbox/tl-lion.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/joinbox/tl-lion.pdf	2023-08-12 20:27:34 UTC (rev 67901)
+++ trunk/Master/texmf-dist/doc/latex/joinbox/tl-lion.pdf	2023-08-12 20:29:33 UTC (rev 67902)

Property changes on: trunk/Master/texmf-dist/doc/latex/joinbox/tl-lion.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/joinbox/joinbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/joinbox/joinbox.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/joinbox/joinbox.sty	2023-08-12 20:29:33 UTC (rev 67902)
@@ -0,0 +1,418 @@
+%%% ----------------------------------------------------------------------------
+%%% joinbox: Join figures to same height or width with LaTeX3
+%%% Author    : Nan Geng <nangeng at nwafu.edu.cn>
+%%% Repository: https://gitee.com/nwafu_nan/joinfigs
+%%% License   : The LaTeX Project Public License 1.3c
+%%% ----------------------------------------------------------------------------
+
+\NeedsTeXFormat{LaTeX2e}
+\RequirePackage{expl3}
+\ProvidesExplPackage{joinbox}{2023-08-11}{v1.0.0}
+  {Join figures to same height or width with LaTeX3}
+
+\RequirePackage{xparse}
+\RequirePackage{graphicx}
+
+%% \tl_if_eq:NnTF 与texlive 2020的兼容性设置
+\cs_if_exist:NF \tl_if_eq:NnTF
+  {
+    \tl_new:N \l__tblr_backport_b_tl
+    \prg_new_protected_conditional:Npnn \tl_if_eq:Nn #1 #2 { T, F, TF }
+      {
+        \group_begin:
+          \tl_set:Nn \l__tblr_backport_b_tl {#2}
+          \exp_after:wN
+        \group_end:
+        \if_meaning:w #1 \l__tblr_backport_b_tl
+          \prg_return_true:
+        \else:
+          \prg_return_false:
+        \fi:
+      }
+    \prg_generate_conditional_variant:Nnn \tl_if_eq:Nn { c } { TF, T, F }
+  }
+
+\cs_if_exist:NF \seq_map_indexed_function:NN
+  {
+    \cs_set_eq:NN \seq_map_indexed_function:NN \seq_indexed_map_function:NN
+  }
+
+% 定义变量
+\bool_new:N   \l__joinbox_vertical_bool
+\bool_new:N   \l__joinbox_out_scale_bool
+\int_new:N    \l__joinbox_baseline_int
+\clist_const:Nn \c__joinbox_baseline_clist { t, vc, H, b }
+\clist_new:N  \l__joinbox_name_clist
+\coffin_new:N \l__joinbox_out_coffin
+\coffin_new:N \l__joinbox_tmpa_coffin
+\coffin_new:N \l__joinbox_tmpb_coffin
+
+\dim_new:N \l__joinbox_out_length_dim
+\dim_new:N \l__joinbox_sep_dim
+\dim_new:N \l__joinbox_min_width_dim
+\dim_new:N \l__joinbox_min_height_dim
+
+%% 选项设计
+\keys_define:nn { joinbox }
+  {
+    % 输出结果基线位置
+    baseline .choice:,
+    baseline .value_required:n = true,
+    baseline .choices:nn = { t, vc, H, b }
+                           {
+                             \int_set_eq:NN \l__joinbox_baseline_int \l_keys_choice_int
+                           },
+    baseline .default:n = vc,
+    baseline .initial:n = b,
+
+    % 输出尺寸(垂直拼接:宽度,水平拼接:高度)
+    outlen   .code:n = { \dim_compare:nNnTF { #1 } < { 0pt }
+                           {
+                             \bool_set_false:N \l__joinbox_out_scale_bool
+                           }{
+                             \dim_compare:nNnTF { #1 } = { 0pt }
+                               {
+                                 \bool_set_false:N \l__joinbox_out_scale_bool
+                               }{
+                                 \bool_set_true:N \l__joinbox_out_scale_bool
+                                 \dim_set:Nn \l__joinbox_out_length_dim { #1 }
+                               }
+                           }
+                       },
+    outlen   .default:n = 0pt,
+    outlen   .initial:n = 0pt,
+
+    % 拼音间距
+    sep      .dim_set:N  = \l__joinbox_sep_dim,
+    sep      .default:n = 0pt,
+    sep      .initial:n = 0pt,
+
+    unknown .code:n = { \__joinbox_error:n { unknown-option } }
+    % unknown .code:n = \__joinbox_unknown_key:V \l_keys_key_str,
+  }
+
+% \cs_new_protected:Npn \__joinbox_unknown_key:n #1
+%   {
+%     \clist_if_in:NnTF \c__joinbox_baseline_clist { #1 }
+%       {
+%         \int_zero:N \l_tmpa_int
+%         \clist_map_inline:Nn \c__joinbox_baseline_clist
+%         {
+%           \int_incr:N \l_tmpa_int
+%           \str_if_eq:nnT { ##1 } { #1 }
+%             { \clist_map_break: }
+%         }
+%         \int_gset_eq:NN \l__joinbox_baseline_int \l_tmpa_int
+%       }
+%       {
+%         \dim_compare:nNnTF { #1 } < { 0pt }
+%           {
+%             \bool_gset_false:N \l__joinbox_out_scale_bool
+%           }{
+%             \dim_compare:nNnTF { #1 } = { 0pt }
+%               {
+%                 \bool_gset_false:N \l__joinbox_out_scale_bool
+%               }{
+%                 \bool_gset_true:N \l__joinbox_out_scale_bool
+%                 \dim_gset:Nn \l__joinbox_out_length_dim { #1 }
+%               }
+%           }
+%       }
+%   }
+% \cs_generate_variant:Nn \__joinbox_unknown_key:n { V }
+
+\msg_new:nnn { joinbox } { unknown-option }
+  { package~ option~ "\l_keys_key_tl"~ is~ unknown. }
+
+%% 参数设置用户接口
+\NewDocumentCommand \joinset { m }
+  { \keys_set:nn { joinset } {#1} }
+
+% 计算box盒子的总高度
+% #1---盒子变量
+\cs_if_free:NT \box_ht_plus_dp:N
+  {
+    \cs_new_protected:Npn \box_ht_plus_dp:N #1
+      { \tex_dimexpr:D \box_ht:N #1 + \box_dp:N #1 \scan_stop: }
+  }
+
+% 计算coffin盒子的总高度
+% #1---盒子变量
+\cs_new_nopar:Npn \__joinbox_coffin_ht_plus_dp:N #1
+  {
+    \coffin_ht:N #1 + \coffin_dp:N #1
+  }
+
+% 计算两个盒子的最小宽度和最小高度
+% (最小宽度和最小宽度不一定属于同一个盒子)
+\cs_new:Npn \__joinbox_calc_min_size:nn #1#2
+  {
+    % 取得第1个盒子的宽度和高度
+    \hbox_set:Nn \l_tmpa_box
+      {
+        #1
+      }
+
+    \dim_set:Nn \l_tmpa_dim
+      {
+        \box_wd:N \l_tmpa_box
+      }
+    \dim_gset_eq:NN \l__joinbox_min_width_dim \l_tmpa_dim
+
+    \dim_set:Nn \l_tmpb_dim
+      {
+        \box_ht_plus_dp:N \l_tmpa_box
+      }
+    \dim_gset_eq:NN \l__joinbox_min_height_dim \l_tmpb_dim
+
+    % 取得第2个盒子的宽度和高度,并与第1个盒子比较
+    \hbox_set:Nn \l_tmpa_box
+      {
+        #2
+      }
+
+    \dim_set:Nn \l_tmpa_dim
+      {
+        \box_wd:N \l_tmpa_box
+      }
+    % 比较并记录最小宽度
+    \dim_compare:nNnT \l__joinbox_min_width_dim > \l_tmpa_dim
+      {
+        \dim_gset_eq:NN \l__joinbox_min_width_dim \l_tmpa_dim
+      }
+
+    \dim_set:Nn \l_tmpb_dim
+      {
+        \box_ht_plus_dp:N \l_tmpa_box
+      }
+
+    % 比较并记录最小总高度(高度+深度)
+    \dim_compare:nNnT \l__joinbox_min_height_dim > \l_tmpb_dim
+      {
+        \dim_gset_eq:NN \l__joinbox_min_height_dim \l_tmpb_dim
+      }
+  }
+
+% 输出盒子
+\cs_new:Npn \__joinbox_typeout_coffin:N #1
+  {
+    % 输出拼接后的盒子
+    \int_case:nn { \l__joinbox_baseline_int }
+       {
+         { 1 }{%
+           \coffin_typeset:Nnnnn #1
+             { l } { t } { 0pt } { 0pt }
+         }
+         { 2 }{%
+           \coffin_typeset:Nnnnn #1
+             { l } { vc } { 0pt } { 0pt }
+         }
+         { 3 }{%
+           \coffin_typeset:Nnnnn #1
+             { l } { H } { 0pt } { 0pt }
+         }
+         { 4 }{%
+           \coffin_typeset:Nnnnn #1
+             { l } { b } { 0pt } { 0pt }
+         }
+       }
+  }
+
+% 盒子拼接内部函数
+% 将指定文件名列表中的图像拼接成一个盒子并将基线调整为中心线输出
+% #1---第1个盒子的内容
+% #2---第2个盒子的内容
+\cs_new:Npn \__joinbox_handle:nn #1#2
+  {
+    \group_begin:
+
+      \coffin_clear:N \l__joinbox_out_coffin
+      % 设置第1个盒子
+      \hcoffin_set:Nn \l__joinbox_out_coffin
+        {
+          #1
+        }
+
+      \bool_if:NTF \l__joinbox_vertical_bool
+        {
+          % 按最小宽度缩放第1个盒子
+          \coffin_scale:Nnn \l__joinbox_out_coffin
+            {
+              \dim_ratio:nn { \l__joinbox_min_width_dim }{ \coffin_wd:N \l__joinbox_out_coffin }
+            }
+            {
+              \dim_ratio:nn { \l__joinbox_min_width_dim }{ \coffin_wd:N \l__joinbox_out_coffin }
+            }
+
+          % 处理第2个盒子
+          \hcoffin_set:Nn \l__joinbox_tmpa_coffin
+            {
+              #2
+            }
+
+          % 按最小宽度缩放第2个盒子
+          \coffin_scale:Nnn \l__joinbox_tmpa_coffin
+            {
+              \dim_ratio:nn { \l__joinbox_min_width_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+            }
+            {
+              \dim_ratio:nn { \l__joinbox_min_width_dim }{ \coffin_wd:N \l__joinbox_tmpa_coffin }
+            }
+
+          % \dim_show:N \l__joinbox_sep_dim
+          % 将第2个盒子拼接到第一个盒子
+          \coffin_join:NnnNnnnn \l__joinbox_out_coffin
+            { hc } { b } \l__joinbox_tmpa_coffin { hc } { t } { 0pt } { -\l__joinbox_sep_dim }
+
+          % 按指定输出宽度缩放输出盒子
+          \bool_if:NT \l__joinbox_out_scale_bool
+          {
+            \coffin_scale:Nnn \l__joinbox_out_coffin
+              {
+                \dim_ratio:nn { \l__joinbox_out_length_dim }{ \l__joinbox_min_width_dim }
+              }
+              {
+                \dim_ratio:nn { \l__joinbox_out_length_dim }{ \l__joinbox_min_width_dim }
+              }
+          }
+
+          % 输出拼接后的盒子
+          \__joinbox_typeout_coffin:N \l__joinbox_out_coffin
+        }{
+          % 按最小高度缩放第1个盒子
+          \coffin_scale:Nnn \l__joinbox_out_coffin
+            {
+              \dim_ratio:nn { \l__joinbox_min_height_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_out_coffin }
+            }
+            {
+              \dim_ratio:nn { \l__joinbox_min_height_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_out_coffin }
+            }
+
+          % 处理第2个盒子
+          \hcoffin_set:Nn \l__joinbox_tmpa_coffin
+            {
+              #2
+            }
+
+          % 按最小高度缩放第2个盒子
+          \coffin_scale:Nnn \l__joinbox_tmpa_coffin
+            {
+              \dim_ratio:nn { \l__joinbox_min_height_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+            }
+            {
+              \dim_ratio:nn { \l__joinbox_min_height_dim }{ \__joinbox_coffin_ht_plus_dp:N \l__joinbox_tmpa_coffin }
+            }
+
+          % 将第2个盒子拼接到第1个盒子
+          \coffin_join:NnnNnnnn \l__joinbox_out_coffin
+            { vc } { r } \l__joinbox_tmpa_coffin { vc } { l } { \l__joinbox_sep_dim } { 0pt }
+
+          % 按指定输出高度缩放输出盒子
+          \bool_if:NT \l__joinbox_out_scale_bool
+          {
+            \coffin_scale:Nnn \l__joinbox_out_coffin
+              {
+                \dim_ratio:nn { \l__joinbox_out_length_dim }{ \l__joinbox_min_height_dim }
+              }
+              {
+                \dim_ratio:nn { \l__joinbox_out_length_dim }{ \l__joinbox_min_height_dim }
+              }
+          }
+
+          % 输出拼接后的盒子
+          \__joinbox_typeout_coffin:N \l__joinbox_out_coffin
+        }
+    \group_end:
+  }
+
+\cs_new:Npn \__joinbox_figs:
+  {
+    % 设置第1个图像
+    \clist_pop:NN \l__joinbox_name_clist \l_tmpa_tl
+    \coffin_clear:N \l__joinbox_tmpa_coffin
+    \hcoffin_set:Nn \l__joinbox_tmpa_coffin
+      {
+        \includegraphics{ \l_tmpa_tl }
+      }
+
+    % 循环处理其它图像
+    \clist_map_inline:Nn \l__joinbox_name_clist
+      {
+        \coffin_clear:N \l__joinbox_tmpb_coffin
+        \hcoffin_set:Nn \l__joinbox_tmpb_coffin
+          {
+            \includegraphics{ ##1 }
+          }
+
+        \__joinbox_calc_min_size:nn
+          {
+            \__joinbox_typeout_coffin:N \l__joinbox_tmpa_coffin
+          }
+          {
+            \__joinbox_typeout_coffin:N \l__joinbox_tmpb_coffin
+          }
+
+        \hcoffin_set:Nn \l__joinbox_tmpa_coffin
+          {
+            \__joinbox_handle:nn
+              {
+                \__joinbox_typeout_coffin:N \l__joinbox_tmpa_coffin
+              }
+              {
+                \__joinbox_typeout_coffin:N \l__joinbox_tmpb_coffin
+              }
+          }
+      }
+    \__joinbox_typeout_coffin:N \l__joinbox_tmpa_coffin
+  }
+
+% 盒子拼接用户接口
+% 将两个盒子按指定方式拼接成一个盒子并将基线调整为中心线后输出
+% #1---是否为*命令,如有*则采用水平拼接,无*则采用垂直拼接
+% #2---可选参数,用key-value选项指定拼接参数
+% #3---第1个盒子的内容
+% #4---第2个盒子的内容
+\NewDocumentCommand{\joinbox}{ s O{} m m}
+  {
+    \IfBooleanTF{#1}
+      {
+        \bool_set_false:N \l__joinbox_vertical_bool
+      }{
+        \bool_set_true:N \l__joinbox_vertical_bool
+      }
+
+    \group_begin:
+      % 设置拼接参数
+      \keys_set:nn { joinbox } { #2 }
+      % 计算最小宽度和高度
+      \__joinbox_calc_min_size:nn { #3 } { #4 }
+      % 拼接输出
+      \__joinbox_handle:nn { #3 }{ #4 }
+    \group_end:
+  }
+
+% 图像拼接用户接口
+% 将指定文件名列表中的图像拼接成一个盒子并将基线调整为中心线输出
+% #1---是否为*命令,如有*则采用水平拼接,无*则采用垂直拼接
+% #2---可选参数,用key-value选项指定拼接参数
+% #3---必选参数,用逗号分隔的,需要拼接的图像文件名称(可以带有路径)
+\NewDocumentCommand{\joinfigs}{ s O{} m}
+  {
+    \IfBooleanTF{#1}
+      {
+        \bool_set_false:N \l__joinbox_vertical_bool
+      }{
+        \bool_set_true:N \l__joinbox_vertical_bool
+      }
+
+    \group_begin:
+      % 设置拼接参数
+      \keys_set:nn { joinbox } { #2 }
+      % 设置文件名列表
+      \clist_set:Nn \l__joinbox_name_clist { #3 }
+      % 拼接图像
+      \__joinbox_figs:
+    \group_end:
+  }
+
+\endinput


Property changes on: trunk/Master/texmf-dist/tex/latex/joinbox/joinbox.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2023-08-12 20:27:34 UTC (rev 67901)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2023-08-12 20:29:33 UTC (rev 67902)
@@ -444,7 +444,8 @@
   jablantile jacow jamtimes japanese-mathformulas japanese-otf
     jbact jeuxcartes jfmutil jieeetran jigsaw
     jknapltx jkmath jlabels jlreq jlreq-deluxe
-    jmb jmlr jmsdelim jneurosci jnuexam jobname-suffix josefin jourcl jourrr
+    jmb jmlr jmsdelim jneurosci jnuexam
+    jobname-suffix joinbox josefin jourcl jourrr
     jpneduenumerate jpnedumathsymbols jpsj jsclasses
     jslectureplanner jumplines junicode jupynotex
     jura juraabbrev jurabib juramisc jurarsp js-misc jvlisting jwjournal

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2023-08-12 20:27:34 UTC (rev 67901)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2023-08-12 20:29:33 UTC (rev 67902)
@@ -721,6 +721,7 @@
 depend jlabels
 depend jmsdelim
 depend jobname-suffix
+depend joinbox
 depend jslectureplanner
 depend jumplines
 depend jvlisting

Added: trunk/Master/tlpkg/tlpsrc/joinbox.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.