# Vertical dots centred in Lemmon style derivation

I would like to center vertical dots in this derivation...I tried with \center but the dots remains in the left. \align can't work in the \ND enviroment.

\documentclass{article}
\usepackage{ND}
\begin{document}
\begin{ND}[][][][][\linewidth]
\vdots
\ndl{}{$A\rightarrow B_h$}{}\label{1}
\vdots
\ndl{}{$A \rightarrow (B_h \rightarrow B_i$)}{}\label{2}
\ndl{}{$(A \rightarrow (B_h\rightarrow B_i)) \rightarrow ((A \rightarrow B_h)\rightarrow (A\rightarrow B_i))$}{$\mathscr{A}_2$}\label{3}
\ndl{} {$((A \rightarrow B_h)\rightarrow (A\rightarrow B_i))$}{\ref{2}, \ref{3}, MP}\label{4}
\ndl{} {$A \rightarrow B_i$}{\ref{1}, \ref{4}, MP}\label{5}
\end{document}


Thank you.

• Where is package ND?
– user11232
Sep 17 '15 at 9:11
• You can find it here ---> phloxgroup.wordpress.com/2010/03/22/… Sep 17 '15 at 9:20
• A version of the package is now hosted on LaTeX for Logicians at logicmatters.net/latex-for-logicians/nd, together with a copy of the manual. Possibly a later version - not sure.
– cfr
Apr 9 '16 at 2:19
• Although it is probably the same version as it says it provides ND and not nd3.
– cfr
Apr 9 '16 at 2:21
• Your code is not complete and cannot be compiled without error - even though I downloaded and installed the .sty file you're using.
– cfr
Apr 9 '16 at 2:31

Correcting the errors and substituting known commands for ones defined in different ways by packages-I-know-not-which-you're-using, you can try something like this:

\documentclass{article}
\usepackage{ND,amsmath}
\makeatletter
\newcommand{\indl}[3]{\settowidth\@NDlwtmp{\NDalist{#1}}\ifdim\@NDlwtmp > \@NDlwf \setlength\@NDlwf{\@NDlwtmp}\fi%
\settowidth\@NDrwtmp{\widthofpbox{#3}}\ifdim\@NDrwtmp > \@NDrwf \setlength\@NDrwf{\@NDrwtmp}\fi%
\newcommand\@iNDlabel[1]{\begin{minipage}[t]{\csname @NDlw\@NDident\endcsname}%
\hfill\end{minipage}\makebox[2\@NDitemsep][c]{}}
\makeatother
\begin{document}
\begin{ND}[][][][][\linewidth]
\indl{}{\vdots}{}
\ndl{}{$A\rightarrow B_h$}{}\label{1}
\indl{}{\vdots}{}
\ndl{}{$A \rightarrow (B_h \rightarrow B_i$)}{}\label{2}
\ndl{}{$(A \rightarrow (B_h\rightarrow B_i)) \rightarrow ((A \rightarrow B_h)\rightarrow (A\rightarrow B_i))$}{$\mathcal{A}_2$}\label{3}
\ndl{} {$((A \rightarrow B_h)\rightarrow (A\rightarrow B_i))$}{\ref{2}, \ref{3}, MP}\label{4}
\ndl{} {$A \rightarrow B_i$}{\ref{1}, \ref{4}, MP}\label{5}
\end{ND}
\end{document}


Personally, I wouldn't centre the dots:

\documentclass{article}
\usepackage{ND,amsmath}
\makeatletter
\newcommand{\indl}[3]{\settowidth\@NDlwtmp{\NDalist{#1}}\ifdim\@NDlwtmp > \@NDlwf \setlength\@NDlwf{\@NDlwtmp}\fi%
\settowidth\@NDrwtmp{\widthofpbox{#3}}\ifdim\@NDrwtmp > \@NDrwf \setlength\@NDrwf{\@NDrwtmp}\fi%
\newcommand\@iNDlabel[1]{\begin{minipage}[t]{\csname @NDlw\@NDident\endcsname}%
\hfill\end{minipage}\makebox[2\@NDitemsep][c]{}}
\makeatother
\begin{document}
\begin{ND}[][][][][\linewidth]
\indl{}{\vdots}{}
\ndl{}{$A\rightarrow B_h$}{}\label{1}
\indl{}{\vdots}{}
\ndl{}{$A \rightarrow (B_h \rightarrow B_i$)}{}\label{2}
\ndl{}{$(A \rightarrow (B_h\rightarrow B_i)) \rightarrow ((A \rightarrow B_h)\rightarrow (A\rightarrow B_i))$}{$\mathcal{A}_2$}\label{3}
\ndl{} {$((A \rightarrow B_h)\rightarrow (A\rightarrow B_i))$}{\ref{2}, \ref{3}, MP}\label{4}
\ndl{} {$A \rightarrow B_i$}{\ref{1}, \ref{4}, MP}\label{5}
\end{ND}
\end{document}


Download nd3.sty from http://www.logicmatters.net/latex-for-logicians/nd/

\documentclass{article}

\usepackage[pass,showframe]{geometry} % just for the example

\usepackage{mathrsfs}
\usepackage{nd3}

\makeatletter
\newcommand{\nddots}{%
\par
\hspace*{\csname @NDlw\@NDident\endcsname}%
\hspace*{2\@NDitemsep}%
$\mskip\thickmuskip\smash{\vdots}\mathstrut$%
}
\makeatother

\begin{document}

\begin{ND}[][][][][\linewidth]
\nddots
\ndl{\ref{1},\ref{2}}{$A\rightarrow B_h$}{}\label{1}
\nddots
\ndl{}{$A \rightarrow (B_h \rightarrow B_i$)}{}\label{2}
\ndl{}{$(A \rightarrow (B_h\rightarrow B_i)) \rightarrow ((A \rightarrow B_h)\rightarrow (A\rightarrow B_i))$}{$\mathscr{A}_2$}\label{3}
\ndl{}{$((A \rightarrow B_h)\rightarrow (A\rightarrow B_i))$}{\ref{2}, \ref{3}, MP}\label{4}
\ndl{}{$A \rightarrow B_i$}{\ref{1}, \ref{4}, MP}\label{5}
\end{ND}
\end{document}