Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

The macro \frac add a gap (approx 1.2pt) before and after the whole fraction. You could compare

\[\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}\]

and

\newcommand{\mycmd}{\hskip1.2pt1\hskip1.2pt}
\[\mycmd\mycmd\mycmd\mycmd\mycmd\mycmd\mycmd\mycmd\]

Even, the \genfrac command (setting the third arguement to "0pt") has still keep the gaps back:

\newcommand{\myfrac}{\genfrac{}{}{0pt}{0}{1}{1}}
\[\myfrac\myfrac\myfrac\myfrac\myfrac\myfrac\myfrac\myfrac\]

though the horizontal rule is invisible.

The gaps takes some problems:

  1. If we use a huge font (e.g. set \fontsize to 20pt), the numerator/denominator does not match the fractional line in the projecting.
  2. If we write a binomial coefficient, the gaps are not necessity.

So, a customized command \newfrac without the gaps is beneficial.

share|improve this question

1 Answer 1

up vote 11 down vote accepted

TeX has a concept of a generalized fraction with delimiters. In case of \frac, there is a rule but no delimiters. Then TeX surrounds the fraction by a space of \nulldelimiterspace. Default is 1.2 pt.

\documentclass{article}
\begin{document}
\[
  \setlength{\nulldelimiterspace}{0pt}
  \frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}
  \frac{1}{1}\frac{1}{1}\frac{1}{1}\frac{1}{1}
\]
\end{document}

Result

share|improve this answer
    
You answered quickly. Thank you. –  name abc Jun 26 at 16:39
    
Why \setlength{\nulldelimiterspace}{20pt}\binom{m}{n}\binom{m}{n} or \setlength{\nulldelimiterspace}{20pt}\genfrac{(}{)}{0pt}{0}{m}{n}\genfrac{(}{)}‌​{0pt}{0}{m}{n}are invalid? –  name abc Jun 26 at 16:57
    
@nameabc: It is not invalid; \nulldelimiterspace is not used, because there are delimiters that are used instead. –  Heiko Oberdiek Jun 26 at 17:01
    
I see. Thank you. –  name abc Jun 26 at 17:06
2  
One can change it in the middle of the formula but the last value is used for all fractions. –  wipet Jun 26 at 19:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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