diff options
author | Karl Berry <karl@freefriends.org> | 2023-08-16 19:44:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-08-16 19:44:55 +0000 |
commit | 420424f770eab054ed4c41a21ecd889195a7c9aa (patch) | |
tree | 17e4831c47b00eb8675e91c74dcaadb573fd5222 /Master/texmf-dist/doc/latex | |
parent | aaf99a49d7e7c3da34b6187bbffec67f717a6744 (diff) |
joinbox (16aug23)
git-svn-id: svn://tug.org/texlive/trunk@67947 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/joinbox/README.md | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/joinbox/joinbox.pdf | bin | 365869 -> 381807 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/joinbox/joinbox.tex | 154 |
3 files changed, 141 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/latex/joinbox/README.md b/Master/texmf-dist/doc/latex/joinbox/README.md index cb205bed09e..327d85d2a87 100644 --- a/Master/texmf-dist/doc/latex/joinbox/README.md +++ b/Master/texmf-dist/doc/latex/joinbox/README.md @@ -1,11 +1,11 @@ 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. +`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. 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. +The `\joinbox`, `\joinboxes` and `\joinfigs` macros without star are used for vertical joinning, while the `\joinbox*`, `\joinboxes*` and `\joinfigs*` with star are used for horizontal joinning. You can read the manual (in Chinese/English) for more details and examples. @@ -21,7 +21,7 @@ joinbox 盒子拼接宏包 `joinbox` 是一个基于`l3coffins`用`expl3`开发的盒子拼接宏包,它用于实现盒子的垂直或水平拼接。垂直拼接会以各对象等宽的方式拼接,而水平拼接会以各对象等高的方式拼接。 -该宏包提供了`\joinbox`和`\joinfigs`两个命令。其中,`\joinbox`用于拼接两个独立对象,`\joinfigs`用于拼接多个图像。这两个命令的不带`*`版本用于垂直拼接,而带`*`的版本用于水平拼接。同时,该宏包还提供了`\joinset`命令用于对拼接方式进行设置。 +该宏包提供了`\joinbox`, `\joinboxes`和`\joinfigs`三个个命令。其中,`\joinbox`用于拼接两个独立对象,`\joinboxes`用于拼接一组独立对象,`\joinfigs`用于拼接多个图像。这三个命令的不带`*`版本用于垂直拼接,而带`*`的版本用于水平拼接。可以通过命令选项或`\joinset`命令设置输出的基线位置,大小和拼接间距。 可以通过阅读宏包手册(中文/英文)以也解该宏包更多的使用细节和使用样例。 @@ -51,7 +51,7 @@ Copyright and Licence 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. diff --git a/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf b/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf Binary files differindex 374261e3a44..6d31c3aa863 100644 --- a/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf +++ b/Master/texmf-dist/doc/latex/joinbox/joinbox.pdf diff --git a/Master/texmf-dist/doc/latex/joinbox/joinbox.tex b/Master/texmf-dist/doc/latex/joinbox/joinbox.tex index bb6d7916ef8..f0848d88672 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.0} +\def\vers{\texttt{v1.0.1} \thanks{\url{https://gitee.com/nwafu_nan/joinbox}} } @@ -173,10 +173,29 @@ \marg{对象2}指定需要拼接的对象。拼接对象将被置于coffin中, 然后按需求进行拼接。 + \marg{对象1}或\marg{对象2}可以为空,但两者不能同时为空。 + 在可选项\oarg{拼接方式}中,可以通过key-value指定输出结果 基线位置、 输出尺寸(垂直拼接是输出宽度,水平拼接是输出高度) 和拼接间距。 +\subsection{\cs{joinboxes}拼接多个对象命令} + +\begin{function}{\joinboxes,\joinboxes*} + \begin{syntax} + \cs{joinboxes} \oarg{拼接方式} \marg{拼接内容列表} + \cs{joinboxes*} \oarg{拼接方式} \marg{拼接内容列表} + \end{syntax} + +\end{function} + + 用于拼接多个对象。该命令需要用一个必选参数\marg{拼接内容列表}, + 指定需要拼接的内容,不同内容之间用英文逗号进行分隔,若内容中含 + 有空格或逗号,则需要将其置于|{}|分组中。最少需要有1个拼接内容。 + + 在\oarg{拼接方式}可选项中,可以通过key-value指定结果基线位置、 + 输出尺寸(垂直拼接是输出宽度,水平拼接是输出调试)、拼接间距。 + \subsection{\cs{joinfigs}拼接多个图像命令} \begin{function}{\joinfigs,\joinfigs*} @@ -187,9 +206,9 @@ \end{function} - 用于拼接多个图像。该命令需要用一个必选参数\marg{文件名称列表}, - 用于指定需要拼接图像,文件名称中可以包含路径,不同文件名称之 - 间用英文逗号进行分隔,最少需要有1个图像文件名称。 + 用于拼接多个图像。该命令需要用一个必选参数\marg{文件名称列表} + 指定需要拼接图像,文件名称中可以包含路径,不同文件名称之间用 + 英文逗号进行分隔。最少需要有1个图像文件名称。 在\oarg{拼接方式}可选项中,可以通过key-value指定结果基线位置、 输出尺寸(垂直拼接是输出宽度,水平拼接是输出调试)、拼接间距。 @@ -216,17 +235,25 @@ \item |H|---盒子内容基线、 \item |b|---盒子底端水平线。 \end{Description} +\begin{notezh} + 可以省略\texttt{baseline}键名,但值只能取|t|、|vc|和|b|。 +\end{notezh} \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] - 默认基线\fbox{ + 默认基线->\fbox{ \joinbox{\LaTeX 科技排版} {\LaTeX~Typesetting} } - baseline=t\fbox{ + 指定基线->\fbox{ \joinbox[baseline=t]{\LaTeX 科技排版} {\LaTeX~Typesetting} } + + 省略键名->\fbox{ + \joinbox[vc]{\LaTeX 科技排版} + {\LaTeX~Typesetting} + } \end{SideBySideExample} \bigskip @@ -237,6 +264,13 @@ 若指定的输出尺寸$\le 0$,则表示使用被拼接对象中的最小尺寸输出。 \end{option}\\ +\begin{notezh} + 可以省略\texttt{outlen}键名,但值只能取|dim|尺寸类型。 + + 当同时省略\texttt{baseline}键名和\texttt{outlen}键名时,如果 + 键值为不支持的\texttt{baseline},也是不|dim|尺寸或|dim|尺寸表达式, + 则会出错。 +\end{notezh} \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] 输出宽度\fbox{ \joinbox[outlen=2cm]{\LaTeX 科技排版} @@ -247,6 +281,11 @@ \joinbox*[outlen=0.2cm]{\LaTeX 科技排版} {\LaTeX~Typesetting} } + + 省略键名\fbox{ + \joinbox[3cm]{\LaTeX 科技排版} + {\LaTeX~Typesetting} + } \end{SideBySideExample} \bigskip @@ -267,9 +306,25 @@ } \end{SideBySideExample} +\section{多盒子拼接} + +可以使用\tn{joinboxes}命令一次拼接多个对象。 + +\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] + \joinboxes[sep=2pt]{% + \LaTeX 科技排版, + {\LaTeX, Typesetting} + } + + \joinboxes*[0.2cm,sep=2pt]{% + \LaTeX 科技排版, + {\LaTeX, Typesetting} + } +\end{SideBySideExample} + \section{嵌套拼接} -可以嵌套使用\tn{joinbox}命令以实现复杂对象拼接。 +可以嵌套使用\tn{joinbox}、\tn{joinboxes}命令以实现复杂对象拼接。 \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] \joinbox*[outlen=0.04\textheight,sep=-5pt] @@ -281,7 +336,6 @@ } \end{SideBySideExample} - \section{图像拼接} \subsection{原始图像} @@ -308,13 +362,15 @@ \subsection{嵌套拼接图像} +可以嵌套使用\tn{joinbox}、\tn{joinboxes}或\tn{joinfigs}命令以实现复杂图像拼接。 + \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] - \joinbox*[outlen=0.20\textheight, sep=5pt] + \joinbox*[0.20\textheight, sep=5pt] { - \joinfigs[outlen=0.25\textwidth] + \joinfigs[0.25\textwidth] {latexframe, tl-lion, expl3} }{ - \joinfigs[outlen=0.25\textwidth] + \joinfigs[0.25\textwidth] {expl3, tl-lion, latexframe} } \end{SideBySideExample} @@ -361,10 +417,33 @@ 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 + the same time. + 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{joinboxes} for Content Sets Joinning} + +\begin{function}{\joinboxes,\joinboxes*} + \begin{syntax} + \cs{joinboxes} \oarg{options} \marg{content list} + \cs{joinboxes*} \oarg{options} \marg{content list} + \end{syntax} + +\end{function} + + Used for joinning multiple contents. This command requires a + argument\marg{content list} to specify the content to be joined. + They should be separated by commas, it should. Items which contain + either spaces or commas should be surrounded by braces. + At least one content 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{joinfigs} for Figure Sets Joinning} \begin{function}{\joinfigs,\joinfigs*} @@ -408,17 +487,26 @@ 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{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. +\end{noteen} \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] - baseline=b\fbox{ + default->\fbox{ \joinbox{Hello \LaTeX} {\LaTeX~Typesetting} } - baseline=t\fbox{ + top->\fbox{ \joinbox[baseline=t]{Hello \LaTeX} {\LaTeX~Typesetting} } + + omit baseline->\fbox{ + \joinbox[vc]{Hello \LaTeX} + {\LaTeX~Typesetting} + } \end{SideBySideExample} \bigskip @@ -428,6 +516,14 @@ bottom and top edges of the bounding box (i.e. the “vertical centre”); If $outlen\le 0$,then the typeout size is minimal size of all contents. \end{option}\\ +\begin{noteen} + In most cases, you can omit the outlen key names and write only it's value. + But the value must be dimension expression. + + When omitting both the |baseline| key name and the |outlen| key name, + an error occurs if the key value is an unsupported |baseline| and + not |dim| or |dim| expression. +\end{noteen} \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] width: \fbox{ @@ -439,6 +535,11 @@ bottom and top edges of the bounding box (i.e. the “vertical centre”); \joinbox*[outlen=0.2cm]{Hello \LaTeX} {\LaTeX~Typesetting} } + + omit outlen: \fbox{ + \joinbox[2cm]{Hello \LaTeX} + {\LaTeX~Typesetting} + } \end{SideBySideExample} \bigskip @@ -459,9 +560,25 @@ bottom and top edges of the bounding box (i.e. the “vertical centre”); } \end{SideBySideExample} +\section{Multiple Joinning} + +The \tn{joinboxes} can join multiple contents. + +\begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] + \joinboxes[sep=2pt]{% + {Hello, \LaTeX}, + \LaTeX~Typesetting + } + + \joinboxes*[0.2cm,sep=2pt]{% + {Hello, \LaTeX}, + \LaTeX~Typesetting + } +\end{SideBySideExample} + \section{Nested Joinning} -The \tn{joinbox} can be nested to get complex joinning. +The \tn{joinbox} \tn{joinboxes} 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] @@ -499,13 +616,16 @@ The \tn{joinbox} can be nested to get complex joinning. \subsection{Nested Joinning} +The\tn{joinbox}, \tn{joinboxes}, or \tn{joinfigs} macros +can be nested for complex image joinning. + \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] - \joinbox*[outlen=0.20\textheight, sep=5pt] + \joinbox*[0.20\textheight, sep=5pt] { - \joinfigs[outlen=0.25\textwidth] + \joinfigs[0.25\textwidth] {latexframe, tl-lion, expl3} }{ - \joinfigs[outlen=0.25\textwidth] + \joinfigs[0.25\textwidth] {expl3, tl-lion, latexframe} } \end{SideBySideExample} |