What is the command in LaTeX for producing a displayed diagonal
fraction (like one might use to express, say, quotient groups)?
LW
I'm using a macro written by Kai Wiegand:
\def\slfrac#1#2{{\mathord{\mathchoice %
{\kern.1em\raise.5ex\hbox{$\scriptstyle#1$}\kern-.1em
/\kern-.15em\lower.25ex\hbox{$\scriptstyle#2$}}
{\kern.1em\raise.5ex\hbox{$\scriptstyle#1$}\kern-.1em
/\kern-.15em\lower.25ex\hbox{$\scriptstyle#2$}}
{\kern.1em\raise.4ex\hbox{$\scriptscriptstyle#1$}\kern-.1em
/\kern-.14em\lower.25ex\hbox{$\scriptscriptstyle#2$}}
{\kern.1em\raise.2ex\hbox{$\scriptscriptstyle#1$}\kern-.1em
/\kern-.1em\lower.25ex\hbox{$\scriptscriptstyle#2$}}}}}
This looks very fine for small fractions embedded in text
nicefrac.sty from the units bundle
Herbert
> What is the command in LaTeX for producing a displayed diagonal
> fraction (like one might use to express, say, quotient groups)?
For those who don't know the quotient construction in mathematics has
nothing at all to do with fractions.
I just realized that I don't know of any completely satisfactory way
to markup either G/L or K\G when G is a group, K a compact subgroup
of G, and L a discrete subgroup of G.
Things in the rolls of G, K, and L above could be large expressions.
It would be good if amsmath, if not the LaTeX base, had commands
\lquotient and \rquotient for the left (with /) and right (with \)
quotient constructions, each taking two arguments (object, actor).
Needless to say, the dividers should be stretchy, and with amsmath
neither \slash nor \backslash seems to be stretchy. Am I missing
something?
-- Bill
> neither \slash nor \backslash seems to be stretchy. Am I missing
> something?
Your description wasn't clear, but maybe you mean
\left. A \middle\backslash B \right.
Needs eTeX (invoke with "elatex").
Donald Arseneau as...@triumf.ca
> William F Hammond <ham...@csc.albany.edu> writes:
>
> > neither \slash nor \backslash seems to be stretchy. Am I missing
> > something?
>
> Your description wasn't clear, but maybe you mean
>
> \left. A \middle\backslash B \right.
>
> Needs eTeX (invoke with "elatex").
Thanks. Yes, that's exactly it.
More precisely,
\newcommand{\rquotient}[2]{\left.#1\middle\backslash#2\right.}
\newcommand{\lquotient}[2]{\left.#1\middle\slash#2\right.}
are what I want.
But I notice that while
\middle|
as in
\newcommand{\setof}[2]{\left\{#1\middle|#2\right\}}
does what I want, using
\middle\mid
does not.
-- Bill
> Donald Arseneau <as...@triumf.ca> writes:
> . . .
> > \left. A \middle\backslash B \right.
> >
> > Needs eTeX (invoke with "elatex").
>
> Thanks. Yes, that's exactly it.
I should reverse the args on my previous \rquotient if the action is
to be second, and use "/" rather than "\slash" (defined in latex.ltx)
in \lquotient since "/" is a documented delimiter.
Thus,
\newcommand{\rquotient}[2]{\left.#2\middle\backslash #1\right.}
\newcommand{\lquotient}[2]{\left.#1\middle/ #2\right.}
Moreover, I think that
\newcommand{\dblquotient}[3]{\left.#3\middle\backslash #1\middle/ #2\right.}
as in $\dblquotient{G}{K}{\Gamma}$ is a little better than compounding
\lquotient and \rquotient. (eTeX and amsmath are assumed here.)
-- Bill