1

I would like to typeset a fraction without the fraction bar. In the following MWE, I try to do this using substack command from the mathtools package. But, as you can see in the output, the spacing is not the same as in the original fraction. How can I typeset a fraction without the fraction bar (not necessarily using mathtools?

\documentclass[oneside,11pt]{book}

\usepackage[semibold,tt=false]{libertine}
\usepackage{libertinust1math}
\usepackage[T1]{fontenc}
\usepackage[
  expansion = false ,
  tracking = smallcaps ,
  letterspace = 40 ,
  final
]{microtype}
\usepackage[font={sf,small},labelsep=quad,labelfont=sc]{caption}
\usepackage[subrefformat=parens]{subcaption}
\usepackage{mathtools}
\usepackage{etoolbox}
\begin{document}

$\frac{1}{2}$
$\substack{1\\2}$

\end{document}

frac

1

1 Answer 1

5

Use amsmath's \genfrac command. (This is how \binom is defined.)

It takes quite a few arguments: \genfrac{<left>}{<right>}{<width>}{<style>}{<numerator>}{<denominator>}

  • <left> is the delimiter to be used on the left. In the case of \binom it is (
  • <right> is the delimiter on the right.
  • <width> is the width of the rule that runs between the numerator and denominator.
  • <style> is to override defaults and force the fraction to be set in \displaystyle, \textstyle etc.

So what you want can be accomplished by \genfrac{}{}{0pt}{}{1}{2}.

If you are going to use it a lot, defined a command:

\newcommand{\nobarfrac}{\genfrac{}{}{0pt}{}}

should do the trick. Call it with \nobarfrac{1}{2}.

1

You must log in to answer this question.

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