3

I'd like to have two forest in one row. Unfortunately it is slightly over the page margin. I am new in latex. Do you have any suggestions for me?

\documentclass[a4paper,12pt,DIV=15,BCOR=12mm,oneside,numbers=noenddot,leqno,headsepline,headings=small]{scrbook}
\setlength{\parskip}{0pt}

\usepackage{linguex}
\usepackage{multicol}
\usepackage{forest}

\begin{document}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit in~\ref{ex: test2}, At vero eos et accusam et justo duo dolores et ea  in~\ref{ex: test3}.

\begin{multicols}{2}
\ex. \label{ex: test1} \a. 
\begin{forest}  baseline,
        [
   [tester3,l*=3]
   [
 [tester2,l*=2]
 [
   [tester]
   [tester]
 ]]]
\label{ex: test2}
    \end{forest}
\b.\begin{forest}  baseline,
     [ [ [
   [tester]
     [tester]
   ]
  [tester2,l*=2]
        ]
 [tester3,l*=3]
  ]
\label{ex: test3}
    \end{forest}

\end{multicols}
\end{document}
1
1

Welcome to TeX.SE! There are many options, but given the shapes of your trees I would suggest that shifting them to the left and making the horizontal distance between the items a bit smaller may already be sufficient.

\documentclass[a4paper,12pt,DIV=15,BCOR=12mm,oneside,numbers=noenddot,leqno,headsepline,headings=small]{scrbook}
\setlength{\parskip}{0pt}

\usepackage{linguex}
\usepackage{multicol}
\usepackage{forest}

\begin{document}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit in~\ref{ex: test2}, At vero eos et accusam et justo duo dolores et ea  in~\ref{ex: test3}.

\begin{multicols}{2}
\ex. \label{ex: test1} 
\a.\hspace*{-3mm}\begin{forest}  
baseline,
for tree={s sep=1mm}
        [
   [tester3,l*=3]
   [
 [tester2,l*=2]
 [
   [tester]
   [tester]
 ]]]
\label{ex: test2}
    \end{forest}
\b.\hspace*{-3mm}\begin{forest}
baseline,
for tree={s sep=1mm}
     [ [ [
   [tester]
     [tester]
   ]
  [tester2,l*=2]
        ]
 [tester3,l*=3]
  ]
\label{ex: test3}
    \end{forest}

\end{multicols}
\end{document}

enter image description here

2
  • I am sorry. I also use "pretty nice empty nodes". Where should I include the s sep and \hspace? link – Sven Sep 30 '18 at 20:41
  • @Sven s sep goes into for tree and \hspace* is a rather brutal fix that goes in front of \begin{forest}, just like in my code. Wouldn't it be better if you posted the tree that you want to use if you have these questions? – user121799 Sep 30 '18 at 21:06
1

You could just reduce the padding in each node. Here I zero it, which may be a bit extreme, but you can adjust the value as required.

\documentclass[a4paper,12pt,DIV=15,BCOR=12mm,oneside,numbers=noenddot,leqno,headsepline,headings=small]{scrbook}
    % \setlength{\parskip}{0pt}% Don't do this!!
\usepackage{linguex}
\usepackage{multicol}
\usepackage[linguistics]{forest}

\begin{document}

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit in~\ref{ex: test2}, At vero eos et accusam et justo duo dolores et ea  in~\ref{ex: test3}.




\begin{multicols}{2}
\ex. \label{ex: test1} \a. 
\begin{forest}
  where n children=0{tier=terminus}{} ,before drawing tree={ tempdima/.max={>O{y}}{fake=root,leaves}, delay={where n children=0{y/.register=tempdima}{}} },  for tree={inner sep=0pt}
  [
  [tester3]
  [
  [tester2]
  [
  [tester]
  [tester]
  ]]]
  \label{ex: test2}
\end{forest}%
\b.\begin{forest}
  where n children=0{tier=terminus}{} ,before drawing tree={ tempdima/.max={>O{y}}{fake=root,leaves}, delay={where n children=0{y/.register=tempdima}{}} },  for tree={inner sep=0pt}
  [ [ [
  [tester]
  [tester]
  ]
  [tester2,l*=2]
  ]
  [tester3,l*=3]
  ]
  \label{ex: test3}
\end{forest}

\end{multicols}
\end{document}

roomier?

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.