0

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.

5
  • Where is package ND?
    – user11232
    Sep 17, 2015 at 9:11
  • You can find it here ---> phloxgroup.wordpress.com/2010/03/22/…
    – Matteo
    Sep 17, 2015 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, 2016 at 2:19
  • Although it is probably the same version as it says it provides ND and not nd3.
    – cfr
    Apr 9, 2016 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, 2016 at 2:31

2 Answers 2

1

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%
\par\@iNDlabel{#1}\begin{minipage}[t]{\@NDboxwidth}\mbox{}\hfill#2\hfill\mbox{}\end{minipage}\@NDrules{#3}\par\addvspace{\parsep}}
\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}

centred dots, Lemmon style

Personally, I wouldn't centre the dots:

non-centred 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%
\par\@iNDlabel{#1}\begin{minipage}[t]{\@NDboxwidth}\hskip 1.5em #2\end{minipage}\@NDrules{#3}\par\addvspace{\parsep}}
\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}
1

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$%
  \par\addvspace{\parsep}%
}
\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}

enter image description here

You must log in to answer this question.

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