# How to remove the space before and after fraction line of \frac command

I find the \frac command add a space of 1.2 pt before and after a fraction. See the figure below

\documentclass{article}
\usepackage{amsmath}

\def\abc{\genfrac{}{}{0pt}{0}{0}{0}}
\def\Abc{\frac00}
\def\ruleline{\rule[-6pt]{1pt}{20pt}}
\def\D{\displaystyle}
\begin{document}

$\D0000000000$

$\D\Abc\Abc\Abc\Abc\Abc\Abc\Abc\Abc\Abc\Abc$\ruleline

$\D\abc\abc\abc\abc\abc\abc\abc\abc\abc\abc$\ruleline

$\D00000\hspace{24pt}00000$\ruleline
\end{document}


You could see even the \genfrac which hidden the fraction line also has a (double) sep space.

Could I get a \frac struction without the space (or a cumstomized space)?

As some guys like a pair of \left&\right without adding a bit additional space (see here), I think a binomial coefficient \binom should not have an invisible space.

• Now it should be ok. Sorry for that. – yo' Mar 14 '15 at 10:04

All fractions receive an additional horizontal space on both sides, with width \nulldelimiterspace (default 1.2pt) irrespective of the font size.

If you want to have fractions without this space, you can define \zfrac like below:

\documentclass{article}
\usepackage{amsmath}

\DeclareRobustCommand{\zfrac}[2]{%
\kern-\nulldelimiterspace
\genfrac{}{}{}{}{#1}{#2}%
\kern-\nulldelimiterspace
}

\setlength{\fboxrule}{0.1pt}% hairline
\fbox{\kern-\nulldelimiterspace$\displaystyle\frac{0}{0}$\kern-\nulldelimiterspace}
\fbox{\kern-\nulldelimiterspace\LARGE$\displaystyle\frac{0}{0}$\kern-\nulldelimiterspace}
\fbox{$\displaystyle\zfrac{0}{0}$}
\fbox{\LARGE$\displaystyle\zfrac{0}{0}$}