Continuing http://tex.stackexchange.com/a/656192, how to center the inference rules carrying names or side conditions in the scope of \[…\]
in narrow columns? For example,
\documentclass[twocolumn]{article}
\pagestyle{empty}
\usepackage{mathpartir}
\begin{document}
\noindent A sentence introducing the first rule, which has a name and protrudes to the left:
\[%\quad\ \,\qquad%%% Ad-hoc, manually added space would mitigate the problem.
\inferrule*[Left=RULE\_NAME,Right=.]%
{\mathrm{an\ extensive\ list\ of\ antecedences}}%
{\mathrm{an\ extensive\ consequent}}
\]%
\noindent A long, extensive, lengthy, and boring text explaining the first rule in detail.\par
\noindent A sentence introducing the second rule, which has a side condition and protrudes to the right:
\[
\inferrule*[Right=a\ side\ condition.]%
{\mathrm{an\ extensive\ list\ of\ antecedences}}%
{\mathrm{an\ extensive\ consequent}}
%\qquad\qquad\qquad\qquad%%% Ad-hoc, manually added space would mitigate the problem.
\]%
\noindent A long, extensive, lengthy, and boring text explaining the second rule in detail.
\noindent A sentence introducing the third rule, which has both a name and a side condition and is not centered:
\[
\inferrule*[Left=RULE,Right=formula.]%
{\mathrm{an\ extensive\ list\ of\ antecedences}}%
{\mathrm{an\ extensive\ consequent}}
%%% Here, some unknown amount of space should be added so that the rule is really centered.
\]%
\noindent A long, extensive, lengthy, and boring text explaining the third rule in detail.
\end{document}
compiled by latex
or pdflatex
yields an output in which the inference rules with names and conditions are not centered:
Sometimes they even stick out to the margins although there would be space if the whole rule together with the name and side condition were centered.
Any way to center the rule including the stuff to its left and right?
PS. It turned out that this semantics of Left
and Right
is by design, as explained in the documentation of mathpartir. Not a bug.
\noindent