6

This latex code (uses amsmath and proof) produces the image below:

\documentclass{article}
\usepackage{proof}
\usepackage{amsmath}
\begin{document}
\begin{equation*}
  \infer[\forall x \mathrm{i}]{\forall x \phi}{%
    \boxed{x_0 \quad \mbox{\infer*{\phi\lbrack x_0/x \rbrack}{}}}
  }
\end{equation*}
\end{document}

wrong alignment

How can I make the x_0 align to the top of the \boxed?

6

The reference point of an \infer box is at the bottom. You can change its vertical alignment with adjustbox; I show three versions.

\documentclass{article}
\usepackage{amsmath,proof,adjustbox,calc}

\begin{document}
\[
\infer[\forall x \mathrm{i}]
  {\forall x \phi}
  {%
   \boxed{
     x_0
     \quad
     \begin{adjustbox}{valign=t,raise=-.6ex}
       \infer*{\phi[x_0/x]}{}
     \end{adjustbox}
   }%
  }
\qquad
\infer[\forall x \mathrm{i}]
  {\forall x \phi}
  {%
   \boxed{
     x_0
     \quad
     \begin{adjustbox}{valign=t}
       \infer*{\phi[x_0/x]}{}
     \end{adjustbox}
   }%
  }
\qquad
\infer[\forall x \mathrm{i}]
  {\forall x \phi}
  {%
   \boxed{
     x_0
     \quad
     \begin{adjustbox}{valign=T}
       \infer*{\phi[x_0/x]}{}
     \end{adjustbox}
   }%
  }
\]
\end{document}

enter image description here

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.