I'm trying to write a bi-directional inference rule with a double horizontal line, using mathpartir
. The documentation says I should be able to use \mprset{fraction={===}}
as follows:
\documentclass{article}
\usepackage{mathpartir}
\begin{document}
\begin{mathpar}
\mprset{fraction={===}}
\inferrule*
{
}
{
C \rightarrow C'
}
\and
\inferrule*
{
C \rightarrow C
}
{
C \rightarrow C'
}
\and
\inferrule*
{
C \rightarrow C_{\beta}
}
{
C \rightarrow C'
}
\end{mathpar}
\end{document}
This does indeed format the rule with a double horizontal line, but it also breaks the vertical alignment, so that, in the last example above, the C \rightarrow C'
now overlaps with the double line.
See also here, Frac or inference rule with dotted line, but I would like a solution based on inferrule
if possible.
Best Answer
Three parameters to tune:
\eqgap
distance between double rule lines;\overgap
separation between the text and the rules; and\inferrulerule
thickness of two rule lines.This MWE shows it used in math mode, but it works outside of math mode, too. I don't know enough about inference rules to know, but if the math axis is aligned with the "denominator", then this MWE would work.
If the math axis is supposed to align with the rule, then this MWE would apply:
With these parameters, the following
typesets to different math styles:
If you need to regularly set this to different math styles, I can make it (at the expense of extra coding) so that the style need not be set within the arguments themselves, as it is here. So let me know if that's the case.