5

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

enter image description here

\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
7

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
\setlength{\fboxsep}{0pt}% no padding

\begin{document}

\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}$}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.