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'm trying to figure out how to label the arrows with curly braces that span the length of the arrow, and to make it all very pretty. More specifically, I'm trying to make

\documentclass[10pt]{article}
\usepackage{amssymb} %needed for \mathbb{Q}
\usepackage[all]{xy}
\begin{document}

\xy
\xymatrix{
 \ar@{-}[ddddd]_G & & F \ar@{-}[dd]^{p^\infty} &
  \ar@{-}[dd]^{\Gamma^{p^m}} & \ar@{-}[dddd]^\Gamma\\\\
 & \ar@{-}[ddd]_{G_m} & F_m \ar@{-}[dd]^{p^m} &
  \ar@{-}[dd]^{\Gamma_m} & \\\\
 & & F_0 \ar@{-}[d]^{p-1} & \ar@{-}[d]^\Delta & \\
 & & \mathbb{Q} &
}
\endxy

\end{document}

with the outer arrows as curly braces, and preferably spaced better. By copying someone else's diagram I've managed to create a close approximation of it, but sideways

\documentclass[10pt]{article}
\usepackage{amssymb} %needed for \mathbb{Q}
\usepackage[all]{xy}
\begin{document}

\xy
\xymatrix "M"@C=0pt@R=10pt{
 &&&&&&&&&& &&&&&&&&&& &&&&& \\
 &&&&&&&&&& &&&&&&&&&& &&&&& \\
 F \ar@{-}[rrrrrrrrrr]^{p^\infty} &&&&&&&&&&
  F_m \ar@{-}[rrrrrrrrrr]^{p^m} &&&&&&&&&&
  F_0 \ar@{-}[rrrrr]^{p-1} &&&&& \mathbb{Q}\\
 &&&&&&&&&& &&&&&&&&&& &&&&& \\
 &&&&&&&&&& &&&&&&&&&& &&&&&
}%
 \POS
 "M1,2"."M1,20"!C*\frm{^\}},+U*++!D{\Gamma}
 ,"M2,2"."M2,10"!C*\frm{^\}},+U*++!D{\Gamma^{p^m}}
 ,"M2,12"."M2,20"!C*\frm{^\}},+U*++!D{\Gamma_m}
 ,"M2,22"."M2,25"!C*\frm{^\}},+U*++!D{\Delta}
 ,"M4,12"."M4,25"!C*\frm{_\}},+D*++!U{G_m}
 ,"M5,2"."M5,25"!C*\frm{_\}},+D*++!U{G_m}
\endxy

\end{document}

but I have no idea about this whole POS command and frankly find it rather mysterious. I've gotten fair with xy-pic, but am willing to embrace other packages. It would be nice if someone knew of a solution that didn't require that the braces be attached to entries of the matrix, so that I could do things like label the arrows of

\documentclass[10pt]{article}
\usepackage{amssymb} %needed for \mathbb{Q}
\usepackage[all]{xy}
\begin{document}

\xymatrix{
 &&&& R\\
 \\
 && H \ar@{-}[rruu] && R_m \ar@{-}[uu]\\
 & \\
 F \ar@{-}[rruu] & & H_m \ar@{-}[rruu] \ar@{-}[uu] && R_0 \ar@{-}[uu]\\
 &\\
 F_m \ar@{-}[rruu] \ar@{-}[uu] & & H_0 \ar@{-}[rruu] \ar@{-}[uu]\\
 \\
 F_0 \ar@{-}[rruu] \ar@{-}[uu]\\
 \mathbb{Q} \ar@{-}[u]
}

\end{document}

without having to rearrange the diagram for the sake of the labels. Then there is also the issue that the outer braces are not attached to an arrow. Perhaps an arrow that is itself a curly brace, but can be offset to the side?

Any help would be greatly appreciated.

share|improve this question
add comment

1 Answer

It can be improved and streamlined, and maybe even automated, but the skeleton is here for it, using the scalerel package. First I crassly define some repeatedly used stacking commands, and set up the vertical rule size of the center core of your diagram.

Then I define the centerline elements as \a through \g. Following that are a series of composite definitions. Lower case, ending in x implies the definition defines blank space the same vertical size as the name implies. Thus, \abcx is a blank box the size of \a, \b, and \c stacked. The capital letter definitions imply braces with the associated text. Thus, \BCDEF is the vertical brace associated with column 1, spanning elements b through f.

I edited my original post, when I realized the braces looked better as width-limited scales, rather than aspect-limited stretches. Even so, you might find the braces unacceptable, because they are all scales/stretches from the original ascii character, not a pretty math brace that auto-extends.

Finally, I set up equation mode, and build the columns. Not pretty, but it might get the job done for you.

\documentclass[10pt]{article}
\usepackage{amssymb} %needed for \mathbb{Q}
\usepackage{scalerel}
\begin{document}

\newcommand\stacktwo[2]{\begin{array}{l}#1 \\#2\end{array}}
\newcommand\stackthree[3]{\begin{array}{l}#1 \\#2 \\#3\end{array}}
\newcommand\stackfive[5]{\begin{array}{l}#1 \\#2 \\#3 \\#4 \\#5\end{array}}

\def\rb{\rule[-2em]{1em}{5em}}
\def\rs{\rule[-1em]{1em}{3em}}

\def\nulbox{$\makebox{~\rule{0pt}{1pt}}$}

\def\a{F}
\def\b{\,\stretchrel*{|}{\rb} p^\infty }
\def\c{F_m}
\def\d{\,\stretchrel*{|}{\rb} p^m}
\def\e{F_0}
\def\f{\,\stretchrel*{|}{\rs} p-1}
\def\g{\mathbb{Q}}

\def\abcx{\stretchrel*{\nulbox}{\stackthree{\a}{\b}{\c}}}
\def\efgx{\stretchrel*{\nulbox}{\stackthree{\e}{\f}{\g}}}
\def\ax{\stretchrel*{\nulbox}{\a}}
\def\cx{\stretchrel*{\nulbox}{\c}}
\def\ex{\stretchrel*{\nulbox}{\e}}
\def\gx{\stretchrel*{\nulbox}{\g}}
\def\BCD{\scalerel*[1em]{\}}{\stackthree{\b}{\c}{\d}} \Gamma}
\def\DEF{G_m \scalerel*[1em]{\{}{\stackthree{\d}{\e}{\f}}}
\def\BCDEF{G \scalerel*[1em]{\{}{\stackfive{\b}{\c}{\d}{\e}{\f}}}
\def\B{\,\scalerel*[1em]{\}}{\rb} \Gamma^{p^m}}
\def\D{\,\scalerel*[1em]{\}}{\rb} \Gamma_m}
\def\F{\,\scalerel*[1em]{\}}{\rs} \Delta}

\[
\stackthree{\ax}{\BCDEF}{\gx}
\stackthree{\abcx}{\DEF}{\gx}
\begin{array}{l}
\a \\ \b \\ \c \\ \d \\ \e \\ \f \\ \g
\end{array}
\begin{array}{l}
\ax \\ \B  \\ \cx \\ \D \\ \ex \\ \F \\ \gx
\end{array}
\stackthree{\ax}{\BCD}{\efgx}
\]

\end{document}

enter image description here

share|improve this answer
    
@shawn How do you expect to get a useful answer when you don't visit the site since asking your question? –  Steven B. Segletes Mar 10 '13 at 3:27
add comment

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.