2

Feeding

\documentclass{article}
\pagestyle{empty}
\usepackage{semantic}
\begin{document}
  \setpremisesend{0pt}\setnamespace{0pt}%
  \inference{A_1\\A_2&A_3}{C_1}
  \quad
  \inference{A_4\\A_5&A_6}{C_2}%
\end{document}

to latex or pdflatex yields two inference rules which are not on the same vertical level (base line?), but the second one is below right the first one:

output

Probably, an \inference{…}{…} simply inserts a line break at the end. Why? How to set the two inference rules on the same vertical level, i.e., the second rule to the right on the first one? Or how to prevent the terminating line breaks by default?

2
  • 1
    The documentation shows some side-by-side examples with elements separated by a double backslash. I didn't dig into the code or try to test. May 3, 2023 at 19:22
  • @barbarabeeton It didn't occur to me that I could look into the source. Now I see there how they do it: \[\inference[…]{…}{…}\;\;\;\;\inference[…]{…}{…}\]. Thanks!
    – user292998
    May 4, 2023 at 4:40

1 Answer 1

0

Box them.

\documentclass{article}
\pagestyle{empty}
\usepackage{semantic}

\setpremisesend{0pt}
\setnamespace{0pt}

\begin{document}

\mbox{\inference{A_1\\A_2&A_3}{C_1}}%
\quad
\mbox{\inference{A_4\\A_5&A_6}{C_2}}

\end{document}

enter image description here

Or typeset them in math mode:

\documentclass{article}
\pagestyle{empty}
\usepackage{semantic}

\setpremisesend{0pt}
\setnamespace{0pt}

\begin{document}

\[
\inference{A_1\\A_2&A_3}{C_1}
\quad
\inference{A_4\\A_5&A_6}{C_2}
\]

\end{document}
1
  • Thanks! Following @barbarabeeton, I looked into semantic.dtx, and there the authors write \[\inference[…]{…}{…}\;\;\;\;\inference[…]{…}{…}\]. On the other hand, they also say, “So even if the declaration above has been given, \inference is never be executed in math mode.” Any preference on \mboxes in text mode vs. \[…\] for the issue at hand or is it really up to me?
    – user292998
    May 4, 2023 at 4:43

You must log in to answer this question.