pacote semântico: instalações flutuantes com inferência aninhada

pacote semântico: instalações flutuantes com inferência aninhada

Estou digitando definir uma semântica de grande passo usando o pacote semantice seu comando \inference.

Eu uso o compilador LuaLaTeX.

Porém, quando componho mais inferencecomandos, e um deles representa um axioma, ou seja, uma regra sem premissas, a outra premissa começa a flutuar. Parece que está tentando fazer algum alinhamento vertical.

Aqui está um exemplo:

\inference[\(\mathcal{E'}=\) \textsc{EC-IfF}]
{ 
    % ------- THIS PREMISE FLOATS
    \overset{\mathcal{E'_0}}
    {
             \langle b, σ \rangle \downarrow \texttt{false}
    }
    &
    {
        \inference
        [\textsc{EC-Skip}]
        {}
        {
        \langle \texttt{skip}, σ \rangle \downarrow σ
    }
    }
}
{
            \langle
            \texttt{if } b \texttt{ then } 
            (c_0 ; \texttt{ while } b \texttt{ do } c_0)
            \texttt{ else skip}, σ
            \rangle
    \downarrow
    σ''
}

captura de tela

Responder1

No exemplo do OP, a linha de base está sendo preservada no grande “numerador”. Embora se possa argumentar que essa é a maneira correta de fazer isso, pode-se substituir esse padrão \abovebaseline[-\dp\strutbox]{...}aplicado à inferência ED-Skip.

\documentclass{article}
\usepackage{semantic,amsmath,stackengine}
\begin{document}
\inference[\(\mathcal{E'}=\) \textsc{EC-IfF}]
{ 
    % ------- THIS PREMISE FLOATS
    \overset{\mathcal{E'_0}}
    {
             \langle b, σ \rangle \downarrow \texttt{false}
    }
    &
    {
        \abovebaseline[-\dp\strutbox]{\inference
        [\textsc{EC-Skip}]
        {}
        {
        \langle \texttt{skip}, σ \rangle \downarrow σ
    }}
    }
}
{
            \langle
            \texttt{if } b \texttt{ then } 
            (c_0 ; \texttt{ while } b \texttt{ do } c_0)
            \texttt{ else skip}, σ
            \rangle
    \downarrow
    σ''
}
\end{document}

insira a descrição da imagem aqui

informação relacionada