I'm trying to display some axioms and operational rules with LaTeX.

Those are basically . They work quite well when used with frac, but it's not really nice, I'd like the fraction line to be a bit longer.

I know that sounds a bit vague, so here is a picture of what I am trying to achieve. I'm pretty sure that document has been typeset in LaTeX, so it should be doable. Photo of what I am trying to achieve

5 Answers 5

    #1 \\
  • Thanks. I wanted to give it a little more space under the line (the letters over the arrows now almost touch it) so I tried: \newcommand\bigfrac[2]{\begin{array}{c}#1\\\hline\vspace{1pt}#2\end{array}} but that just increased the space between the two lines in the picture. Jun 25, 2011 at 12:55
  • 2
    Add \begingroup\setlength\extrarowheight{1pt} before \begin{array} and \endgroup after \end{array}. Load the array package.
    – egreg
    Jun 25, 2011 at 12:59

Here's an extended version of \frac, supporting an optional argument for a wider line:

  \frac{x}{y} \quad \frac[5pt]{x}{y}

enter image description here

Of course you can define your own frac command similar instead of redefining the existing \frac, also with a default value bigger than 0pt.

The definition is similar to the definition in amsmath.sty, except that file is using \@@over.

Or, you could define your own macro using the original \frac:

\widefrac{x}{y} ... \widefrac[8pt]{x+y}{y}
  • 3
    Note that the use of \over together with amsmath will lead to Package amsmath Warning: Foreign command \over. Jun 25, 2011 at 13:23
  • 2
    With amsmath the command \@@over can be used instead, exactly in the same way plus \makeatletter and \makeatother. amsmathdefines: \@saveprimitive\over\@@over.
    – Stefan Kottwitz
    Jun 25, 2011 at 13:26
  • Why not restore the old \frac and use it here? Or use \genfrac provided by amsmath.
    – Leo Liu
    Jun 25, 2011 at 17:25
  • 1
    @Leo: added an example re-using \frac. Of course it could be done similar with \genfrac.
    – Stefan Kottwitz
    Jun 25, 2011 at 17:51

In case you really want fractions with a longer line, you can just pad both numerator and denominator with spaces. (Padding the longer of the two would acually suffice.) \frac{\ a\ }{\ b\ } gives

For a longer line use, e.g., \quad instead of \ .

  • OK, Stefan just posted a better version of this. Jun 25, 2011 at 13:21
  • Stefan's solution is better, but your solution is simpler.
    – vesszabo
    Dec 27, 2019 at 17:30

You should consider to use a dedicated package to write your axioms; the bussproofs package could be an option:




  \AxiomC{$x\LArrow x^\prime$}
  \UnaryInfC{$x+y\LArrow x^\prime$}


enter image description here

To work with displayed math environments, a better option would be to use the proof package. A little example:




  \infer{\PA x+y\LArrow x^\prime\PA}{x\LArrow x^\prime}
  \infer{\PA x+y\LArrow y^\prime\PA}{y\LArrow y^\prime}
  \infer{\PA x+y\, \downarrow\PA}{x\,\downarrow}
  \infer{\PA x+y\, \downarrow\PA}{y\,\downarrow}


enter image description here

  • Looks better, but I don't need more functionality than the answer above provided. Plus, I can't get it to work in a displaymath environment. Jun 25, 2011 at 13:04
  • Interesting ! a discover for me Jun 25, 2011 at 13:06
  • @Tim van Dalen: see my updated answer. Jun 25, 2011 at 13:51

Another solution is to use the \phantom{} command, which renders the exact whitespace the exact same size as its argument.

For example,


\varphi &= 1+ \frac{1}{1 + \cfrac{1}{\varphi}}\\[.5cm]
\varphi &= 1+ \frac{ \phantom{\longrightarrow} 1 \phantom{\longrightarrow} }{1 
+ \cfrac{1}{\varphi}}


which returns

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .