\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.3} \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@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{joinboxes}å’Œ\tn{joinfigs}三个拼接 命令。其ä¸ï¼Œ\tn{joinbox}用于拼接两个独立对象,\tn{joinboxes}用于 拼接一组对象,\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ä¸ï¼Œ ç„¶åŽæŒ‰éœ€æ±‚进行拼接。 \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*} \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{notezh} å¯ä»¥çœç•¥\texttt{baseline}é”®å,但其值åªèƒ½å–|t|ã€|vc|ã€|H|å’Œ|b|。 \end{notezh} \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] 默认基线->\fbox{ \joinbox{\LaTeX 科技排版} {\LaTeX~Typesetting} } 指定基线->\fbox{ \joinbox[baseline=t]{\LaTeX 科技排版} {\LaTeX~Typesetting} } çœç•¥é”®å->\fbox{ \joinbox[vc]{\LaTeX 科技排版} {\LaTeX~Typesetting} } \end{SideBySideExample} \bigskip \begin{option}{ opt = outlen, desc = {= \meta{dim}}, init=0pt } 设置joinbox或joinfigs拼接结果的输出尺寸,对于垂直拼接,设置 输出宽度,对于水平拼接,设置输出高度。 若指定的输出尺寸$\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 科技排版} {\LaTeX~Typesetting} } 输出高度\fbox{ \joinbox*[outlen=0.2cm]{\LaTeX 科技排版} {\LaTeX~Typesetting} } çœç•¥é”®å\fbox{ \joinbox[3cm]{\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{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{joinboxes}å‘½ä»¤ä»¥å®žçŽ°å¤æ‚对象拼接。 \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{嵌套拼接图åƒ} å¯ä»¥åµŒå¥—使用\tn{joinbox}ã€\tn{joinboxes}或\tn{joinfigs}å‘½ä»¤ä»¥å®žçŽ°å¤æ‚å›¾åƒæ‹¼æŽ¥ã€‚ \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] \joinbox*[0.20\textheight, sep=5pt] { \joinfigs[0.25\textwidth] {latexframe, tl-lion, expl3} }{ \joinfigs[0.25\textwidth] {expl3, tl-lion, latexframe} } \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]{ \normalsize $\Longrightarrow$ \color{red} \protect\hyperlink{zh}{䏿–‡ç‰ˆæœ¬} \protect\hypertarget{en}{} }} } \author{Nan Geng \texttt{<nangeng@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}, \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}, \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} \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. \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*} \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{noteen} In most cases, you can omit the baseline key names and write only it's value. But the value must be t, vc, H or b. \end{noteen} \begin{SideBySideExample}[frame=single,numbers=left,xrightmargin=.45\linewidth,gobble=2] default->\fbox{ \joinbox{Hello \LaTeX} {\LaTeX~Typesetting} } top->\fbox{ \joinbox[baseline=t]{Hello \LaTeX} {\LaTeX~Typesetting} } omit baseline->\fbox{ \joinbox[vc]{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{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{ \joinbox[outlen=2cm]{Hello \LaTeX} {\LaTeX~Typesetting} } height: \fbox{ \joinbox*[outlen=0.2cm]{Hello \LaTeX} {\LaTeX~Typesetting} } omit outlen: \fbox{ \joinbox[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{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} \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] { \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} 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} \end{SideBySideExample} \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} \end{SideBySideExample} \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*[0.20\textheight, sep=5pt] { \joinfigs[0.25\textwidth] {latexframe, tl-lion, expl3} }{ \joinfigs[0.25\textwidth] {expl3, tl-lion, latexframe} } \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{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}