Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have the following diagram:

Diagram

However, this looks a bit ugly, I would like a version that looks a little bit better. For example, size the last arrow such that the T_\phi is moved to the right.

This is the code which I am using to do this:

\begin{align*}
  \xi \colon &\lb \to \mathcal{L}(\hh)\\
  &\phi \mapsto T_\phi.
\end{align*}

Where \lb and \hh just give the names for those spaces. Does anybody have a suggestion how I would improve the look of this function definition?

share|improve this question

2 Answers 2

up vote 12 down vote accepted

Personaly, I think it is better to use:

enter image description here

\begin{align*}
  \xi \colon L^\infty(T) &\to \mathcal{L}(H^2)\\
  \phi &\mapsto T_\phi.
\end{align*}

Anyway, you can obtain what you want through

\documentclass{article}

\usepackage{amsmath}

\newcommand\phantomarrow[2]{%
  \setbox0=\hbox{$\displaystyle #1\to$}%
  \hbox to \wd0{%
    $#2\mapstochar
     \cleaders\hbox{$\mkern-1mu\relbar\mkern-3mu$}\hfill
     \mkern-7mu\rightarrow$}%
  \,}

\begin{document}

\begin{align*}
  \xi \colon &L^\infty(T) \to \mathcal{L}(H^2)\\
  &\phantomarrow{L^\infty(T)}{\phi} T_\phi.
\end{align*}

\end{document}

enter image description here

share|improve this answer
    
Thanks. You're right, the first suggestion looks the best (at least to me). I will try to figure out how the second one works, might turn out to be useful. –  Jonas Teuwen Oct 19 '11 at 12:17
    
The second one is rather tricky. You needn't know how it works if you don't want to become a developer of LaTeX packages. For more information for this, see the implementation of \xrightarrow in amsmath package, and the definition of \mapsto. –  Leo Liu Oct 19 '11 at 12:24

You may also want to try mathtools:

\documentclass{article}
\usepackage{amsmath}
\usepackage{mathtools}

\begin{document}

\begin{align*}
      \xi \colon &L^\infty(T) \to \mathcal{L}(H^2)\\
       &\phi \xmapsto{\phantom{L^\infty(T)}} T_\phi
\end{align*}

\end{document}

The output looks like:

mathtools output

share|improve this answer
    
Sorry for resurrecting the post. But, found this code really shorter. –  kan Aug 9 '12 at 15:37
    
Thanks. This a nice answer. I use mathtools already, so I will remember this. –  Jonas Teuwen Aug 9 '12 at 15:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.