2

How do I put these two trees on the same page?

    \documentclass[11pt]{article}
    \usepackage{forest}
    \usepackage{amsmath}
    \usepackage{pdflscape}
    \begin{document}
    \begin{landscape}

    \textit{Generator $(12)$}
\[\hspace*{-10em}\vcenter{\hbox{
\begin{forest}
for tree={grow'=east,l sep=8em,s sep=3em,circle,inner sep=2pt,fill}
[,label=left:{$(12)$}
 [,label=above:{$()$},edge label={node[midway,sloped,above]{$(12)$}}
  [,label=right:$(12)$,edge label={node[midway,sloped,above]{$(12)$}}]
  [,label=right:$(13)$,edge label={node[midway,sloped,below]{$(13)$}}]
 ]
 [,label=below:{$(123)$},edge label={node[midway,sloped,below]{$(13)$}}
  [,label=right:$(23)$,edge label={node[midway,sloped,above]{$(12)$}}]
  [,label=right:$(12)$,edge label={node[midway,sloped,below]{$(13)$}}]
 ]
]
\end{forest}}}
\rightarrow\hspace*{-10em}
\vcenter{\hbox{\begin{forest}
for tree={grow'=east,l sep=7em,s sep=4em,circle,inner sep=2pt,fill}
[,label=left:{$\begin{bmatrix} 
0 & 1 & 0 \\ 
1 & 0 & 0 \\ 
0 & 0 & 1 
\end{bmatrix}$}
 [,label=above:{$\begin{bmatrix} 
1 & 0 & 0 \\ 
0 & 1 & 0 \\ 
0 & 0 & 1 
\end{bmatrix}$},edge label={node[midway,sloped,above]{$(23)$}}
  [,label=right:$\begin{bmatrix} 
0 & 1 & 0 \\ 
1 & 0 & 0 \\ 
0 & 0 & 1 
\end{bmatrix}$,edge label={node[midway,sloped,above]{$(23)$}}]
  [,label=right:$\begin{bmatrix} 
0 & 0 & 1 \\ 
0 & 1 & 0 \\ 
1 & 0 & 0 
\end{bmatrix}$,edge label={node[midway,sloped,below]{$(132)$}}]
 ]
 [,label=below:{$\begin{bmatrix} 
0 & 1 & 0 \\ 
0 & 0 & 1 \\ 
1 & 0 & 0 
\end{bmatrix}$},edge label={node[midway,sloped,below]{$(132)$}}
  [,label=right:$\begin{bmatrix} 
1 & 0 & 0 \\ 
0 & 0 & 1 \\ 
0 & 1 & 0 
\end{bmatrix}$,edge label={node[midway,sloped,above]{$(23)$}}]
  [,label=right:$\begin{bmatrix} 
0 & 1 & 0 \\ 
1 & 0 & 0 \\ 
0 & 0 & 1 
\end{bmatrix}$,edge label={node[midway,sloped,below]{$(132)$}}]
 ]
]
\end{forest}}}
\]

\textit{Generator $(13)$}
\[\hspace*{-10em}\vcenter{\hbox{
\begin{forest}
for tree={grow'=east,l sep=8em,s sep=3em,circle,inner sep=2pt,fill}
[,label=left:{$(13)$}
 [,label=above:{$(132)$},edge label={node[midway,sloped,above]{$(12)$}}
  [,label=right:$(13)$,edge label={node[midway,sloped,above]{$(12)$}}]
  [,label=right:$(23)$,edge label={node[midway,sloped,below]{$(13)$}}]
 ]
 [,label=below:{$()$},edge label={node[midway,sloped,below]{$(13)$}}
  [,label=right:$(12)$,edge label={node[midway,sloped,above]{$(12)$}}]
  [,label=right:$(13)$,edge label={node[midway,sloped,below]{$(13)$}}]
 ]
]
\end{forest}}}
\rightarrow\hspace*{-10em}
\vcenter{\hbox{\begin{forest}
for tree={grow'=east,l sep=7em,s sep=4em,circle,inner sep=2pt,fill}
[,label=left:{$\begin{bmatrix} 
0 & 0 & 1 \\ 
0 & 1 & 0 \\ 
1 & 0 & 0 
\end{bmatrix}$}
 [,label=above:{$\begin{bmatrix} 
0 & 0 & 1 \\ 
1 & 0 & 0 \\ 
0 & 1 & 0 
\end{bmatrix}$},edge label={node[midway,sloped,above]{$(23)$}}
  [,label=right:$\begin{bmatrix} 
0 & 0 & 1 \\ 
0 & 1 & 0 \\ 
1 & 0 & 0 
\end{bmatrix}$,edge label={node[midway,sloped,above]{$(23)$}}]
  [,label=right:$\begin{bmatrix} 
1 & 0 & 0 \\ 
0 & 0 & 1 \\ 
0 & 1 & 0 
\end{bmatrix}$,edge label={node[midway,sloped,below]{$(132)$}}]
 ]
 [,label=below:{$\begin{bmatrix} 
1 & 0 & 0 \\ 
0 & 1 & 0 \\ 
0 & 0 & 1 
\end{bmatrix}$},edge label={node[midway,sloped,below]{$(132)$}}
  [,label=right:$\begin{bmatrix} 
0 & 1 & 0 \\ 
1 & 0 & 0 \\ 
0 & 0 & 1
\end{bmatrix}$,edge label={node[midway,sloped,above]{$(23)$}}]
  [,label=right:$\begin{bmatrix} 
0 & 0 & 1 \\ 
0 & 1 & 0 \\ 
1 & 0 & 0 
\end{bmatrix}$,edge label={node[midway,sloped,below]{$(132)$}}]
 ]
]
\end{forest}}}
\]    
\end{landscape}
        \end{document}
4

One way is the following:

  • reduce spaces in matrices with
\setlength\arraycolsep{2pt}
\renewcommand\arraystretch{0.8}
  • reduce s sep distance from 4em to 3em
  • reduce space between trees titles and trees, for example
    \textit{Generator $(13)$}
    \vspace{-\baselineskip}

Considering above I got the following result:

enter image description here

Complete MWE, which gives above result is:

\documentclass[11pt]{article}
\usepackage{forest}
\usepackage{amsmath}
\usepackage{pdflscape}

\begin{document}
    \begin{landscape}
\setlength\arraycolsep{2pt}
\renewcommand\arraystretch{0.8}
    \textit{Generator $(12)$}
    \vspace{-\baselineskip}
\[\hspace*{-10em}\vcenter{\hbox{
\begin{forest}
for tree = {grow'=east,
            l sep=7em,
            s sep=3em,
            circle,inner sep=2pt,fill,
            }
[,label=left:{$(12)$}
 [,label=above:{$()$},edge label={node[midway,sloped,above]{$(12)$}}
  [,label=right:$(12)$,edge label={node[midway,sloped,above]{$(12)$}}]
  [,label=right:$(13)$,edge label={node[midway,sloped,below]{$(13)$}}]
 ]
 [,label=below:{$(123)$},edge label={node[midway,sloped,below]{$(13)$}}
  [,label=right:$(23)$,edge label={node[midway,sloped,above]{$(12)$}}]
  [,label=right:$(12)$,edge label={node[midway,sloped,below]{$(13)$}}]
 ]
]
\end{forest}}}
\rightarrow\hspace*{-10em}
\vcenter{\hbox{\begin{forest}
for tree = {grow'=east,
            l sep=7em,
            s sep=3em,
            circle,inner sep=2pt,fill,
            font=\small}
[,label=left:{$\begin{bmatrix}
0 & 1 & 0 \\
1 & 0 & 0 \\
0 & 0 & 1
\end{bmatrix}$}
 [,label=above:{$\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}$},edge label={node[midway,sloped,above]{$(23)$}}
  [,label=right:$\begin{bmatrix}
0 & 1 & 0 \\
1 & 0 & 0 \\
0 & 0 & 1
\end{bmatrix}$,edge label={node[midway,sloped,above]{$(23)$}}]
  [,label=right:$\begin{bmatrix}
0 & 0 & 1 \\
0 & 1 & 0 \\
1 & 0 & 0
\end{bmatrix}$,edge label={node[midway,sloped,below]{$(132)$}}]
 ]
 [,label=below:{$\begin{bmatrix}
0 & 1 & 0 \\
0 & 0 & 1 \\
1 & 0 & 0
\end{bmatrix}$},edge label={node[midway,sloped,below]{$(132)$}}
  [,label=right:$\begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 1 \\
0 & 1 & 0
\end{bmatrix}$,edge label={node[midway,sloped,above]{$(23)$}}]
  [,label=right:$\begin{bmatrix}
0 & 1 & 0 \\
1 & 0 & 0 \\
0 & 0 & 1
\end{bmatrix}$,edge label={node[midway,sloped,below]{$(132)$}}]
 ]
]
\end{forest}}}
\]

    \textit{Generator $(13)$}
    \vspace{-\baselineskip}
\[\hspace*{-10em}\vcenter{\hbox{
\begin{forest}
for tree = {grow'=east,
            l sep=7em,
            s sep=3em,
            circle,inner sep=2pt,fill,
            font=\small}
[,label=left:{$(13)$}
 [,label=above:{$(132)$},edge label={node[midway,sloped,above]{$(12)$}}
  [,label=right:$(13)$,edge label={node[midway,sloped,above]{$(12)$}}]
  [,label=right:$(23)$,edge label={node[midway,sloped,below]{$(13)$}}]
 ]
 [,label=below:{$()$},edge label={node[midway,sloped,below]{$(13)$}}
  [,label=right:$(12)$,edge label={node[midway,sloped,above]{$(12)$}}]
  [,label=right:$(13)$,edge label={node[midway,sloped,below]{$(13)$}}]
 ]
]
\end{forest}}}
\rightarrow\hspace*{-10em}
\vcenter{\hbox{\begin{forest}
for tree = {grow'=east,
            l sep=7em,
            s sep=3em,
            circle,inner sep=2pt,fill,
            font=\small}
[,label=left:{$\begin{bmatrix}
0 & 0 & 1 \\
0 & 1 & 0 \\
1 & 0 & 0
\end{bmatrix}$}
 [,label=above:{$\begin{bmatrix}
0 & 0 & 1 \\
1 & 0 & 0 \\
0 & 1 & 0
\end{bmatrix}$},edge label={node[midway,sloped,above]{$(23)$}}
  [,label=right:$\begin{bmatrix}
0 & 0 & 1 \\
0 & 1 & 0 \\
1 & 0 & 0
\end{bmatrix}$,edge label={node[midway,sloped,above]{$(23)$}}]
  [,label=right:$\begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 1 \\
0 & 1 & 0
\end{bmatrix}$,edge label={node[midway,sloped,below]{$(132)$}}]
 ]
 [,label=below:{$\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}$},edge label={node[midway,sloped,below]{$(132)$}}
  [,label=right:$\begin{bmatrix}
0 & 1 & 0 \\
1 & 0 & 0 \\
0 & 0 & 1
\end{bmatrix}$,edge label={node[midway,sloped,above]{$(23)$}}]
  [,label=right:$\begin{bmatrix}
0 & 0 & 1 \\
0 & 1 & 0 \\
1 & 0 & 0
\end{bmatrix}$,edge label={node[midway,sloped,below]{$(132)$}}]
 ]
]
\end{forest}}}
\]
    \end{landscape}
\end{document}
  • Thank you for the neat solution! – Math Oct 17 at 11:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.