I just came across the rather useful nd3 package. However, it seems not to work correctly with the hyperref package since it redefines the \ref command. Without hyperref this package is pretty useless in a professional document, at least for me. Does anybody know of any fix to make the two work?

A simple MWE:




\noindent ${(P \to Q), \Big((\neg Q) \lor R\Big), (R \iff S)} \vdash (P \to S)$

    \ndl{}{$P \to Q$}{Premise} \label{PimpliesQ}
    \ndl{}{$(\neg Q) \lor R$}{Premise} \label{notQorR}
    \ndl{}{$R \iff S$}{Premise} \label{RiffS}
    \ndl{}{\textcolor{red}{$(R \to S) \land (S \to R)$}}{\ref{RiffS}, $\iff$, Equivalence} \label{RimppliesSandSimpliesR}

  • 1
    Is it nd3 or ND? I don't find a nd.sty or nd3.sty or ND.sty file in my up-to-date TL 2017 distribution. texdoc nd provides a LaTeX tutorial in French language, so this seems not related to a package of the same name – user31729 Oct 19 '17 at 8:46
  • 1
    @ChristianHupfer - Assuming the OP is interested in Lemmon-style natural deduction proofs, the LaTeX package file nd3.sty -- which contains the statement \ProvidesPackage{ND} along with an environment called ND and a macro called \ndl -- may be obtained from here. For sure, the nd3 package redefines both \label and \ref, which all but guarantees that it'll be incompatible with both hyperref and cleveref. – Mico Oct 19 '17 at 9:15
  • 1
    @ChristianHupfer Mico is correct. In case it is not obvious I have also provided a link to the package in my post. And yes the problem is exactly what he has pointed out. – K G Oct 19 '17 at 9:26
  • 1
    @Mico: Tell that the O.P ;-) He is responsible of providing the link to non-standard packages – user31729 Oct 19 '17 at 16:45
  • @KG - Just to clarify: The link you provided is to a version of the package's user guide, not to the style file. – Mico Oct 19 '17 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.