0

Is it possible to manually set the line number in a prooftrees tableau? Or suppress the line numbers for an individual line? I'd like to have something like

1  A_1
   \vdots
n  A_n

produced perhaps by something like

[A_1 [\vdots, no line no [A_n, line no=n]]]
2
  • 3
    Please post a complete minimal document that shows what you're doing.
    – Alan Munn
    Feb 18, 2018 at 17:24
  • You could hack something by abusing \linenumberstyle{}. Or you could do something less hackish but more work.
    – cfr
    Feb 18, 2018 at 23:45

1 Answer 1

3

Please provide a minimal working example next time as this is much more helpful than a couple of code fragments.

You can set the line number manually provided you do it sufficiently late in Forest's processing of the tree specification.

For example,

\documentclass[border=10pt]{standalone}
\usepackage{prooftrees}
\forestset{
  line no override/.style={
    before drawing tree={
      for name/.process={Ow}{proof tree proof line no}{line no ##1}{
        content=\linenumberstyle{#1},
        typeset node,
      },
    },
  },
  no line no/.style={
    before drawing tree={
      for name/.process={Ow}{proof tree proof line no}{line no ##1}{
        content=,
        typeset node,
      },
    },
  },
}
\begin{document}
\begin{prooftree}{}
  [P \land Q
    [\vdots, no line no
      [Q,  line no override=n
      ]
    ]
  ]
\end{prooftree}
\end{document}

override line number for specific line

I might add this next time, as it is simple enough, but probably can't hurt anything (much).

2
  • Thanks so much (and also for writing that package to begin with)!
    – rzach
    Feb 20, 2018 at 4:44
  • @rzach You're welcome. I'll probably add it to an update. The styles are simple enough and they don't obviously have the potential to hurt anything if not used. (So I'm not likely to make things not work which did work.) Note that the timing here is crucial: it really matters that the styles override the default numbers very, very, very late. In fact, what happens is that prooftrees typesets the numbers first and then they get overridden later. This means that you shouldn't put anything much bigger there e.g. n is fine, but number might not be.
    – cfr
    Feb 20, 2018 at 4:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .