🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text.tex
Article #73

HELP: Macro for fraction

#73
From: Muhammad Masroor Ali
Date: Thu, 29 Oct 1992 00:04
46 lines
1970 bytes
Hello all,

I am looking for a macro to print the fractions inside texts.

Yes, there is a macro called \frac on page 311 of TeXbook, but 
with that macro, you always get a fixed font (\scriptfont0)
for the fractional part, which looks quite awefull when you use
more than one font for text. 


To overcome this problem, I incorporate the \scriptfont0
definition to the font definition. For example, to use 
cmr12 and cmss12 for my texts, I write,


\font\cmrText = cmr12
\font\cmrFrac = cmr8
\def\cmrTwelve{\cmrText\scriptfont0 = \cmrFrac}


\font\cmssText = cmss12
\font\cmssFrac = cmss8
\def\cmssTwelve{\cmssText\scriptfont0 = \cmssFrac}



But I don't like this approach because whenever you want to use
a new font, you have got to go through the process of defining
the `fraction' font for it. 

Could anybody please suggest a better way of using this macro
or a new macro to handle fractions?

Thanks in advance,
--
   -----------------------------------------------------------------------
    Who says `Nothing' is impossible? I am doing nothing throughout years. 
   _______________________________________________________________________

    masroor@human.ai.kyushu-u.ac.jp (Muhammad Masroor Ali)
    Department of Computer Science and Communication Engineering
    Faculty of Engineering, Kyushu University
    Fukuoka, 812 JAPAN

    
        
Technical Details
Message-ID: <MASROOR.92Oct29090440@human.ai.kyushu-u.ac.jp>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!swrinde!elroy.jpl.nasa.gov!ames!sun-barr!sh.wide!wnoc-kyo!kyu-cs!inunaki.csce.kyushu-u!masroor

Show Full Headers
Complete Article Headers
Newsgroups: comp.text.tex
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!swrinde!elroy.jpl.nasa.gov!ames!sun-barr!sh.wide!wnoc-kyo!kyu-cs!inunaki.csce.kyushu-u!masroor
From: masroor@human.ai.kyushu-u.ac.jp (Muhammad Masroor Ali)
Subject: HELP: Macro for fraction
Message-ID: <MASROOR.92Oct29090440@human.ai.kyushu-u.ac.jp>
Sender: news@csce.kyushu-u.ac.jp (USENET News System)
Distribution: comp.text.tex
Date: Thu, 29 Oct 1992 00:04:40 GMT
Organization: Dept. of Comp. Sci. and Comm. Eng., Kyushu Univ., Fukuoka, Japan
X-Bytes: 1357
Lines: 46