summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex
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/doc/latex
parent77118abb24751e78b075b9b725e6d13f224b6dec (diff)
joinbox (21aug23)
git-svn-id: svn://tug.org/texlive/trunk@68003 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r--Master/texmf-dist/doc/latex/joinbox/README.md2
-rw-r--r--Master/texmf-dist/doc/latex/joinbox/joinbox.pdfbin381807 -> 411301 bytes
-rw-r--r--Master/texmf-dist/doc/latex/joinbox/joinbox.tex210
3 files changed, 179 insertions, 33 deletions
diff --git a/Master/texmf-dist/doc/latex/joinbox/README.md b/Master/texmf-dist/doc/latex/joinbox/README.md
index 327d85d2a87..4b3b04cae90 100644
--- a/Master/texmf-dist/doc/latex/joinbox/README.md
+++ b/Master/texmf-dist/doc/latex/joinbox/README.md
@@ -1,7 +1,7 @@
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`, `\joinboxes`and `\joinfigs` macros for vertical or horizontal joinning of boxes. The typeout baseline, size and seprated space can be set up with the options or `\joinset` macro.
+`joinbox` is a box joinning package based on l3coffins developed with expl3, which provides the `\joinbox`, `\joinboxes`and `\joinfigs` macros for vertical or horizontal joinning of boxes. The typeout baseline, size and seperated space 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.
diff --git a/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf b/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf
index 6d31c3aa863..0e1fd270066 100644
--- a/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf
+++ b/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/joinbox/joinbox.tex b/Master/texmf-dist/doc/latex/joinbox/joinbox.tex
index f0848d88672..3c021e196db 100644
--- a/Master/texmf-dist/doc/latex/joinbox/joinbox.tex
+++ b/Master/texmf-dist/doc/latex/joinbox/joinbox.tex
@@ -119,7 +119,7 @@
{ \__codedoc_cmd:no {#1} { #2 } }
\ExplSyntaxOff
-\def\vers{\texttt{v1.0.1}
+\def\vers{\texttt{v1.0.2}
\thanks{\url{https://gitee.com/nwafu_nan/joinbox}}
}
@@ -146,16 +146,17 @@
\section{引言}
-\pkg{joinbox}是一个基于\pkg{l3coffins}用\pkg{expl3}开发的
+\pkg{joinbox}是一个基于\pkg{l3coffins}用\pkg{Expl3}开发的
盒子拼接宏包,它用于实现盒子的垂直或水平拼接。垂直拼接
会以各对象等宽的方式拼接,而水平拼接会以各对象等高的方式
拼接。
-该宏包提供了\tn{joinbox}和\tn{joinfigs}两个命令。其中,
-\tn{joinbox}用于拼接两个独立对象,\tn{joinfigs}用于拼接
-多个图像。这两个命令的不带*(星号)版本用于垂直拼接,而带
-*(星号)的版本用于水平拼接。
-同时,该宏包还提供了\tn{joinset}命令用于对拼接方式进行设置。
+该宏包提供了\tn{joinbox}、\tn{joinboxes}和\tn{joinfigs}三个拼接
+命令。其中,\tn{joinbox}用于拼接两个独立对象,\tn{joinboxes}用于
+拼接一组对象,\tn{joinfigs}用于拼接多个图像。这三个命令的不带*(星号)
+版本用于垂直拼接,而带*(星号)的版本用于水平拼接。
+
+同时,该宏包还提供了\tn{joinset}命令用于对输出基线、尺寸和拼接间距进行设置。
\section{用户接口}
@@ -163,8 +164,8 @@
\begin{function}{\joinbox,\joinbox*}
\begin{syntax}
- \cs{joinbox} \oarg{拼接方式} \marg{对象1} \marg{对象2}
- \cs{joinbox*} \oarg{拼接方式} \marg{对象1} \marg{对象2}
+ \cs{joinbox} \oarg{拼接选项} \marg{对象1} \marg{对象2}
+ \cs{joinbox*} \oarg{拼接选项} \marg{对象1} \marg{对象2}
\end{syntax}
\end{function}
@@ -173,9 +174,9 @@
\marg{对象2}指定需要拼接的对象。拼接对象将被置于coffin中,
然后按需求进行拼接。
- \marg{对象1}或\marg{对象2}可以为空,但两者不能同时为空。
+ \marg{对象1}或\marg{对象2}可以置空,但两者不能同时为空。
- 在可选项\oarg{拼接方式}中,可以通过key-value指定输出结果
+ 在\oarg{拼接选项}中,可以通过逗号分隔的key-value指定输出结果
基线位置、 输出尺寸(垂直拼接是输出宽度,水平拼接是输出高度)
和拼接间距。
@@ -183,8 +184,8 @@
\begin{function}{\joinboxes,\joinboxes*}
\begin{syntax}
- \cs{joinboxes} \oarg{拼接方式} \marg{拼接内容列表}
- \cs{joinboxes*} \oarg{拼接方式} \marg{拼接内容列表}
+ \cs{joinboxes} \oarg{拼接选项} \marg{拼接内容列表}
+ \cs{joinboxes*} \oarg{拼接选项} \marg{拼接内容列表}
\end{syntax}
\end{function}
@@ -193,15 +194,15 @@
指定需要拼接的内容,不同内容之间用英文逗号进行分隔,若内容中含
有空格或逗号,则需要将其置于|{}|分组中。最少需要有1个拼接内容。
- 在\oarg{拼接方式}可选项中,可以通过key-value指定结果基线位置、
+ 在\oarg{拼接选项}中,可以通过逗号分隔的key-value指定结果基线位置、
输出尺寸(垂直拼接是输出宽度,水平拼接是输出调试)、拼接间距。
\subsection{\cs{joinfigs}拼接多个图像命令}
\begin{function}{\joinfigs,\joinfigs*}
\begin{syntax}
- \cs{joinfigs} \oarg{拼接方式} \marg{文件名称列表}
- \cs{joinfigs*} \oarg{拼接方式} \marg{文件名称列表}
+ \cs{joinfigs} \oarg{拼接选项} \marg{文件名称列表}
+ \cs{joinfigs*} \oarg{拼接选项} \marg{文件名称列表}
\end{syntax}
\end{function}
@@ -210,21 +211,21 @@
指定需要拼接图像,文件名称中可以包含路径,不同文件名称之间用
英文逗号进行分隔。最少需要有1个图像文件名称。
- 在\oarg{拼接方式}可选项中,可以通过key-value指定结果基线位置、
+ 在\oarg{拼接选项}中,可以通过逗号分隔的key-value指定结果基线位置、
输出尺寸(垂直拼接是输出宽度,水平拼接是输出调试)、拼接间距。
\subsection{\cs{joinset}}
\begin{function}{\joinset}
\begin{syntax}
- \cs{joinset} \marg{拼接方式}
+ \cs{joinset} \marg{拼接选项}
\end{syntax}
\end{function}
- 用于通过key-value指定拼接结果中的基线位置、
+ 用于通过逗号分隔的key-value指定拼接结果中的基线位置、
输出尺寸(垂直拼接是输出宽度,水平拼接是输出调试)、拼接间距。
-\section{拼接方式}
+\section{拼接选项}
\begin{option}{ opt = baseline, desc = {= \meta{t,vc,H,b}}, init=b }
设置joinbox或joinfigs拼接结果的输出基线位置,目前支持:
@@ -236,7 +237,7 @@
\item |b|---盒子底端水平线。
\end{Description}
\begin{notezh}
- 可以省略\texttt{baseline}键名,但值只能取|t|、|vc|和|b|。
+ 可以省略\texttt{baseline}键名,但其值只能取|t|、|vc|、|H|和|b|。
\end{notezh}
\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
@@ -265,7 +266,7 @@
若指定的输出尺寸$\le 0$,则表示使用被拼接对象中的最小尺寸输出。
\end{option}\\
\begin{notezh}
- 可以省略\texttt{outlen}键名,但值只能取|dim|尺寸类型。
+ 可以省略\texttt{outlen}键名,但值只能取|dim|尺寸或尺寸表达式。
当同时省略\texttt{baseline}键名和\texttt{outlen}键名时,如果
键值为不支持的\texttt{baseline},也是不|dim|尺寸或|dim|尺寸表达式,
@@ -308,7 +309,8 @@
\section{多盒子拼接}
-可以使用\tn{joinboxes}命令一次拼接多个对象。
+可以使用\tn{joinboxes}命令一次拼接多个对象,不同对象间用逗号进行分隔,
+如果对象包含逗号,则需要将该对象置于|{}|构成的分组中。
\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
\joinboxes[sep=2pt]{%
@@ -348,6 +350,8 @@
\subsection{垂直拼接图像}
+垂直拼接时,各对象保持相同宽度。
+
\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
\joinfigs[outlen=3cm, sep=5pt]
{latexframe, tl-lion, expl3}
@@ -355,6 +359,8 @@
\subsection{水平拼接图像}
+水平拼接时,各对象保持相同高度。
+
\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
\joinfigs*[outlen=1.3cm, sep=5pt]
{latexframe, tl-lion, expl3}
@@ -375,6 +381,73 @@
}
\end{SideBySideExample}
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+
+ \joinboxes*[0.15\textheight, sep=5pt]{%
+ {
+ \joinfigs[0.25\textwidth]
+ {latexframe, tl-lion, expl3}
+ },
+ {
+ \joinfigs[0.25\textwidth]
+ {tl-lion, latexframe,expl3}
+ },
+ {
+ \joinfigs[0.25\textwidth]
+ {expl3, tl-lion, latexframe}
+ }
+ }
+\end{SideBySideExample}
+
+\section{单对象拼接}
+
+\tn{joinbox}、\tn{joinboxes}或\tn{joinfigs}命令也可以实现只``伪拼接''
+一个对象,此时,则可以通过选项调整输出的基线位置和大小。
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ \joinbox{\LaTeX 科技排版}{}
+
+ \joinbox[4cm]{}{\LaTeX 科技排版}
+
+ \joinboxes{\LaTeX 科技排版}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ 基线位置->\joinfigs[vc,4cm]{latexframe}
+\end{SideBySideExample}
+
+\section{垂直盒子拼接}
+
+由于是基于Expl3的\tn{hcoffin_set:Nn}函数构造内部盒子实现拼接的,因此,
+待拼接内容中的|\\|和\tn{par}(包括空行)等断行和分段命令将失效。此时,
+可以先用\tn{parbox}等命令或\env{minipage}等环境先构建一个垂直盒子,
+然后再将构造的垂直盒子作为一个对象进行拼接。
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ \joinbox{
+ \parbox{8em}{
+ \centering
+ \LaTeX 科技排版
+
+ \LaTeX~Typesetting
+ }
+ }{\includegraphics{expl3}}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ \joinboxes*{
+ {
+ \begin{minipage}{8em}
+ \centering
+ \LaTeX 科技排版
+
+ \LaTeX~Typesetting
+ \end{minipage}
+ },
+ {\includegraphics{expl3}}
+ }
+\end{SideBySideExample}
+
\title{
\pkg{joinbox} package for Joinning Boxs or Figures
\rlap{\makebox[2.5cm][r]{
@@ -389,17 +462,18 @@
\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.
+\pkg{joinbox} is a box joinning package based on l3coffins developed with Expl3,
+which provides the \cs{joinbox}, \cs{joinboxes} and \cs{joinfigs} macros for
+vertical or horizontal joinning of boxes. The typout baseline, size and seperated
+space 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.
+The \cs{joinbox}, \cs{joinboxes} and \cs{joinfigs} macros without star are used
+for vertical joinning, while the \cs{joinbox*}, \cs{joinboxes*} and
+\cs{joinfigs*} with star are used for horizontal joinning.
\section{Interfaces}
@@ -417,7 +491,7 @@ while the \cs{joinbox*} and \cs{joinfigs*} with star are used for horizontal joi
\marg{content2} to specify the objects to be joined. The contents will
be placed in the coffin respectively and then joined.
- \marg{content1} or \marg{content2}can be null, but both cannot be null at
+ \marg{content1} or \marg{content2} can be null, but both cannot be null at
the same time.
In the \oarg{options}, the typeout baseline, typeout size
@@ -489,7 +563,7 @@ bottom and top edges of the bounding box (i.e. the “vertical centre”);
\end{Description}
\begin{noteen}
In most cases, you can omit the baseline key names and write only it's value.
- But the value must be t, vc or b.
+ But the value must be t, vc, H or b.
\end{noteen}
\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
@@ -602,6 +676,8 @@ The \tn{joinbox} \tn{joinboxes} can be nested to get complex joinning.
\subsection{Vertical Joinning}
+When using vertical joinning, all boxes to be joined will keep same width.
+
\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
\joinfigs[outlen=3cm, sep=5pt]
{latexframe, tl-lion, expl3}
@@ -609,6 +685,8 @@ The \tn{joinbox} \tn{joinboxes} can be nested to get complex joinning.
\subsection{Horizontal Joinning}
+When using horizontal joined, all boxes to be joined will keep same height.
+
\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
\joinfigs*[outlen=1.3cm, sep=5pt]
{latexframe, tl-lion, expl3}
@@ -630,7 +708,75 @@ can be nested for complex image joinning.
}
\end{SideBySideExample}
-\end{documentation}
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ \joinboxes*[0.15\textheight, sep=5pt]{%
+ {
+ \joinfigs[0.25\textwidth]
+ {latexframe, tl-lion, expl3}
+ },
+ {
+ \joinfigs[0.25\textwidth]
+ {tl-lion, latexframe,expl3}
+ },
+ {
+ \joinfigs[0.25\textwidth]
+ {expl3, tl-lion, latexframe}
+ }
+ }
+\end{SideBySideExample}
+
+\section{Single Joinning}
+
+The \tn{joinbox}, \tn{joinboxes}, or \tn{joinfigs} macros can also be
+used to ``pseudo-joinning'' only one object, in which case the baseline
+and size of the output can be adjusted with the options.
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ \joinbox{Hello \LaTeX}{}
+ \joinbox[4cm]{}{Hello \LaTeX}
+
+ \joinboxes{Hello \LaTeX}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ baseline->\joinfigs[vc,4cm]{latexframe}
+\end{SideBySideExample}
+
+\section{Vertical Box Joinning}
+
+Since joinbox is realized by constructing two internal boxes based on
+the \tn{hcoffin_set:Nn} Expl3 function, line breaking and new paragraph
+macros such as |\\| and \tn{par}(including blank lines) in the content
+to be joined will be invalid. In this case, you can first construct a
+vertical box using commands such as \tn{parbox} or environments such as
+|minipage|, and then join the constructed vertical box as an object.
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ \joinbox{
+ \parbox{8em}{
+ \centering
+ Hello \LaTeX
+
+ \LaTeX~Typesetting
+ }
+ }{\includegraphics{expl3}}
+\end{SideBySideExample}
+
+\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2]
+ \joinboxes*{
+ {
+ \begin{minipage}{8em}
+ \centering
+ Hello \LaTeX
+
+ \LaTeX~Typesetting
+ \end{minipage}
+ },
+ {\includegraphics{expl3}}
+ }
+\end{SideBySideExample}
+
+\end{documentation}
\end{document}