# A symbol for the quotient of two objects

One often needs a symbol to denote the quotient of two (algebraic) objects (e.g. quotient by a subgroup, subring, submodule etc.). In simple cases people use A/B. But when both A and B are complicated to write, this doesn't look good. e.g. \mathcal{O}_{(V',0)}/\mathcal{O}_{(V,0)}

For some reason, people do not use just \frac{A}{B}. Is there some way to achieve the following:

$A$ raised a bit, then \Big/ then $B$ a bit lowered.

• Mar 1 '15 at 13:49

How about using \left, \right, and \raisebox?

\newcommand{\bigslant}[2]{{\raisebox{.2em}{$#1$}\left/\raisebox{-.2em}{$#2$}\right.}}

$$\bigslant{\mathcal{O}_{(V',0)}}{\mathcal{O}_{(V,0)}}$$


which gives

The only problem is that I need to re-enter mathmode inside the \raiseboxes. Anyone know how to avoid that?

• Would it not be a better solution to make the slash a mid, as opposed to a left delimiter, as in: \left.\raisebox{.2em}{$#1$}\mid/\raisebox{-.2em}{$#2$}\right. Note that this requires the amsmath package. Jun 14 '11 at 18:32
• Sorry, that \mid should have been \middle. Jun 14 '11 at 19:08
• Yes, I agree, using middle is a better idea. Jun 26 '11 at 6:11
• The problem with this solution, is that the parameters are interpreted as inline command. E.g. if I write \bigslant{\bigcup_{n \in \mathbb N} S_n}{\sim} the indices are written aside the \bigcup symbol, instead of under it. Do you know how to avoid it? Mar 19 '12 at 12:54
• Nevermind, I found a solution. I use \bigcup\limits_{n \in \mathbb N}. Mar 19 '12 at 13:02

If you want to invoke the Someone Else's Problem principle, there's also the faktor package, which ostensibly was designed to do what you want, and which implements using the AMS symbol \diagup. But IMHO the slash is a bit small.

For in-line expressions, you can also consider the nicefrac package, which makes both the "denominator" and "numerator" small.

• Oct 27 '10 at 16:16
• The current thing to use instead of nicefrac is apparently xfrac. Oct 27 '10 at 20:44
• Thanks for mentioning my package. I'll have a look on what can be done against the too small slash. Jul 31 '11 at 4:36

As already mentioned, there are two packages to solve this problem:

• xfrac - typeset fractions in the form n/d generally
• faktor - especially to typeset factor structures

Here is a comparison between the \sfrac{n}{d} and \faktor{n}{d} commands which also demonstrates how they behave in comparison to normal text:

\documentclass[12pt,preview, border={2pt,2pt,2pt,2pt}]{standalone}
\usepackage[english]{babel}
\usepackage{xfrac}
\usepackage{amsmath}
\usepackage[amsmath,thmmarks,standard]{ntheorem}
\usepackage{faktor}

\begin{document}
\begin{alignat*}{4}
\text{This } &\sfrac{\mathcal{O}_{(V',0)}}{\mathcal{O}_{(V,0)}} &\text{ and this } &\sfrac{\mathcal{S}^n}{\equiv_m} &\text{ and this } &\sfrac{A}{B} &&\text{ is \texttt{sfrac}.}\\
\text{This } &\faktor{\mathcal{O}_{(V',0)}}{\mathcal{O}_{(V,0)}} &\text{ and this } &\faktor{\mathcal{S}^n}{\equiv_m} &\text{ and this } &\faktor{A}{B} &&\text{ is \texttt{faktor}.}
\end{alignat*}
\end{document}


I would try with $^{a}/_{b}$, or, based in your example

$^{\mathcal{O}_{(V',0)}}/_{\mathcal{O}_{(V,0)}}$


Also it is possible to do $^{a}\Big/_{b}$.

• Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. Nov 3 '14 at 23:36

Something like:

\documentclass{article}

\def\quotient#1#2{%
\raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}%
}

\begin{document}
$\quotient{\mathcal{O}_{(V',0)}}{\mathcal{O}_{(V,0)}}$
\end{document}


Update, here is a real plain example:

\def\quotient#1#2{%
\raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}%
}

$$\quotient{{\cal O}_{(V',0)}}{{\cal O}_{(V,0)}}$$
\bye

• That is essentially the same as Yossi's answer, albeit more plainish. Oct 27 '10 at 14:29
• $$...$$, really? You should have \m@th inside the inline math in your \hboxes.
– TH.
Oct 27 '10 at 14:29
• When I wrote it first it was a plain TeX file, but since there is no \mathcal in plain I quickly converted the document to LaTeX just to try it. Oct 27 '10 at 14:31
• In plain TeX you can use ${\cal O}_{(V',0)}$ Oct 28 '10 at 5:55

I like Eduardo's answer, but with properly sized numerators/denominators.

(Note the double set of braces in the definition for proper spacing. The outer pair will disappear on use, and without the second set, it will place the quotient smack up against whatever's to the left, trying to make it a superscript.)

\documentclass{article}
\usepackage{amsmath}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%% For quotient groups / modding equiv relations
%%%% Use: \quot{A}{B} --> A/B
\newcommand*\quot[2]{{^{\textstyle #1}\big/_{\textstyle #2}}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{align*}
\text{Reference size: }A
\text{Reference size: }E
\end{align*}
\end{document}


I give a very small amelioration which takes care of the different math styles.

% Source : http://tex.stackexchange.com/questions/4624/a-symbol-for-the-quotient-of-two-objects

\documentclass[10pt,a4paper]{article}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}

\newcommand\quotient[2]{
\mathchoice
{% \displaystyle
\text{\raise1ex\hbox{$#1$}\Big/\lower1ex\hbox{$#2$}}%
}
{% \textstyle
#1\,/\,#2
}
{% \scriptstyle
#1\,/\,#2
}
{% \scriptscriptstyle
#1\,/\,#2
}
}

\newcommand{\setA}{{\cal O}_{(V',0)}}
\newcommand{\setB}{{\cal O}_{(V,0)}}

\begin{document}

One formula in one text : $\frac{4}{5} = \quotient{\setA}{\setB}$
and one formula alone...
$\frac{4}{5} = \quotient{\setA}{\setB}$

What about quotient of quotients ?
$\quotient{\left( \quotient{\setA}{\setB} \right)}{\left( \quotient{\setA}{\setB} \right)}$
Better like this ?
$\quotient{\textstyle \left( \quotient{\setA}{\setB} \right)}{\textstyle \left( \quotient{\setA}{\setB} \right)}$

\end{document}