2

I am looking at different options to typeset proof trees, and be helped by What is the best package out there to typeset proof trees?

A question I don't see any hint therein is about whether there are tools to display very large proof trees (hundreds of nodes). I am speculating/dreaming about a tool to navigate a proof tree up and down (kind of what we do with google maps). Is there anything you may think of which could be suitable for doing that? How would you go to get something workable?

-------- second update

Thanks to cfr, I learnt about varwidth (without which it seems we get error messages: Something's wrong--perhaps a missing \item. \begin{prooftree}, why so?). Still, for a large number of proof steps, I get a cropped proof tree. I understand I may adjust the border's value, by trial and error. Question is: is there a way to ask latex to calculate the best value, for each given proof tree? Or at least, is there a way to know such value somehow in advance? (for the example below, border=125pt is good enough)

\documentclass[border=10pt,varwidth]{standalone}
\usepackage{bussproofs}
\begin{document}
\begin{prooftree}
\AxiomC{A}
\UnaryInfC{B}
\AxiomC{C}
\BinaryInfC{D}
\AxiomC{E}
\AxiomC{F}
\BinaryInfC{G}
\UnaryInfC{H}
\BinaryInfC{J}
\AxiomC{A}
\UnaryInfC{B}
\AxiomC{C}
\BinaryInfC{D}
\AxiomC{E}
\AxiomC{F}
\BinaryInfC{G}
\UnaryInfC{H}
\BinaryInfC{J}
\BinaryInfC{JJ}
\AxiomC{A}
\UnaryInfC{B}
\AxiomC{C}
\BinaryInfC{D}
\AxiomC{E}
\AxiomC{F}
\BinaryInfC{G}
\UnaryInfC{H}
\BinaryInfC{J}
\AxiomC{A}
\UnaryInfC{B}
\AxiomC{C}
\BinaryInfC{D}
\AxiomC{E}
\AxiomC{F}
\BinaryInfC{G}
\UnaryInfC{H}
\BinaryInfC{J}
\BinaryInfC{JJ}
\BinaryInfC{JJJ}
\end{prooftree}
\end{document}
  • 3
    You could use the standalone class and get a (very large) single page PDF. Navigation is then like any PDF, either scrolling or dragging. – Torbjørn T. Jun 29 '18 at 19:03
  • 2
    Does this have anything to do with TeX? If so, see the LaTeX for Logicians site at logicmatters. If not, your question is off-topic. (Something google-map like is probably not best done with software designed for producing printed pages.) – cfr Jun 30 '18 at 2:05
  • 1
    @marmot Forest isn't great for this kind of proof tree. – cfr Jun 30 '18 at 22:16
  • 1
    What would be the point of having an MWE which met the description 'some kind of large diagram/formula'? Would that really be at all helpful. If so, take any MWE on the site based on standalone and make the font size something enormous, ensure you're using a scalable font and you've got the example you requested. – cfr Jul 1 '18 at 18:35
  • 2
    You have an extra curly bracket: \end{prooftree}}. – cfr Jul 1 '18 at 19:41
2

Following Steven B. Segletes's solution, we can simply add varwidth:

\documentclass[border=10pt,varwidth]{standalone}
\usepackage{bussproofs}
\begin{document}
  \begin{prooftree}
    \AxiomC{A}
    \UnaryInfC{B}
    \AxiomC{C}
    \BinaryInfC{D}
    \AxiomC{E}
    \AxiomC{F}
    \BinaryInfC{G}
    \UnaryInfC{H}
    \BinaryInfC{J}
  \end{prooftree}
\end{document}

<code>bussproofs</code> <code>prooftree</code> in <code>standalone</code>

  • @ cfr [border=10pt,varwidth] avoids error messages (fine! how so?). However, for a larger number of proof steps, I get a cropped proof tree. Please try with my new example. Let me know. – mario Jul 2 '18 at 15:43
  • @mario I just followed the solution in the link. Maybe leave a comment asking there. The border=10pt is irrelevant: it was just to make it easier to take a screenshot of the tree bit and isn't part of the solution. Only the varwidth is doing anything. – cfr Jul 2 '18 at 23:19
  • For the cropping, i don't know enough about either standalone or bussproofs. Clearly, it loses track somehow, but I'm not sure of the how. – cfr Jul 2 '18 at 23:22
  • border=10pt is not irrilevant, since for =125pt the proof tree does not get cropped. Should I ask a separate question? – mario Jul 4 '18 at 13:19
  • @mario It is irrelevant in the sense that it doesn't prevent the original error (varwidth does that) and it does not prevent cropping except by chance (i.e. you ask for a big enough border for your image to fit, even though it would otherwise get cropped). I think it would be good to ask a new question and to link to your question here: I have no idea how to answer the cropping part, but I'm not sure I should delete this since it does show how to prevent compilation failure with standalone and bussproofs. But if you'd rather I deleted this, I will. O/w I'd make your current question two. – cfr Jul 4 '18 at 16:22

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.