Skip to contents

Concatenate textab blocks horizontally (side-by-side).

Usage

# S3 method for tt_
/(left_block, right_block)

Arguments

left_block

The left block of the tabular row.

right_block

The right block of the tabular row.

Value

The output is a textab block, formed by horizontally concatenating the two provided textab blocks.

Examples

# define some textab blocks
first_block = TexRow(c(1,2))
first_block
#> % created using textab on Wed Apr 26 17:42:43 2023
#> \begin{tabular}{rr}
#> 1.000 & 2.000 \\
#> \end{tabular}

second_block = TexRow(3)
second_block
#> % created using textab on Wed Apr 26 17:42:43 2023
#> \begin{tabular}{r}
#> 3.000 \\
#> \end{tabular}

third_block = TexRow(4)
third_block
#> % created using textab on Wed Apr 26 17:42:43 2023
#> \begin{tabular}{r}
#> 4.000 \\
#> \end{tabular}

# concatenate two blocks horizontally
first_block / second_block
#> % created using textab on Wed Apr 26 17:42:43 2023
#> \begin{tabular}{rrr}
#> 1.000 & 2.000 & 3.000 \\
#> \end{tabular}

# concatenate three blocks horizontally
first_block / second_block / third_block
#> % created using textab on Wed Apr 26 17:42:43 2023
#> \begin{tabular}{rrrr}
#> 1.000 & 2.000 & 3.000 & 4.000 \\
#> \end{tabular}

# concatenate both horizontally and vertically
# note: horizontal concatenation takes precedence over vertical concatenation
first_block + second_block / third_block
#> % created using textab on Wed Apr 26 17:42:43 2023
#> \begin{tabular}{rr}
#> 1.000 & 2.000 \\
#> 3.000 & 4.000 \\
#> \end{tabular}