LaTeX forum ⇒ GeneralTree runs off of page Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
ZooBot23
Posts: 1
Joined: Tue May 21, 2019 9:28 pm

Tree runs off of page

Postby ZooBot23 » Tue May 21, 2019 9:34 pm

  1. %\title{Using the forest package to create trees in LaTeX}
  2. % From <!-- m --><a class="postlink" href="http://tex.stackexchange.com/a/108728/23931">http://tex.stackexchange.com/a/108728/23931</a><!-- m -->
  3. \documentclass[10pt,twoside,a4paper]{memoir}
  4. \usepackage{graphicx}
  5. \usepackage{forest}
  6. \usepackage{tikz-qtree}
  7. \begin{document}
  8.  
  9.  
  10. \begin{forest} for tree={
  11. edge path={\noexpand\path[\forestoption{edge}] (\forestOve{\forestove{@parent}}{name}.parent anchor) -- +(0,-12pt)-| (\forestove{name}.child anchor)\forestoption{edge label};}
  12. }
  13. [Eukaryota
  14. [Animalia
  15. [Porifera]
  16. [Cnidaria [Mobilia [Aquaderia [Gigabellidae [Jellicent [J. ][J. ][J. ]][Tentacruel [T. vulgaris][T. polarus][T. equatorus]]]][Leviteridea [Nihileidae [Nihilego [N. ][N. ]]][Ribbonidae [Chimecho [C. ][C. ][C. ]][Driftblim [D. ][D. ][D. ]]]][Terraidea [Blacephalidae [Blacephalon [B. ][B. ]]]]]]]]
  17.  
  18. \end{forest}
  19. \end{document}


Whenever i put this code into an overleaf editor, the tree it makes starts to run off the page. is there any way to fix this? I am new to latex/related things, so i have no clue what i am actually doing here. any help will be appreciated.

User avatar
Ijon Tichy
Posts: 57
Joined: Mon Dec 24, 2018 10:12 am

Postby Ijon Tichy » Wed May 22, 2019 8:00 am

If something is to wide, you either can make it smaller:
  1. \documentclass[10pt,twoside,a4paper]{memoir}
  2. \usepackage{graphicx}
  3. \usepackage{forest}
  4. \usepackage{tikz-qtree}
  5. \usepackage{showframe}% make page areas visible (for demonstration only)
  6. \begin{document}
  7.  
  8. \tiny\noindent
  9. \begin{forest} for tree={
  10. edge path={\noexpand\path[\forestoption{edge}]
  11. (\forestOve{\forestove{@parent}}{name}.parent anchor) --
  12. +(0,-\baselineskip)-| (\forestove{name}.child
  13. anchor)\forestoption{edge label};},
  14. }
  15. [Eukaryota
  16. [Animalia
  17. [Porifera]
  18. [Cnidaria [Mobilia [Aquaderia [Gigabellidae [Jellicent,s sep=0pt
  19. [J. ][J. ][J. ]][Tentacruel, s sep=0pt
  20. [T. vulgaris][T. polarus][T. equatorus]]]][Leviteridea [Nihileidae
  21. [Nihilego,s sep=0pt [N. ][N. ]]][Ribbonidae [Chimecho,s sep=0pt
  22. [C.][C. ][C. ]][Driftblim,s sep=0pt [D. ][D. ][D. ]]]][Terraidea
  23. [Blacephalidae [Blacephalon,s sep=0pt [B. ][B. ]]]]]]]]
  24. \end{forest}
  25. \end{document}

or rotate it:
  1. \documentclass[10pt,twoside,a4paper]{memoir}
  2. \usepackage{graphicx}
  3. \usepackage{forest}
  4. \usepackage{tikz-qtree}
  5. \usepackage{showframe}% make page areas visible (for demonstration only)
  6. \begin{document}
  7. \noindent\rotatebox{90}{%
  8. \begin{forest} for tree={
  9. edge path={\noexpand\path[\forestoption{edge}]
  10. (\forestOve{\forestove{@parent}}{name}.parent anchor) --
  11. +(0,-\baselineskip)-| (\forestove{name}.child
  12. anchor)\forestoption{edge label};},
  13. }
  14. [Eukaryota
  15. [Animalia
  16. [Porifera]
  17. [Cnidaria [Mobilia [Aquaderia [Gigabellidae [Jellicent
  18. [J. ][J. ][J. ]][Tentacruel
  19. [T. vulgaris][T. polarus][T. equatorus]]]][Leviteridea [Nihileidae
  20. [Nihilego,s sep=-5pt [N. ][N. ]]][Ribbonidae [Chimecho,s sep=-5pt
  21. [C.][C. ][C. ]][Driftblim,s sep=-5pt [D. ][D. ][D. ]]]][Terraidea
  22. [Blacephalidae [Blacephalon, [B. ][B. ]]]]]]]]
  23. \end{forest}}
  24. \end{document}

lehnard
Posts: 1
Joined: Fri May 31, 2019 11:09 am

Postby lehnard » Fri May 31, 2019 11:10 am

Thanks!
Those slots are my passion. And online baccarat is the best one. I can't ask for more. That's what it is.


Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests