2

This may seem like a strange question, but is it possible to create tree edges connecting paragraphs? I've seen examples of TikZ being able to create trees with images and text nodes, but I'm not sure if it's possible to do this with paragraphs in LaTeX.

an example of tree nodes
(source: tldp.org)

I want to produce something similar to this, with a few exceptions:

  • The paragraphs would be stacked vertically, just like any other document.
  • The indentation level would mark a new child node.
  • The next child wouldn't start immediately to the right (like usr -> X11R6), but below the parent.

I used paint.net to make a pretty crude example of what I'm trying to accomplish:

crude practical example using paint.net

  • 1
    What should happen at page breaks? That is, this would be straightforward on a single page. But page breaks are a different issue. I guess one possibility would be to use a list to position the paragraphs and then draw the lines using positions marked with tikzmarks or something. But manual page breaks would be a pain, wouldn't they? – cfr Nov 19 '14 at 1:03
  • @cfr: yeah, they would be a pain. I don't use any manual page breaks in the document anyways, they're only the auto-generated ones when the content of one page spills to the next. I would have no problem with a line breaking at the bottom of one page and beginning at the next. Would this work with the method you explained? – Nickolas Peter O'Malley Nov 19 '14 at 1:07
  • 1
    No. The problem is that I think you would need manual page breaks. A tikzpicture can be used to draw things. But it needs to fit on the page. – cfr Nov 19 '14 at 1:27

Your Answer

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

Browse other questions tagged or ask your own question.