Discussion:
Inverse function
(too old to reply)
j@a
2009-01-13 21:08:24 UTC
Permalink
How can I write on LaTeX a inverse function so the (-1) appears like
in Bourbaki's books do?


http://books.google.es/books?id=IL-SI67hjI4C&pg=PA84&dq="inverse+function"+bourbaki#PPA85,M1

I mean, just on top of the "f".

Thank you very much and sorry about my poor english.
c***@tele2.fr
2009-01-13 21:44:14 UTC
Permalink
Post by ***@a
How can I write on LaTeX a inverse function so the (-1) appears like
in Bourbaki's books do?
http://books.google.es/books?id=IL-SI67hjI4C&pg=PA84&dq="inverse+function"+bourbaki#PPA85,M1
I mean, just on top of the "f".
Thank you very much and sorry about my poor english.
\overset{-1}{f}

\overset is a command of amsmath

Christophe
Werner Grundlingh
2009-01-13 21:49:20 UTC
Permalink
Post by ***@a
How can I write on LaTeX a inverse function so the (-1) appears like
in Bourbaki's books do?
http://books.google.es/books?id=IL-SI67hjI4C&pg=PA84&dq="inverse+function"+bourbaki#PPA85,M1
I mean, just on top of the "f".
Thank you very much and sorry about my poor english.
Alternatively, without the use of a different/new package, you could
use the standard LaTeX command \stackrel{...}{...}. Here's a LaTeX2e
macro in a minimal example you can define in order to obtain the
desired result:

\documentclass{article}
\providecommand{\inversefunction}[1]{\ensuremath{\stackrel{-1}{#1}}}%
Inverse function
\begin{document}
...
\[
(f(x),x)\in\inversefunction{F} \qquad \textrm{and} \qquad (f(y),y)\in
\inversefunction{F},
\]
...
\end{document}

Hope this helps,
Werner
Enrico Gregorio
2009-01-13 22:03:58 UTC
Permalink
Post by Werner Grundlingh
Post by ***@a
How can I write on LaTeX a inverse function so the (-1) appears like
in Bourbaki's books do?
http://books.google.es/books?id=IL-SI67hjI4C&pg=PA84&dq="inverse+function"+b
ourbaki#PPA85,M1
I mean, just on top of the "f".
Thank you very much and sorry about my poor english.
Alternatively, without the use of a different/new package, you could
use the standard LaTeX command \stackrel{...}{...}. Here's a LaTeX2e
macro in a minimal example you can define in order to obtain the
\documentclass{article}
\providecommand{\inversefunction}[1]{\ensuremath{\stackrel{-1}{#1}}}%
Inverse function
\begin{document}
...
\[
(f(x),x)\in\inversefunction{F} \qquad \textrm{and} \qquad (f(y),y)\in
\inversefunction{F},
\]
...
\end{document}
I'd not use \providecommand, since this can produce puzzling results
if the command happens to be actually defined in some loaded package.

With \stackrel you also get incorrect results: compare

$a\overset{-1}{f}b$ and $a\stackrel{-1}{f}b$

which are different since \stackrel produces a relation symbol. Thus

\newcommand{\inversefunction}[1]{{\stackrel{-1}{#1}}}

would be the "good" definition. Since amsmath provides many tools for
math typesetting, I'd recommend loading it and the method with \overset.

Ciao
Enrico
Werner Grundlingh
2009-01-13 22:31:52 UTC
Permalink
Post by Enrico Gregorio
I'd not use \providecommand, since this can produce puzzling results
if the command happens to be actually defined in some loaded package.
With \stackrel you also get incorrect results: compare
  $a\overset{-1}{f}b$ and $a\stackrel{-1}{f}b$
which are different since \stackrel produces a relation symbol. Thus
\newcommand{\inversefunction}[1]{{\stackrel{-1}{#1}}}
would be the "good" definition. Since amsmath provides many tools for
math typesetting, I'd recommend loading it and the method with \overset.
Ciao
Enrico
I agree, on both accounts. W
j@a
2009-01-13 23:21:50 UTC
Permalink
Thank all of you very much, that's just what I'm looking for.

Greets
Post by Werner Grundlingh
Post by Enrico Gregorio
I'd not use \providecommand, since this can produce puzzling results
if the command happens to be actually defined in some loaded package.
With \stackrel you also get incorrect results: compare
  $a\overset{-1}{f}b$ and $a\stackrel{-1}{f}b$
which are different since \stackrel produces a relation symbol. Thus
\newcommand{\inversefunction}[1]{{\stackrel{-1}{#1}}}
would be the "good" definition. Since amsmath provides many tools for
math typesetting, I'd recommend loading it and the method with \overset.
Ciao
Enrico
I agree, on both accounts. W
Dan Luecking
2009-01-14 17:37:03 UTC
Permalink
On Tue, 13 Jan 2009 23:03:58 +0100, Enrico Gregorio
Post by Enrico Gregorio
Post by ***@a
How can I write on LaTeX a inverse function so the (-1) appears like
in Bourbaki's books do?
http://books.google.es/books?id=IL-SI67hjI4C&pg=PA84&dq="inverse+function"+b
ourbaki#PPA85,M1
With \stackrel you also get incorrect results: compare
$a\overset{-1}{f}b$ and $a\stackrel{-1}{f}b$
which are different since \stackrel produces a relation symbol. Thus
That extra horizontal space is not the only problem: try
$g\stackrel{-1}{g}g$
and
$X\stackrel{-1}{X}X$
There is a vertical centering of the second arg on the
math axis. As a consequence, "g" is shifted up and "X"
is shifted down). This is because of TeX's internal
handling of \mathop (used to get the first arg on top
of the second arg). This problem is masked in the example
with "f" because it happens to be nearly vertically
centered already.

If \stackrel is used, the following is the "good"
definition:
\newcommand{\inversefunction}[1]{{\stackrel{-1}{#1\kern0pt}}}
The addition of a 0pt kern to the argument prevents the case
\mathop{<single symbol>}, which is what triggers the vertical
centering.

[Having said all that, I find the "-1" on top of
the function to be one of Bourbaki's ugliest notation
choices and urge everyone to give it a pass.]


Dan
To reply by email, change LookInSig to luecking
Enrico Gregorio
2009-01-14 18:45:57 UTC
Permalink
Post by Dan Luecking
On Tue, 13 Jan 2009 23:03:58 +0100, Enrico Gregorio
Post by Enrico Gregorio
Post by ***@a
How can I write on LaTeX a inverse function so the (-1) appears like
in Bourbaki's books do?
http://books.google.es/books?id=IL-SI67hjI4C&pg=PA84&dq="inverse+function
"+b
ourbaki#PPA85,M1
With \stackrel you also get incorrect results: compare
$a\overset{-1}{f}b$ and $a\stackrel{-1}{f}b$
which are different since \stackrel produces a relation symbol. Thus
That extra horizontal space is not the only problem: try
$g\stackrel{-1}{g}g$
and
$X\stackrel{-1}{X}X$
There is a vertical centering of the second arg on the
math axis. As a consequence, "g" is shifted up and "X"
is shifted down). This is because of TeX's internal
handling of \mathop (used to get the first arg on top
of the second arg). This problem is masked in the example
with "f" because it happens to be nearly vertically
centered already.
You're right.
Post by Dan Luecking
If \stackrel is used, the following is the "good"
\newcommand{\inversefunction}[1]{{\stackrel{-1}{#1\kern0pt}}}
The addition of a 0pt kern to the argument prevents the case
\mathop{<single symbol>}, which is what triggers the vertical
centering.
[Having said all that, I find the "-1" on top of
the function to be one of Bourbaki's ugliest notation
choices and urge everyone to give it a pass.]
I find it not only ugly, but also mathematically wrong.

Ciao
Enrico

Continue reading on narkive:
Loading...