4

Here is a typical example of what I am talking about:

\begin{align*}
\mathcal{L}                        &\simeq     O^{-1}(T, S) \\
V                                  &\mapsto    f_V := \pi_S \circ \left(\pi_T |_V\right)^{-1} \\
V_f := \{t + f(t) | t \in T\} &\leftarrow f
\end{align*}

The result looks messy in my opinion. I would like everyting to be aligned in the center, and the arrows to extend accordingly --- something that would look like the following:

           ~
    X ----------> Y
    x |------> yyyyyyy
xxxxxxxxx <----| yyy

I suppose I could use the array environment, but how to typeset extensible arrows? A similar question was answered in Dynamically size arrow \mapsto in function definition ; but I do not understand that piece of code, so I do not know how to adapt it (and if it is at all possible).

Thank you for your help!

2
  • Welcome to TeX.SX! Please, don't show code that needs guessing at the definitions of the commands used. Either simplify it or provide the definitions.
    – egreg
    May 18, 2012 at 15:05
  • My mistake. Sorry about that! These macros are unessential for the point I wanted to make, I just removed them. May 19, 2012 at 21:26

1 Answer 1

5

You need a "diagram making" package. I know Xy-pic, but also tikz-cd can be used:

\documentclass{article}
\usepackage[all,cmtip]{xy}
\begin{document}

\xymatrix@R=3pt{
  \mathcal{L} \ar@{<->}[r]^{\sim} &  O^{-1}(T, S) \\
  V \ar@{|->}[r] & f_V := \pi_S \circ (\pi_T|_V)^{-1} \\
  V_f := \{t + f(t)\mid t \in T\} & f \ar@{|->}[l]
}

\end{document}

enter image description here

Here's the version with tikz-cd:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[row sep=tiny]
\mathcal{L} \arrow[leftrightarrow]{r}{\sim} & O^{-1}(T, S) \\
V \arrow[mapsto]{r} & f_V := \pi_S \circ (\pi_T|_V)^{-1} \\
V_f := \{t + f(t)\mid t \in T\} & f \arrow[mapsto]{l}
\end{tikzcd}

\end{document}

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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