[OS X TeX] extendible quotients

Ross Moore ross at ics.mq.edu.au
Tue Apr 20 05:38:59 CEST 2004


On 18/04/2004, at 10:04 AM, Luis Sequeira wrote:

> Hi,
>
> I would like to be able to typeset quotients - such as quotient vector  
> spaces or groups - that behave similarly to fractions, i.e.,  
> automatically extending, according to their parameters: e.g. the size  
> and position of the slash depends on what lies above and below. For  
> example,  I would like to represent a quotient of quotients, such as  
> $(S/R)/(T/R)$ with the middle slash being larger, and (S/R) lying  
> slightly above it, while (T/R) lies slightly below (the way one would  
> normally do it by hand).
>
> Is there an effective way to achieve this? (Sorry for the OT post, but  
> there is so much knowledge on this list and I couldn't find info on  
> this)

Try the following:

\documentclass[11pt]{article}

\newcommand{\quotgp}[2]{\mathchoice
   {\raise.25ex\hbox{$(#1)$}\hbox{\large$/$}\lower.25ex\hbox{$(#2)$}}%
   {\raise.25ex\hbox{\small$(#1)$}/\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}
Here is what it looks like  $\quotgp{S/R}{T/R}$ when inline,

displayed, and in superscripts:
\begin{eqnarray*}
&&\quotgp{S/R}{T/R}\\
&&\mathcal{A}^{\quotgp{S/R}{T/R}}\\
&&X_{\mathcal{A}^{\quotgp{S/R}{T/R}}}
\end{eqnarray*}
\end{document}

You can adjust the raise/lower amounts if you don't like
the values I've chosen here.


Hope this helps.

	Ross

>
> TIA
> -----------------------------------------------------
> Please see <http://www.esm.psu.edu/mac-tex/> for list
> guidelines, information, and LaTeX/TeX resources.
>
>
>
------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia                                  fax: +61 +2 9850 8114
------------------------------------------------------------------------

-----------------------------------------------------
Please see <http://www.esm.psu.edu/mac-tex/> for list
guidelines, information, and LaTeX/TeX resources.





More information about the macostex-archives mailing list