Manually set line numbers if prooftrees.sty?

Manually set line numbers if prooftrees.sty?

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]]]

답변1

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).

관련 정보