[texhax] large forward slash

Axel E. Retif axel.retif at mac.com
Mon Jun 8 06:12:49 CEST 2009


On  7 Jun, 2009, at 08:19, John Culleton wrote:

> On Saturday 07 February 2009 16:48:16 Zbigniew Nitecki wrote:
>> I am trying to write a fraction whose numerator and denominator are
>> both fractions;  for clarity, I would like the global fraction to
>> be constructed in the a/b style (that is, numerator and denominator
>> separated by a forward slash).  However, the slash produced by "/"
>> is too small.  Is there a way to create a larger version?
>>
>> Zbigniew Nitecki
>> Department of Mathematics
>> Tufts University
>> Medford, MA 02155
>
> You could try
> $a/b$
> which might give you a slash comparable to the size of a and b.  That
> is what I do.

Reading this, I recalled a Ross Moore reply to the TeX on Mac OS X  
mailing list, which you can see here (yes, 2004):

http://tug.org/pipermail/macostex-archives/2004-April/005417.html

Crudely adapting his code, one can construct something like this:

\documentclass[11pt]{article}

\newcommand{\fracoffrac}[2]{\mathchoice
  {\raise.25ex\hbox{$#1$}\hbox{\large$\mkern-2mu/\mkern-2mu$}\lower. 
25ex\hbox{$#2$}}%
  {\raise.25ex\hbox{\small$#1$}\hbox{$\large\mkern-1mu/\mkern-2mu$} 
\lower.25ex\hbox{\small$#2$}}%
  {\raise.15ex\hbox{\small$\scriptstyle#1$}/\lower.15ex\hbox{\small$ 
\scriptstyle#2$}}%
  {\raise.1ex\hbox{\small$\scriptscriptstyle#1$}/\lower.1ex\hbox{\small 
$\scriptscriptstyle#2$}}%
}

\begin{document}

\[
\fracoffrac{\frac{1}{2}}{\frac{3}{4}}
\]

In text mode: $\fracoffrac{\frac{1}{2}}{\frac{3}{4}}$, and some more  
text.

\end{document}

Best,

Axel


More information about the texhax mailing list