The following example of LaTeX code
\documentclass[b4paper,oneside, final, 10pt]{article}
\usepackage[english]{babel}
\usepackage{charter}
\usepackage{amsfonts}
\usepackage{mathtools}
\usepackage[top=1.5cm, bottom=2.9cm, left=2.1cm, right=2.1cm]{geometry}
\begin{document}
\noindent\textbf{\large Algebraic Morse Theory:} Let $R$ be any ring. A
\emph{based $R$-complex}, is a chain $R$-complex $(A_\star,\partial_\star)$,
together with a chosen decomposition $A_n\!=\bigoplus_{i\in I_n}\!\!\!A_{n,i}$
for every $n$. Then $\partial_{n,i,j}\!=\!\partial_{i,j}$ denotes the $R$-module
homomorphism $A_{n,i} \smash{\overset{\iota}{\longrightarrow}}
A_n \smash{\overset{\partial_n}{\longrightarrow}}A_{n-1}
\smash{\overset{\pi}{\longrightarrow}}A_{n-1,j}$, where $\iota$ is the coordinate inclusion and
$\pi$ is the coordinate projection. The associated digraph of $A_\star$,
$\Gamma_{\!A_\star}\!=\!\Gamma$, is a directed simple graph whose vertices are
the indices from all $I_n$, and directed edges correspond to nonzero maps
$\partial_{i,j}$. Each edge $(i,j)$ will be denoted by $i\!\to\!j$.\\[2mm]
\noindent\textbf{Conclusion:} Given a based $R$-complex $(A_\star,\partial_\star,I_\star)$,
any Morse matching $\mathcal{M}$ on $\Gamma_{\!A_\star}$ induces a homotopy
equivalence between complexes $(A_\star,\partial_\star)$ and
$(\mathring{A}_\star,\mathring{\partial}_\star)$, more precisely $A_\star
\xrightarrow{\pi\text{ s.d.r. }}\pi(A_\star) = \pi(\mathring{A}_\star)
\xleftarrow{\pi=p^{-1}\,\cong}\mathring{A}_\star$, and therefore isomorphisms
$H_n(A_\star,\partial_\star) \cong H_n(\mathring{A}_\star,\mathring{\partial}_\star)$
for all $n\!\in\!\mathbb{Z}$. In particular, if $\mathcal{M}^0_{n-1}\!=
\emptyset =\!\mathcal{M}^0_{n+1}$ then there holds $H_n(A_\star,\partial_\star)
\cong \mathring{A}_n$.
\end{document}
produces
(\iota, \partial, \pi are too high) instead of
. Furthermore, it produces
instead of (lowered text)
or even better (lowered text and better overlay with p)
.
Is there a way to create a better command \xrightarrow (and if possible, also \xleftarrow, \xRightarrow, \xLeftarrow, etc.), that positions the text better, like in the pictures above? The style in the second and fifth pics is most desirable. Also, I would be most happy if this command had an optional argument [...] that specified offset from the line of the arrow (including negative space).
P.S. By the way, is there a way to make the + and - sign in sub and superscripts appear with less space left and right of it? For example, -1 in the above picture is too far away from p.

\pi=p...in the last two examples -- the arrow should never cut through the descender of the text above. any good math editor (person) would immediately mark that for correction! and "interrupting" the arrow as in the last example is entirely wrong. while i might agree that this text is higher than desirable, it's definitely desirable that text over all arrows be aligned on the same baseline, which the\delta_nis definitely not. you're treading here on hundreds of years of practice. – barbara beeton Jan 20 at 13:04mathtoolsloadsamsmath,tikzand possibly others loadxcolorin the background which is better thancolor.toclofthas asubfigureoption which is meant to be used withsubfigurepackage but that's obsolote andsubfigsuperseded it .... But as @DavidCarlisle mentions, to be able to help you I need to install all of these packages just to see that arrow placement which is just pointless. – percusse Jan 20 at 13:36\xrightarrow{x_p^q}is still just above the arrow). However, if your issue is increased lineskip and you use a lot of inline math, I suggest adding\linespread{1.08}into your preamble, which will make all the line a bit looser. This way you'd get a more pleasant result I think. – tohecz Jan 20 at 15:02xrightarrow(xleftarrow) command does not really align its (actual) text on the same baseline. If you look closely at the to\pis ontop of the arrows in his third image you will notice that they have a different vertical distance from their respective arrow. His proposed style contains less whitespace than the standard LaTeX result (and the\pis have the same vertical offset) and thus is more appeasing (for me). – elemakil Jan 20 at 15:50