diff options
author | Karl Berry <karl@freefriends.org> | 2011-05-25 23:01:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-05-25 23:01:37 +0000 |
commit | 667d2e82e798d55bcf90bb070f67960532bab83d (patch) | |
tree | 0cacdcc9c56ab561ade396167a3aa5114d4ce182 /Master/texmf-dist/doc/latex/amslatex-primer | |
parent | 1539f479bcb7174dc4f80b62d95b7a1c4c908f7c (diff) |
amslatex-primer 2.2 (25may11)
git-svn-id: svn://tug.org/texlive/trunk@22612 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/amslatex-primer')
-rw-r--r-- | Master/texmf-dist/doc/latex/amslatex-primer/README | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/amslatex-primer/amshelp.md5 | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/amslatex-primer/amshelp.pdf | bin | 342161 -> 511163 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/amslatex-primer/amshelp.tex | 1714 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/amslatex-primer/template.tex | 2 |
5 files changed, 1409 insertions, 322 deletions
diff --git a/Master/texmf-dist/doc/latex/amslatex-primer/README b/Master/texmf-dist/doc/latex/amslatex-primer/README index 7f74e58f131..0bb2eecf16d 100644 --- a/Master/texmf-dist/doc/latex/amslatex-primer/README +++ b/Master/texmf-dist/doc/latex/amslatex-primer/README @@ -8,6 +8,10 @@ template.tex) won't be a substitute for the full documentation, but they may get you started quickly enough so that you'll only need to refer to the main documentation occasionally. +In addition to descriptions of the basics of AMS-LaTeX, there are +sections with careful descriptions of the various environments for +displayed mathematics, how to use Xy-pic to draw commutative diagrams, +and how to use amsrefs to create a bibliography. + This material is subject to the LaTeX Project Public License. See -http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for -the details of that license. +http://www.latex-project.org/lppl.txt for the details of that license. diff --git a/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.md5 b/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.md5 index f75c6660a7a..41da8040973 100644 --- a/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.md5 +++ b/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.md5 @@ -1,3 +1,4 @@ -24f2c1a6468090256407e921c577d5b3 amshelp.tex -161229de67803d727bc81134e5ca9ed5 amshelp.pdf -460313cc489552c82b49b9333a0fb49a template.tex +571b3704015f14b49f5eedea3d15cf9a amshelp.tex +cc15ffba0d0f0c295efb93132703b7d1 amshelp.dvi +3e27bad4a1354eb276cf20b284172ce2 amshelp.pdf +bf05831b44f8156360b816e08b94d521 template.tex diff --git a/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.pdf b/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.pdf Binary files differindex 61781cfde63..4fa62020dcb 100644 --- a/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.pdf +++ b/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.pdf diff --git a/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.tex b/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.tex index 9a732626d6c..fbbcc0fa84f 100644 --- a/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.tex +++ b/Master/texmf-dist/doc/latex/amslatex-primer/amshelp.tex @@ -1,7 +1,7 @@ %%% amshelp.tex %%% This is an AMS-LaTeX file -%%% Copyright (c) 2000, 2008, 2009 Philip S. Hirschhorn +%%% Copyright (c) 1992, 2000, 2008, 2009, 2011 Philip S. Hirschhorn % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -16,8 +16,8 @@ %%% Department of Mathematics %%% Wellesley College %%% Wellesley, MA 02481 -%%% psh@poincare.wellesley.edu %%% psh@math.mit.edu +%%% psh@poincare.wellesley.edu %%% This is an attempt to explain how to get up and running with @@ -27,9 +27,9 @@ -\newcommand{\filedate}{June 19, 2009} +\newcommand{\filedate}{May 24, 2011} %\newcommand{\filedate}{\today} -\newcommand{\fileversion}{Version 2.1} +\newcommand{\fileversion}{Version 2.2} %--------------------------------------------------------------------- %\documentclass[12pt]{amsart} @@ -37,10 +37,26 @@ \usepackage{url} +%\usepackage[pdfborderstyle={/S/U/W 1},hyperfootnotes=false]{hyperref} +%\usepackage[colorlinks=false,pdfborder={0 0 0}]{hyperref} +%\usepackage[colorlinks,pdfborder={0 0 0}]{hyperref} +\usepackage[colorlinks]{hyperref} +%\usepackage{hyperref} + +% In case we're not using hyperref.sty: +\providecommand{\texorpdfstring}[2]{#1} +% The following can safely be used in \section commands +% without causing pdf warnings: +\newcommand{\bs}{\texorpdfstring{\char`\\}{}} + +% We have to load amsrefs *after* hyperref. (Most packages must +% be loaded before hyperref; amsrefs is an exception to that.) + % We have to load amsrefs *before* loading Xy-pic, or else the % \newcommand{\cir}{\textasciicircum} in textcmds.sty will complain. % We can also use the optional argument ``lite'', as in -% \usepackage[lite]{amsrefs}, to suppress reading textcmds.sty +% \usepackage[lite]{amsrefs}, to avoid the problem by suppressing +% the reading of textcmds.sty \usepackage[lite]{amsrefs} \usepackage[all,cmtip]{xy} @@ -48,12 +64,6 @@ - -%\usepackage{hyperref} - - - - %--------------------------------------------------------------------- %--------------------------------------------------------------------- @@ -79,8 +89,6 @@ \newtheorem{terminology}[equation]{Terminology} - - %--------------------------------------------------------------------- %--------------------------------------------------------------------- %--------------------------------------------------------------------- @@ -105,7 +113,7 @@ \begin{abstract} Together with the template file \texttt{template.tex}, these notes are an attempt to tell you enough about \LaTeX{} and \AmS-\LaTeX{} - so that you can get started with it without having to read the book. + so that you can get started without having to read the book. \end{abstract} \maketitle @@ -118,9 +126,8 @@ This is an attempt to get you up and running with \AmS-\LaTeX{} as quickly as possible. These instructions (along with the template file \texttt{template.tex}) won't be a substitute for the full -documentation, but they may get you started quickly enough so that -you'll only need to refer to the main documentation occasionally, -which should eliminate most of the pain. +documentation, but they'll give you enough to get started quickly and +only occasionally have to refer to the main documentation. The current version of \AmS-\LaTeX{} (version 2.2) is a collection of document classes and optional packages for the current version of @@ -181,9 +188,8 @@ the cross-references right (which is also the explanation of why you need to run a file through \LaTeX{} \emph{twice} to be sure that all the cross-references are correct). - %-------------------------------------------------------------------- -\subsection{The \texttt{\char`\\documentclass} command} +\subsection{The \texttt{\bs documentclass} command} \label{sec:DocClsCom} Before you type anything that actually appears in the paper, you must @@ -191,16 +197,20 @@ include a \verb"\documentclass" command. It's easiest to just put the \verb"\documentclass" command at the very beginning of the file, possibly with a few lines of comments before it. -It's actually the choice of document class that determines whether -you're using \AmS-\LaTeX{} or just plain old \LaTeX. There are three -document classes that are a part of \AmS-\LaTeX: \texttt{amsart}, -\texttt{amsproc}, and \texttt{amsbook}. There is also the -\texttt{amsmath} package that can be used with the standard \LaTeX{} -document classes. I'll only be discussing the \texttt{amsart} -document class here. For the others, see the \AmS-\LaTeX{} User's +It's the choice of document class that determines whether you're using +\AmS-\LaTeX{} or just plain old \LaTeX. \AmS-\LaTeX{} provides the +document classes \texttt{amsart}, \texttt{amsproc}, and +\texttt{amsbook} as replacements for the standard \LaTeX{} document +classes \texttt{article}, \texttt{proc}, and \texttt{book}. If for +some reason you prefer to use the standard \LaTeX{} classes +\texttt{article}, \texttt{proc}, or \texttt{book}, you can still get +many of the features of \AmS-\LaTeX{} by including the command +\verb"\usepackage{amsmath}" after your \verb"\documentclass" command. +I'll only be discussing the \texttt{amsart} document class here. For +the others, see the \AmS-\LaTeX{} User's Guide~\cite{amslatexusersguide}. -The simplest version of the \texttt{\char`\\documentclass} command is +The simplest version of the \texttt{\bs documentclass} command is \begin{center} \verb"\documentclass{amsart}" \end{center} @@ -222,11 +232,14 @@ create a bibliography (see section~\ref{sec:amsrefs}). To load the \begin{center} \verb"\usepackage[lite]{amsrefs}" \end{center} -after the \verb"\documentclass" command. +after the \verb"\documentclass" command. (For an explanation of why +we recommend using the optional argument \texttt{lite}, see +section~\ref{sec:refoptions}.) Another important package is for when you want to use some of the -special symbols contained in the \AmS-Fonts package. These are listed -in \texttt{symbols.pdf}, available at +special symbols contained in the \AmS-Fonts package. These are +listed, along with all of the standard \LaTeX{} symbols, in +\texttt{symbols.pdf}, available at \begin{center} \url{http://www.ctan.org/tex-archive/info/symbols/math/symbols.pdf} \end{center} @@ -243,7 +256,7 @@ a bibliography, and have the special symbols defined, use the commands \end{center} Another widely used optional package is \Xy-pic, which enables you to -draw commutative diagrams as part of your \LaTeX{} file, rather than +draw commutative diagrams as part of your \LaTeX{} file rather than creating them with a graphics package and importing the graphics. (For commutative diagrams, see section~\ref{sec:xypic}). To use \Xy-pic, you should include the commands @@ -253,10 +266,11 @@ creating them with a graphics package and importing the graphics. \verb"\let\objectstyle=\displaystyle" \end{tabular} \end{center} -That loads the \Xy-pic package and sets it so that the nodes in the -diagram are, by default, in \verb"\displaystyle". If you'd like the -default style for the nodes to be \verb"\textstyle", you should omit -the second of those two lines. +That loads the \Xy-pic package and sets it so that the arrowheads used +are the same ones used in the rest of the document and the nodes in +the diagram are, by default, in \verb"\displaystyle". If you'd like +the default style for the nodes to be \verb"\textstyle", you should +omit the second of those two lines. This document uses all of those packages, and so we used the commands \begin{center} @@ -271,8 +285,7 @@ This document uses all of those packages, and so we used the commands %--------------------------------------------------------------------- -\subsection{\texttt{\char`\\begin\{document\}} and - \texttt{\char`\\end\{document\}}} +\subsection{\texttt{\bs begin\{document\}} and \texttt{\bs end\{document\}}} Everything that is to appear in the document must appear in between the \verb"\begin{document}" and \verb"\end{document}" commands. There @@ -343,7 +356,6 @@ I began this subsubsection with the command \begin{center} \verb"\subsubsection{Yes, there are subsubsections too}" \end{center} -I refuse to even experiment to see if there are subsubsubsections. %-------------------------------------------------------------------- \subsubsection*{Sections without numbers} @@ -363,7 +375,7 @@ then you'll begin a new section that will not have a number. \subsection{Italics \emph{for emphasis}} If you want to use italics to emphasize a word or two, the \LaTeX{} -convention is not to switch explicitly to italics, but rather to use +convention is not to explicitly switch to italics, but rather to use the command \verb"\emph" (which means \emph{emphasize}). This command works just like a font change command, except that it switches you \emph{into} italics if the current font is upright and switches you @@ -433,10 +445,10 @@ source file, but this isn't very likely.) \subsubsection*{The Table of Contents} If you give the command \verb"\tableofcontents", then \LaTeX{} will -try to write a table of contents, including the page numbers of the -sections. Obviously, \LaTeX{} can't know those page numbers or -section titles yet, so as \LaTeX{} processes your file, it writes a -\verb".toc" file containing the information it needs. (The +try to write a table of contents at that point, including the page +numbers of the sections. Obviously, \LaTeX{} can't know those page +numbers or section titles yet, so as \LaTeX{} processes your file, it +writes a \verb".toc" file containing the information it needs. (The \verb".toc" file for these instructions is \verb"amshelp.toc".) Once again, \LaTeX{} is always using the information from the \emph{last} time that it processed your file. @@ -472,7 +484,7 @@ incorrect, you won't be warned to run \LaTeX{} again. %--------------------------------------------------------------------- %--------------------------------------------------------------------- -\section{Title, Author, and the \texttt{\char`\\maketitle} command} +\section{Title, Author, and the \texttt{\bs maketitle} command} This stuff should go right after the \verb"\begin{document}" command. I'll give a quick sketch here, which is probably all you'll ever @@ -494,9 +506,9 @@ These instructions used the title command with \AmS-\LaTeX} \end{verbatim} Notice that you indicate line breaks in the title with a double -backslash. If I had decided to omit the line break and have the full -title printed in the head of the odd numbered pages, I would have used -the command +backslash. If I had decided to omit the line break and also to have +the full title printed in the head of the odd numbered pages, I would +have used the command \begin{center} \verb"\title{Getting up and running with \AmS-\LaTeX}" \end{center} @@ -574,7 +586,7 @@ To have the date of processing used, use the command \verb"\date{\today}". %--------------------------------------------------------------------- -\subsection{\texttt{\char`\\maketitle}} +\subsection{\texttt{\bs maketitle}} After you've given all of the commands mentioned in this section, you can give the command \verb"\maketitle". If you \emph{don't} give the @@ -588,8 +600,8 @@ author's address at the \emph{end} of the paper. \section{Theorems, Propositions, Lemmas, etc.} The instructions in this section assume that you're using the -\verb"\newtheorem" commands that I put in the file -\verb"template.tex". +\verb"\newtheorem" commands that I put in the file \verb"template.tex" +(see section~\ref{sec:template}). %-------------------------------------------------------------------- \subsection{Stating theorems, propositions, etc.} @@ -748,8 +760,6 @@ upright font; see section~\ref{sec:EqRef}.) The convention is to use bibliography entries (see section~\ref{sec:bibreferences}), and \verb"\ref" to refer to everything else. - - Consider the following example. \begin{thm} \label{homotopy} @@ -897,11 +907,11 @@ cause errors when used, e.g., in the optional argument to a \subsubsection{Multiple references} \label{sec:mulref} -If you want to refer to multiple bibliography items, and have the item -numbers automatically sorted and compressed (e.g., replacing ``7, 6, -5, 8'' with ``5--8''), you can use the \verb"\cites" command. For -example, if we type \verb"\cites{HA,yellowmonster}" then we get -\cites{HA,yellowmonster}. +If you're using \texttt{amsrefs} and when you refer to multiple +bibliography items you want to have the item numbers automatically +sorted and compressed (e.g., replacing ``7, 6, 5, 8'' with ``5--8''), +you can use the \verb"\cites" command. For example, if we type +\verb"\cites{HA,yellowmonster}" then we get \cites{HA,yellowmonster}. If you want some of the references in the list to have annotations, you put your \verb"\cite" commands into the argument of a @@ -913,11 +923,12 @@ get \citelist{\cite{HA}*{Chapter I} \cite{yellowmonster}}. \subsubsection{Author-year citations} \label{sec:authyrcit} -If you use the \texttt{author-year} option to convert your references -to the author-year format (see section~\ref{sec:refoptions}), then -there are two variations on the \verb"\cite" command (\verb"\ycite" -and \verb"\ocite") that are useful. If we were using the -\texttt{author-year} option in this document, then +If you're using \texttt{amsrefs} and you use the \texttt{author-year} +option to convert your references to the author-year format (see +section~\ref{sec:refoptions}), then there are two variations on the +\verb"\cite" command (\verb"\ycite" and \verb"\ocite") that are +useful. If we were using the \texttt{author-year} option in this +document, then \begin{center} \begin{tabular}{l@{ would be typeset as }l} ``\verb"\cite{yellowmonster}"''& ``(Bousfield and Kan, 1972)''\\ @@ -946,7 +957,9 @@ you'll get \begin{center} Let $f\colon X \to Y$ be a continuous function. \end{center} - +(Note that if we had typed that as ``\verb"f: X \to Y"'' then the +spacing around the colon would be wrong, since the colon symbol is +typeset as a binary relation, with spaces on the two sides equal.) The only novelty that \LaTeX{} introduces is that, instead of using a dollar sign to toggle math mode on and off, you can use `\verb"\("' to \emph{begin} math mode, and `\verb"\)"' to \emph{end} math mode. @@ -1003,10 +1016,10 @@ If you later type ``\verb"see formula~\eqref{pi1eqn}"'' you'll get ``see formula~\eqref{pi1eqn}.'' (For more on cross-references to formulas, see section~\ref{sec:thmrefs}.) -To display mathematics without an equation number, you use the -\verb"equation*" environment. (This is a common \LaTeX ism: Adding an -asterisk to the name of a numbered \LaTeX{} environment often gives -the unnumbered equivalent.) If you type +To display a single line of mathematics without an equation number, +you use the \verb"equation*" environment. (This is a common \LaTeX +ism: Adding an asterisk to the name of a numbered \LaTeX{} environment +often gives the unnumbered equivalent.) If you type \begin{verbatim} \begin{equation*} \pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y @@ -1016,35 +1029,65 @@ then you'll get \begin{equation*} \pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y \end{equation*} -There are several essentially equivalent ways of producing this -unnumbered display: The \verb"displaymath" environment, used as in +The \texttt{displaymath} environment is equivalent to this; you can +produce the same unnumbered display by typing \begin{verbatim} \begin{displaymath} \pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y \end{displaymath} \end{verbatim} -accomplishes the same thing, as will either +You can also produce that same unnumbered display by typing +\begin{verbatim} +\[ + \pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y +\] +\end{verbatim} +but some people think that that makes your \LaTeX{} source file less +readable. Although you can also produce the same thing by typing \begin{verbatim} $$ \pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y $$ \end{verbatim} -or +using double dollar signs is definitely deprecated. + +%-------------------------------------------------------------------- +\subsection{Text in displayed mathematics} +\label{sec:text} + +To include text in a displayed mathematics environment, you use the +\verb"\text" command, as in \verb"\text{here's some text}". The +\verb"\text" command is preferable to the standard \LaTeX{} +\verb"\mbox" command because \verb"\text" correctly adjusts its size +for use in subscripts and superscripts. For example, if you type \begin{verbatim} -\[ - \pi_{1}(X \vee Y) \approx \pi_{1}X * \pi_{1}Y -\] +\begin{equation*} + \pi_{1}(X) \approx G * H + \quad\text{where $G$ is torsion and $H$ is torsion free} +\end{equation*} \end{verbatim} -It's generally thought to be a better idea to use either the -\verb"equation*" environment or the \verb"displaymath" environment for -displays, and to avoid the double dollar signs and the -\verb"\[",~\verb"\]" pair. +then you'll get +\begin{equation*} + \pi_{1}(X) \approx G * H + \quad\text{where $G$ is torsion and $H$ is torsion free} +\end{equation*} +and if you type +\begin{verbatim} +\begin{equation*} + X_{n} = \coprod_{\text{monomorphisms $[k] \to [n]$}} S_{k} +\end{equation*} +\end{verbatim} +then you'll get +\begin{equation*} + X_{n} = \coprod_{\text{monomorphisms $[k] \to [n]$}} S_{k} +\end{equation*} + %-------------------------------------------------------------------- \subsection{Displaying several equations without alignment} \label{sec:gather} -You can put several displayed lines together, each one centered with +You can put several displayed lines together, each one centered, with no alignment between the different lines, using the \verb"gather" environment. When typing this, the lines are separated by a double backslash \verb"\\". For example, if you type @@ -1078,15 +1121,21 @@ refer to them: If you had typed that as and then typed ``\verb"see \eqref{eq:push} or \eqref{eq:pull}"'', you'd get ``see \eqref{eq:push} or \eqref{eq:pull}''. +There is also a \texttt{gathered} environment, which does not produce +a display of its own but rather produces a block of centered lines of +mathematics that can be used inside of another displayed mathematics +environment (see section~\ref{sec:gathered}). %-------------------------------------------------------------------- -\subsection{Displays over several lines without alignment} +\subsection{Displays with linebreaks} \label{sec:multline} For a long display that must be broken across several lines, you can -use the \verb"multline" environment. When typing this, the lines are -separated by a double backslash \verb"\\". The first line will be -shifted left of center, the last will be shifted right of center, and -the lines in between those will be centered. For example, if you type +use the \texttt{multline} environment. (There is also a +\texttt{multline*} environment, which is similar except that it omits +the equation number.) When typing this, the lines are separated by a +double backslash \verb"\\". The first line will be shifted left of +center, the last will be shifted right of center, and the lines in +between those will be centered. For example, if you type \begin{verbatim} \begin{multline} \label{eq:BigComp} @@ -1117,20 +1166,49 @@ then you'll get You can then type ``\verb"the composition \eqref{eq:BigComp}"" and it will appear as ``the composition \eqref{eq:BigComp}''. -The \verb"multline*" environment is similar, except that it omits the -equation number. - - %-------------------------------------------------------------------- \subsection{Displays with alignment} \label{sec:align} +There are a number of ways to produce displays with multiple lines and +horizontal alignment between the lines. +\begin{itemize} +\item The \texttt{align} and \texttt{align*} environments allow + horizontal alignment of characters chosen from each line (see + section~\ref{sec:SingAlign}). +\item The \texttt{aligned} and \texttt{split} environments produce + alignments that can be be part of a larger display (see + section~\ref{sec:aligned}). +\item The \texttt{gathered} environment produces a block of several + lines, each centered as in the \texttt{gather} environment (see + section~\ref{sec:gather}), that can be part of a larger display (see + section~\ref{sec:gathered}). (Of course, this doesn't involve + horizontal alignment, but the \texttt{gathered} environment is often + used in conjunction with other display environments.) +\item The \texttt{align} and \texttt{align*} environments also allow + for multiple alignment points (see section~\ref{sec:MulAlign}). +\item The \texttt{flalign} and \texttt{flalign*} environments allow + multiple alignment points and place the outermost aligned blocks + flush against the margins (see section~\ref{sec:flalign}). +\item The \texttt{alignat} and \texttt{alignat*} environments allow + multiple alignment points and allow you to choose the spacing + between the columns (see section~\ref{sec:alignat}). +\item The \texttt{alignedat} environment is similar to the + \texttt{alignat*} environment, except that it produces an alignment + intended to be part of a larger display (see + section~\ref{sec:alignedat}). +\end{itemize} +%-------------------------------------------------------------------- +\subsubsection{Displays with a single alignment point} +\label{sec:SingAlign} + To display several lines of mathematics with alignment between the -lines, you use the \verb"align" environment. When typing this, the -lines are separated by a double backslash \verb"\\" and each line has -an ampersand \verb"&" immediately preceding the symbol to be aligned -with the corresponding symbols on the other lines. For example, if -you type +lines, you use the \texttt{align} environment. (There is also an +\texttt{align*} environment, which is similar except that it omits the +equation numbers.) When typing this, the lines are separated by a +double backslash \verb"\\" and each line has an ampersand \verb"&" +immediately preceding the symbol to be aligned with the corresponding +symbols on the other lines. For example, if you type \begin{verbatim} \begin{align} \label{eq:pi1} @@ -1149,10 +1227,8 @@ then you'll get \widetilde{\mathrm{H}}_{*}X \oplus \widetilde{\mathrm{H}}_{*}Y \end{align} and if you type ``\verb"see \eqref{eq:pi1} or \eqref{eq:additivity}"'' -then you'll get ``see \eqref{eq:pi1} or \eqref{eq:additivity}''. - -The \verb"align*" environment is similar, except that it omits the -equation numbers. For example, if you type +then you'll get ``see \eqref{eq:pi1} or \eqref{eq:additivity}''. For +another example, if you type \begin{verbatim} \begin{align*} \mathcal{M}\bigl((\operatorname{colim} \boldsymbol{X}) @@ -1174,67 +1250,257 @@ then you'll get &\approx \mathcal{M}\bigl(\operatorname{colim} (\boldsymbol{X} \otimes K),Y\bigr) \end{align*} +Both the \texttt{align} and \texttt{align*} environments allow you to +have multiple columns in the display; for this, see +section~\ref{sec:MulAlign}. -Another way to have multiple line displays with alignment is to use -the \verb"split" environment, which must go inside of some other -displayed mathematics environment. For example, if you type +%-------------------------------------------------------------------- +\subsubsection{Alignments that are part of a larger display} +\label{sec:aligned} + +The \texttt{aligned} environment does not create a display of its own. +Instead, it allows you to have several lines of mathematics, with +alignment as in the \texttt{align*} environment (see +section~\ref{sec:SingAlign}), which can then be used inside of a +displayed mathematics environment. + +There is also a \texttt{split} environment, which is similar to the +\texttt{aligned} environment except that the \texttt{aligned} +environment has options (changing the vertical alignment (see the +examples in this section) or having multiple alignment points (see +section~\ref{sec:MulAlign})) that are not possible with the +\texttt{split} environment. Thus, a \texttt{split} environment can +always be replaced by an \texttt{aligned} environment. + +For example, if you type \begin{verbatim} \begin{equation} - \label{eq:split} - \begin{split} + \label{eq:dblaligned} + \begin{aligned} a &= b + c\\ d &= e + f - \end{split} + \end{aligned} + \qquad\text{which, of course, leads to}\qquad + \begin{aligned} + g &= h + i\\ + j &= k + l + \end{aligned} \end{equation} \end{verbatim} then you'll get \begin{equation} - \label{eq:split} - \begin{split} + \label{eq:dblaligned} + \begin{aligned} a &= b + c\\ d &= e + f - \end{split} + \end{aligned} + \qquad\text{which, of course, leads to}\qquad + \begin{aligned} + g &= h + i\\ + j &= k + l + \end{aligned} \end{equation} -The \verb"split" environment doesn't produce any equation numbers of -its own, and if the enclosing display environment produces a number -then that number is centered vertically in the contents of the -\verb"split". This can also be useful if you need to display one very -long equation that you need to split over multiple lines and you want -the equation number to be centered vertically. For example, if you -type + +The above example illustrates that, by default, when an +\texttt{aligned} (or \texttt{aligned*}) environment is used as part of +a display involving other elements, it is vertically aligned at its +center. The \texttt{aligned} environment can take an optional +argument of \texttt{[t]} or \texttt{[b]} to cause the alignment to be +at either the top or the bottom row. For example, if you type +\begin{verbatim} +\begin{equation} + \label{eq:dbltop} + \begin{aligned}[t] + a &= b + c\\ + d &= e + f + \end{aligned} + \qquad\text{which, of course, leads to}\qquad + \begin{aligned}[t] + g &= h + i\\ + j &= k + l + \end{aligned} +\end{equation} +\end{verbatim} +then you'll get +\begin{equation} + \label{eq:dbltop} + \begin{aligned}[t] + a &= b + c\\ + d &= e + f + \end{aligned} + \qquad\text{which, of course, leads to}\qquad + \begin{aligned}[t] + g &= h + i\\ + j &= k + l + \end{aligned} +\end{equation} +and if you type +\begin{verbatim} +\begin{equation} + \label{eq:dblbot} + \begin{aligned}[b] + a &= b + c\\ + d &= e + f + \end{aligned} + \qquad\text{which, of course, leads to}\qquad + \begin{aligned}[b] + g &= h + i\\ + j &= k + l + \end{aligned} +\end{equation} +\end{verbatim} +then you'll get +\begin{equation} + \label{eq:dblbot} + \begin{aligned}[b] + a &= b + c\\ + d &= e + f + \end{aligned} + \qquad\text{which, of course, leads to}\qquad + \begin{aligned}[b] + g &= h + i\\ + j &= k + l + \end{aligned} +\end{equation} + +The \textbf{aligned} environment doesn't produce any equation numbers +of its own. If the enclosing display environment produces a number, +and if the \texttt{aligned} environment doesn't use the optional +argument of \texttt{[t]} or \texttt{[b]}, then that number is centered +vertically in the contents of the \texttt{aligned}. This can also be +useful if you need to display one very long equation that you need to +split over several lines and you want the equation number to be +centered vertically. For example, if you type \begin{verbatim} \begin{equation} \label{eq:longeq} - \begin{split} + \begin{aligned} F(a,b,c,d) &= \int_{a}^{b} \sin^{3}x \cos^{2}x \, dx + \int_{c}^{d} \sin^{3}x \cos x \, dx\\ &\quad + \int_{a}^{b} \sin^{2} x \cos^{2} x \, dx + \int_{c}^{d} \sin x \cos x \, dx - \end{split} + \end{aligned} \end{equation} \end{verbatim} then you'll get \begin{equation} \label{eq:longeq} - \begin{split} + \begin{aligned} F(a,b,c,d) &= \int_{a}^{b} \sin^{3}x \cos^{2}x \, dx + \int_{c}^{d} \sin^{3}x \cos x \, dx\\ &\quad + \int_{a}^{b} \sin^{2} x \cos^{2} x \, dx + \int_{c}^{d} \sin x \cos x \, dx - \end{split} + \end{aligned} +\end{equation} + +The display created by an \texttt{aligned} environment can be used as +an element of a display. For example, if you type +\begin{verbatim} +\begin{equation*} + \left . + \begin{aligned} + f(x) &= \sin^{2} x\\ + g(x) &= \cos^{2} x\\ + h(x) &= \sin x + \cos x + \end{aligned} + \right \} + \qquad \text{A nice collection of functions} +\end{equation*} +\end{verbatim} +then you'll get +\begin{equation*} + \left . + \begin{aligned} + f(x) &= \sin^{2} x\\ + g(x) &= \cos^{2} x\\ + h(x) &= \sin x + \cos x + \end{aligned} + \right \} + \qquad \text{A nice collection of functions} +\end{equation*} + + +%-------------------------------------------------------------------- +\subsubsection{Several centered lines as part of a larger display} +\label{sec:gathered} + +The \texttt{gathered} environment does not create a display of its +own. Instead, it allows you to have several lines of mathematics, +each one centered as in the \texttt{gather} environment (see +section~\ref{sec:gather}), which can then be used inside of a +displayed mathematics environment. For example, if you type +\begin{verbatim} +\begin{equation} + \begin{gathered} + x^{2} + y^{2} = z^{2}\\ + a = b + c + \end{gathered} + \qquad \text{and, in addition,}\qquad + \begin{aligned} + A &= B+C\\ + &= D+E + \end{aligned} +\end{equation} +\end{verbatim} +then you'll get +\begin{equation} + \begin{gathered} + x^{2} + y^{2} = z^{2}\\ + a = b + c + \end{gathered} + \qquad \text{and, in addition,}\qquad + \begin{aligned} + A &= B+C\\ + &= D+E + \end{aligned} \end{equation} +The \texttt{gathered} environment can take the same optional argument +of \texttt{[t]} or \texttt{[b]} that the \texttt{aligned} argument can +take (see section~\ref{sec:aligned}) to cause the vertical alignment +to be on either the top or the bottom line. For example, if you type +\begin{verbatim} +\begin{equation} + \begin{gathered}[t] + x^{2} + y^{2} = z^{2}\\ + a = b + c + \end{gathered} + \qquad \text{and, in addition,}\qquad + \begin{aligned}[t] + A &= B+C\\ + &= D+E + \end{aligned} +\end{equation} +\end{verbatim} +then you'll get +\begin{equation} + \begin{gathered}[t] + x^{2} + y^{2} = z^{2}\\ + a = b + c + \end{gathered} + \qquad \text{and, in addition,}\qquad + \begin{aligned}[t] + A &= B+C\\ + &= D+E + \end{aligned} +\end{equation} %-------------------------------------------------------------------- \subsubsection{Multiple alignment points} \label{sec:MulAlign} -The \verb"align" and \verb"align*" environments can be used to put -multiple displays on each of multiple lines, with alignment between -the lines. When typing this, the lines are separated by a double -backslash \verb"\\", the different displays on each line are separated -by an ampersand \verb"&", and the symbols to be aligned are preceded -by an ampersand \verb"&". For example, if you type +The \texttt{align} and \texttt{align*} environments (see +section~\ref{sec:SingAlign}) as well as the \texttt{aligned} +environment (see section~\ref{sec:aligned}) can be used to create +displays in which each line is broken into several pieces, with each +piece horizontally aligned at a chosen character. That is: they can +be used to create a display with several columns, with alignment +within each column. + +When typing this, the lines are separated by a double backslash +\verb"\\", the different displays on each line are separated by an +ampersand \verb"&", and the symbols to be aligned are preceded by an +ampersand \verb"&". For example, if you type \begin{verbatim} \begin{align*} K &\approx G * H& i&= j+k& B &\subset C\\ @@ -1250,6 +1516,9 @@ then you'll get G &\approx \coprod_{\alpha\in A} L_{\alpha}& i''&=j''+k''& A &= D \cup E \end{align*} +When typing such an alignment with $n$ columns, each line will have at +most $2n+1$ columns. + For another example, if you type \begin{verbatim} \begin{align*} @@ -1320,58 +1589,49 @@ then you'll get K &\approx G*H& \qquad&\text{(by an earlier theorem)}\\ A &\approx \lim_{i\in I} A_{i}& &\text{(by the definition of $A$)} \end{alignat} -Note that it's only necessary to insert the space in one row; the -alignment forces the space to appear in all rows. - +Note that it's only necessary to insert the \verb"\qquad" space in one +row; the alignment forces the space to appear in all rows. %-------------------------------------------------------------------- -\subsection{Displays that are part of a larger display} -\label{sec:LgDsp} - -In addition to the environments that create an entire display -(\texttt{equation}, \texttt{multline}, \texttt{align}, -\texttt{flalign}, and \texttt{alignat}), there are environments that -can be used as components of a larger display: -\begin{center} - \begin{tabular}{l@{\quad is similar to\quad}l} - \texttt{gathered}& \texttt{gather*}\\ - \texttt{aligned}& \texttt{align*}\\ - \texttt{alignedat}& \texttt{aligned*} - \end{tabular} -\end{center} -(There is also a \texttt{cases} environment, described in -section~\ref{sec:cases}, and we've already discussed the \verb"split" -environment in section~\ref{sec:align}.) - -For example, if you type +\subsubsection{Multiple alignment points with chosen spacing as part of a larger display} +\label{sec:alignedat} + +The \texttt{alignedat} environment is similar to the \texttt{aligned} +environment (see section~\ref{sec:aligned}), except that the +\texttt{alignedat} environment allows you to choose the spacing +between the columns. That is, the \texttt{alignedat} environment +doesn't insert any space between the columns, so you can insert the +exact amount of space you want by including it at the beginning of one +of the columns. The \texttt{alignedat} environment also has a +required argument stating the number of columns. For example, if you +type \begin{verbatim} -\begin{equation} - \begin{aligned} - A &= B+C\\ - &= D+E - \end{aligned} - \qquad \text{and, in addition,}\qquad - \begin{gathered} - x^{2} + y^{2} = z^{2}\\ - a=b+c - \end{gathered} -\end{equation} +\begin{equation*} + \left \{ + \begin{alignedat}{2} + a &= b + c& d &= e + f\\ + A &= B + C \qquad& D &= E + F + \end{alignedat} + \right \} + \qquad \text{Twin pairs of equations} +\end{equation*} \end{verbatim} then you'll get -\begin{equation} - \begin{aligned} - A &= B+C\\ - &= D+E - \end{aligned} - \qquad \text{and, in addition,}\qquad - \begin{gathered} - x^{2} + y^{2} = z^{2}\\ - a=b+c - \end{gathered} -\end{equation} +\begin{equation*} + \left \{ + \begin{alignedat}{2} + a &= b + c& d &= e + f\\ + A &= B + C \qquad& D &= E + F + \end{alignedat} + \right \} + \qquad \text{Twin pairs of equations} +\end{equation*} +Note that it's only necessary to insert the \verb"\qquad" space in one +row; the alignment forces the space to appear in all rows. + %-------------------------------------------------------------------- -\subsection{Cases} +\subsection{The \texttt{cases} environment} \label{sec:cases} There is a \texttt{cases} environment, which constructs the usual @@ -1454,7 +1714,7 @@ then you'll get %-------------------------------------------------------------------- %-------------------------------------------------------------------- -\section{Commutative diagrams using \Xy-pic} +\section{Commutative diagrams using \texorpdfstring{\Xy-pic}{Xy-pic}} \label{sec:xypic} \Xy-pic is a powerful package that enables you to draw very complex @@ -1464,8 +1724,9 @@ part of \AmS-LaTeX, but \Xy-pic and \AmS-LaTeX{} work quite well together. We'll describe the most important features of \Xy-pic's commutative diagram macros here. The full documentation for commutative diagrams can be found in the \emph{\Xy-pic User's Guide} -\cite{xyguide}, and the full documentation for all of \Xy-pic can be -found in the \emph{\Xy-pic Reference Manual} \cite{xyrefer}. +\cite{xyguide}, and the full documentation for all of \Xy-pic, which +can do quite a bit more than draw commutative diagrams, can be found +in the \emph{\Xy-pic Reference Manual} \cite{xyrefer}. To use \Xy-pic to draw commutative diagrams, you include the lines \begin{center} @@ -1484,12 +1745,16 @@ followed by a pair of braces that enclose the diagram specification. The diagram is described in a manner similar to the way matrices are described: \begin{enumerate} -\item There is a rectangular array of nodes of the diagram. +\item There is a rectangular array of nodes of the diagram. A node + should not begin with a macro or with an asterisk, and so it's + safest (although not always required) to enclose each node in braces + \verb"{}". \item The nodes in a row are separated by an ampersand \verb"&", and the rows are separated by a double backslash \verb"\\". \item An arrow is specified immediately following the node that is its - source. A straight line arrow is specified by \verb"\ar[target]", - where \verb"target" is + source (although this is not actually required; see + section~\ref{sec:SrcTrgt}). A straight line arrow is specified by + \verb"\ar[target]", where \verb"target" is \begin{itemize} \item \verb"r" for the node one place to the right, \item \verb"l" for the node one place to the left, @@ -1506,7 +1771,7 @@ section~\ref{sec:labelarrow}), arrows that are built of things other than a single solid line with a single arrowhead at the end (see section~\ref{sec:arstyle}), curved arrows (see section~\ref{sec:arcurve}), and arrows that pass over or under other -arrows (see section~\ref{sec:ArUnder}). +arrows (see sections~\ref{sec:ArUnder} and~\ref{sec:CrossArrow}). For example, if you type @@ -1583,6 +1848,9 @@ you'll get &&{F} } \end{equation*} +Note that that diagram has three rows and three columns, but two of +the nodes in the second column and one of the nodes in the third +column are missing. %-------------------------------------------------------------------- \subsection{Changing the spacing} @@ -1601,7 +1869,13 @@ brace that begins the diagram specification: \end{center} The \texttt{dimen} in all of these commands can be positive, zero, or negative. (Negative \texttt{dimen}'s can be useful in diagrams with -very wide entries; see \eqref{diag:wide}.) +very wide entries; see \eqref{diag:wide}.) Although you can use +whatever units you like for \texttt{dimen} (e.g., inches +(\texttt{in}), centimeters (\texttt{cm}), points (\texttt{pt}), etc.), +it's a good idea to measure vertical distances in \texttt{ex} (roughly +the height of an upper case ``X'') and horizontal distances in +\texttt{em} (roughly the width of an upper case ``M''), so that the +distance will be roughly correct even if you change font sizes. For example, if you type \begin{verbatim} @@ -1668,66 +1942,128 @@ type \begin{verbatim} \newcommand{\pushout}[3]{#1\mathbin{\mathord{\amalg}_{#2}}#3} \begin{equation} - \xymatrix@C=-12em{ - {\pushout{(A\otimes L)} - {A\otimes K} - {(B\otimes K)} - } \ar[r] \ar[dr] - & {B\otimes L} - & {\pushout{(P\otimes L)} - {P\otimes M} - {(Q\otimes M)} - } \ar[l] \ar[dl]\\ - & {\pushout{\bigl(\pushout{(A\otimes L)} - {A\otimes K} - {(B\otimes K)}\bigr)} - {\pushout{(X\otimes L)} - {X\otimes K} - {(Y\otimes K)}} - {\bigl(\pushout{(P\otimes L)} - {P\otimes M} - {(Q\otimes M)}\bigr)} - } \ar[u] - } + \label{diag:wide} + \vcenter{ + \xymatrix@C=-12em{ + {\pushout{(A\otimes L)} + {A\otimes K} + {(B\otimes K)} + } \ar[r] \ar[dr] + & {B\otimes L} + & {\pushout{(P\otimes L)} + {P\otimes M} + {(Q\otimes M)} + } \ar[l] \ar[dl]\\ + & {\pushout{\bigl(\pushout{(A\otimes L)} + {A\otimes K} + {(B\otimes K)}\bigr)} + {\pushout{(X\otimes L)} + {X\otimes K} + {(Y\otimes K)}} + {\bigl(\pushout{(P\otimes L)} + {P\otimes M} + {(Q\otimes M)}\bigr)} + } \ar[u] + } + } \end{equation} \end{verbatim} then you'll get \newcommand{\pushout}[3]{#1\mathbin{\mathord{\amalg}_{#2}}#3} \begin{equation} \label{diag:wide} - \xymatrix@C=-12em{ - {\pushout{(A\otimes L)} - {A\otimes K} - {(B\otimes K)} - } \ar[r] \ar[dr] - & {B\otimes L} - & {\pushout{(P\otimes L)} - {P\otimes M} - {(Q\otimes M)} - } \ar[l] \ar[dl]\\ - & {\pushout{\bigl(\pushout{(A\otimes L)} - {A\otimes K} - {(B\otimes K)}\bigr)} - {\pushout{(X\otimes L)} - {X\otimes K} - {(Y\otimes K)}} - {\bigl(\pushout{(P\otimes L)} - {P\otimes M} - {(Q\otimes M)}\bigr)} - } \ar[u] - } + \vcenter{ + \xymatrix@C=-12em{ + {\pushout{(A\otimes L)} + {A\otimes K} + {(B\otimes K)} + } \ar[r] \ar[dr] + & {B\otimes L} + & {\pushout{(P\otimes L)} + {P\otimes M} + {(Q\otimes M)} + } \ar[l] \ar[dl]\\ + & {\pushout{\bigl(\pushout{(A\otimes L)} + {A\otimes K} + {(B\otimes K)}\bigr)} + {\pushout{(X\otimes L)} + {X\otimes K} + {(Y\otimes K)}} + {\bigl(\pushout{(P\otimes L)} + {P\otimes M} + {(Q\otimes M)}\bigr)} + } \ar[u] + } + } \end{equation} which would never fit on the page without negative column spacing. %-------------------------------------------------------------------- -\subsection{Arrows passing under} +\subsection{Shifting nodes sideways} +\label{sec:ShiftSide} + +You can shift a node to the right by enclosing it in braces and +preceding the opening brace with \verb"*+[r]" and shift it to the left +by enclosing it in braces and preceding the opening brace with +\verb"*+[l]". This can be useful, for example, if you want a node to +consist of both the name of something and its definition, but you want +the arrows to the node to point to the name, rather than to the center +of the node. For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & *+[r]{B = \{x \in W \mid f(x) > 0\}} \ar[d]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & *+[r]{B = \{x \in W \mid f(x) > 0\}} \ar[d]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +Note that the large node at the upper right caused the columns to be +far apart, even though that node was shifted to the right before being +placed onto the page. To counteract that, you can decrease the column +spacing: If you type +\begin{verbatim} +\begin{displaymath} + \xymatrix@C=-2em{ + {A} \ar[r] \ar[d] + & *+[r]{B = \{x \in W \mid f(x) > 0\}} \ar[d]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix@C=-2em{ + {A} \ar[r] \ar[d] + & *+[r]{B = \{x \in W \mid f(x) > 0\}} \ar[d]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} + + + +%-------------------------------------------------------------------- +\subsection{Arrows passing under nodes; crossing arrows} \label{sec:ArUnder} Arrows can be created that go to a sequence of nodes, passing under (i.e., leaving a small gap at) all the intermediate nodes. If an arrow is created that passes under an empty node while a second arrow crosses that node in the normal way, the effect is that the first -arrow passes under the second arrow. +arrow passes under the second arrow. (For another way to have one +arrow pass under another, see section~\ref{sec:CrossArrow}.) To draw an arrow that passes under a sequence of nodes and then goes on to a final node, the \verb"\ar" is followed by \verb"'[node]" for @@ -1819,8 +2155,10 @@ see section~\ref{sec:arbreak}.) By default, the label is located halfway from the center of the source to the center of the target. This will often be halfway along the arrow, but not if the source and the target are of different sizes. There are also options to place -the label halfway along the arrow (see section~\ref{sec:arcent}) or at -an arbitrary point along the arrow (see section~\ref{sec:LblArb}). +the label along the midpoint of the arrow (see +section~\ref{sec:arcent}) or at an arbitrary point between the center +of the source and the center of the target (see +section~\ref{sec:LblArb}). To put a label above an arrow (where ``above'' means when the paper is oriented so that the arrow goes left to right), you type @@ -1936,11 +2274,11 @@ then you'll get In addition to the possibility of centering a label along an arrow (see section~\ref{sec:arcent}), it is possible to place a label at an -arbitrary point along an arrow. If \texttt{a} is a number between $0$ -and $1$, then you can place a label \texttt{a} of the way from the -center of the source to the center of the target by typing \verb"(a)" -immediately following the \verb"^" or \verb"_". For example, if you -type +arbitrary point between the center of the source and the center of the +target. If \texttt{a} is a number between $0$ and $1$, then you can +place a label \texttt{a} of the way from the center of the source to +the center of the target by typing \verb"(a)" immediately following +the \verb"^" or \verb"_". For example, if you type \begin{verbatim} \begin{displaymath} \xymatrix@C=8em{ @@ -1965,7 +2303,7 @@ then you'll get } \end{displaymath} For a more elaborate example, with labels along segments of segmented -arrows, see diagram \eqref{diag:LblCube}. +arrows, see diagram~\ref{diag:LblCube}. %-------------------------------------------------------------------- @@ -1998,31 +2336,35 @@ For a more elaborate example, if you type \begin{verbatim} \begin{equation} \label{diag:LblCube} - \xymatrix@=2ex{ - {A} \ar[rr]^{f} \ar[dr] \ar[dd]_{i} - && {B} \ar[dr] \ar'[d][dd]^(.3){j}\\ - & {A'} \ar[rr]^(.3){f'} \ar[dd]^(.25){i'} - && {B'} \ar[dd]^{j'}\\ - {C} \ar'[r]^{g}[rr] \ar[dr] - && {D} \ar[dr]\\ - & {C'} \ar[rr]_{g'} - && {D'} - } + \vcenter{ + \xymatrix@=2ex{ + {A} \ar[rr]^{f} \ar[dr] \ar[dd]_{i} + && {B} \ar[dr] \ar'[d][dd]^(.3){j}\\ + & {A'} \ar[rr]^(.3){f'} \ar[dd]^(.25){i'} + && {B'} \ar[dd]^{j'}\\ + {C} \ar'[r]^{g}[rr] \ar[dr] + && {D} \ar[dr]\\ + & {C'} \ar[rr]_{g'} + && {D'} + } + } \end{equation} \end{verbatim} then you'll get \begin{equation} \label{diag:LblCube} - \xymatrix@=2ex{ - {A} \ar[rr]^{f} \ar[dr] \ar[dd]_{i} - && {B} \ar[dr] \ar'[d][dd]^(.3){j}\\ - & {A'} \ar[rr]^(.3){f'} \ar[dd]^(.25){i'} - && {B'} \ar[dd]^{j'}\\ - {C} \ar'[r]^{g}[rr] \ar[dr] - && {D} \ar[dr]\\ - & {C'} \ar[rr]_{g'} - && {D'} - } + \vcenter{ + \xymatrix@=2ex{ + {A} \ar[rr]^{f} \ar[dr] \ar[dd]_{i} + && {B} \ar[dr] \ar'[d][dd]^(.3){j}\\ + & {A'} \ar[rr]^(.3){f'} \ar[dd]^(.25){i'} + && {B'} \ar[dd]^{j'}\\ + {C} \ar'[r]^{g}[rr] \ar[dr] + && {D} \ar[dr]\\ + & {C'} \ar[rr]_{g'} + && {D'} + } + } \end{equation} @@ -2053,7 +2395,290 @@ then you'll get } \end{displaymath} +A label that breaks an arrow can be positioned anywhere along the +arrow, just as for labels placed alongside the arrow (see +sections~\ref{sec:arcent} and \ref{sec:LblArb}). For example, if you +type +\begin{verbatim} +\begin{equation*} + \xymatrix{ + {A \amalg_{B} C} \ar[r]|-{f} \ar[d]_{i} + & {X} \ar[r]|(.7){m} \ar[d]^{p} + & {Y} \ar[dl]|(.3)n\\ + {D} \ar[r]|-{g} + & {W \times_{Z} Y} + } +\end{equation*} +\end{verbatim} +then you'll get +\begin{equation*} + \xymatrix{ + {A \amalg_{B} C} \ar[r]|-{f} \ar[d]_{i} + & {X} \ar[r]|(.7){m} \ar[d]^{p} + & {Y} \ar[dl]|(.3)n\\ + {D} \ar[r]|-{g} + & {W \times_{Z} Y} + } +\end{equation*} +%-------------------------------------------------------------------- +\subsection{More crossing arrows} +\label{sec:CrossArrow} + +In section~\ref{sec:ArUnder} we presented a method of having an arrow +pass over another arrow by having them cross at an empty node. We +present here another method of having one arrow pass over another. + +To have one arrow appear to cross over another, we create a small gap +in the second arrow at the spot at which the first arrow will cross. +We do this by breaking that second arrow with a label, as in +section~\ref{sec:arbreak}, using the special label \verb"\hole", which +just leaves an empty hole in the arrow. For example, if you type +\begin{verbatim} +\begin{equation*} + \xymatrix{ + {A} \ar[dr]|{\hole} + & {B} \ar[dl]\\ + {C} + & {D} + } +\end{equation*} +\end{verbatim} +then you'll get +\begin{equation*} + \xymatrix{ + {A} \ar[dr]|{\hole} + & {B} \ar[dl]\\ + {C} + & {D} + } +\end{equation*} +For another example, if you type +\begin{verbatim} +\begin{equation*} + \xymatrix{ + {A} \ar[dr] \ar[r] \ar[d] + & {B} \ar[r] + & {C}\\ + {D} \ar[urr]|(.33){\hole} \ar[r] + & {E} + } +\end{equation*} +\end{verbatim} +then you'll get +\begin{equation*} + \xymatrix{ + {A} \ar[dr] \ar[r] \ar[d] + & {B} \ar[r] + & {C}\\ + {D} \ar[urr]|(.33){\hole} \ar[r] + & {E} + } +\end{equation*} +(see section~\ref{sec:LblArb}). It took some trial and error to +figure out that \texttt{.33} was the number to use in the arrow with +the hole, but there's a much better way specify the location of the +hole: Instead of inserting that number between 0 and 1 that specifies +how far from the center of the source to the center of the target the +break should appear, you can specify the place to put the break using +the notation \verb"!{[node1];[node2]}" to denote the point on the +arrow at which a straight line from \verb"[node1]" to \verb"[node2]" +would cross the arrow. (\emph{Note:} This method only works for +straight line arrows.) That is, if you type +\begin{verbatim} +\begin{equation*} + \xymatrix{ + {A} \ar[dr] \ar[r] \ar[d] + & {B} \ar[r] + & {C}\\ + {D} \ar[urr]|!{[u];[r]}{\hole} \ar[r] + & {E} + } +\end{equation*} +\end{verbatim} +then you'll get +\begin{equation*} + \xymatrix{ + {A} \ar[dr] \ar[r] \ar[d] + & {B} \ar[r] + & {C}\\ + {D} \ar[urr]|!{[u];[r]}{\hole} \ar[r] + & {E} + } +\end{equation*} +The position of the hole is specified as \verb"!{[u];[r]}" because the +arrow with the hole begins at $D$ and, relative to that node, the +arrow that crosses over goes from the node \verb"[u]" to the node +\verb"[r]". + +For another example, if you type +\begin{verbatim} +\begin{equation*} + \xymatrix{ + {A} \ar[d] \ar[dr] + & {B} \ar[d] \ar[dr] + & {C} \ar[d]\\ + {D} + \ar[urr]|!{[u];[r]}{\hole} + |!{[ur];[r]}{\hole} + |!{[ur];[rr]}{\hole} + & {E} + & {F} + } +\end{equation*} +\end{verbatim} +then you'll get +\begin{equation*} + \xymatrix{ + {A} \ar[d] \ar[dr] + & {B} \ar[d] \ar[dr] + & {C} \ar[d]\\ + {D} + \ar[urr]|!{[u];[r]}{\hole} + |!{[ur];[r]}{\hole} + |!{[ur];[rr]}{\hole} + & {E} + & {F} + } +\end{equation*} + + +%-------------------------------------------------------------------- +\subsection{Making room for large labels} +\label{sec:labelroom} + +Although \Xy-pic automatically leaves enough room for large nodes, it +ignores the size of the labels on the arrows when constructing the +diagram. Thus, if you have a particularly large label, it may +overwrite the nodes if you don't do something to make the diagram +larger. You can do that either by enlarging the entire diagram (see +section~\ref{sec:LblEnlrgeDiag}) or by creating a row (or column) all +of whose nodes are empty and have the arrows span the empty row (or +column) (see section~\ref{sec:emptynodes}). + +%-------------------------------------------------------------------- +\subsubsection{Enlarging the entire diagram} +\label{sec:LblEnlrgeDiag} + +To enlarge the entire diagram, we use the spacing commands described +in Section~\ref{sec:ChgSpc}. For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A\amalg B} \ar[d] + \ar[r]^-{\operatorname{amalgamate}} + & {X} \ar[r] \ar[d] + & {P} \ar[d]\\ + {C \amalg D} + \ar[r]_-{\operatorname{amalgamate}} + & {Y} \ar[r] + & {Q} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A\amalg B} \ar[d] + \ar[r]^-{\operatorname{amalgamate}} + & {X} \ar[r] \ar[d] + & {P} \ar[d]\\ + {C \amalg D} + \ar[r]_-{\operatorname{amalgamate}} + & {Y} \ar[r] + & {Q} + } +\end{displaymath} +but if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix@C=6em{ + {A\amalg B} \ar[d] \ar[r]^-{\operatorname{amalgamate}} + & {X} \ar[r] \ar[d] + & {P} \ar[d]\\ + {C \amalg D} \ar[r]_-{\operatorname{amalgamate}} + & {Y} \ar[r] + & {Q} + } +\end{displaymath} +\end{verbatim} +(see Section~\ref{sec:ChgSpc}) then you'll get +\begin{displaymath} + \xymatrix@C=6em{ + {A\amalg B} \ar[d] \ar[r]^-{\operatorname{amalgamate}} + & {X} \ar[r] \ar[d] + & {P} \ar[d]\\ + {C \amalg D} \ar[r]_-{\operatorname{amalgamate}} + & {Y} \ar[r] + & {Q} + } +\end{displaymath} +If you don't want to have to make the entire diagram larger, you can +just create a column of empty nodes (see +Section~\ref{sec:emptynodes}). +%-------------------------------------------------------------------- +\subsubsection{Creating a column of empty nodes} +\label{sec:emptynodes} + +We continue the discussion of Section~\ref{sec:LblEnlrgeDiag}: Instead +of enlarging the entire diagram, you can create an additional column +in between the first two columns and have all the nodes in the new +column be empty. For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A\amalg B} \ar[d] \ar[rr]^-{\operatorname{amalgamate}} + && {X} \ar[r] \ar[d] + & {P} \ar[d]\\ + {C \amalg D} \ar[rr]_-{\operatorname{amalgamate}} + && {Y} \ar[r] + & {Q} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A\amalg B} \ar[d] \ar[rr]^-{\operatorname{amalgamate}} + && {X} \ar[r] \ar[d] + & {P} \ar[d]\\ + {C \amalg D} \ar[rr]_-{\operatorname{amalgamate}} + && {Y} \ar[r] + & {Q} + } +\end{displaymath} +Note that that diagram has four columns, but both of the nodes in the +second column are empty, and the labelled arrows are created as +\verb"\ar[rr]". If you'd like to create even more space for that +large label, you can put an \verb"\hspace" command into one of the +nodes in the second column. For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A\amalg B} \ar[d] \ar[rr]^-{\operatorname{amalgamate}} + & {\hspace{3em}} + & {X} \ar[r] \ar[d] + & {P} \ar[d]\\ + {C \amalg D} \ar[rr]_-{\operatorname{amalgamate}} + && {Y} \ar[r] + & {Q} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A\amalg B} \ar[d] \ar[rr]^-{\operatorname{amalgamate}} + & {\hspace{3em}} + & {X} \ar[r] \ar[d] + & {P} \ar[d]\\ + {C \amalg D} \ar[rr]_-{\operatorname{amalgamate}} + && {Y} \ar[r] + & {Q} + } +\end{displaymath} +Note that we only put the \verb"\hspace" command into the first row; +there's no need to put it into every row. %-------------------------------------------------------------------- \subsection{Different arrow styles} @@ -2063,7 +2688,8 @@ It's possible to have arrows with tails, multiple heads, dotted, dashed, or multiple shafts, and any combination of these (see Table~\ref{tab:ArSty}). You can even omit both the head and the tail, or omit the arrow entirely, which is useful for placing things into -the diagram in places outside of the grid of nodes. +the diagram in places outside of the grid of nodes (see +Diagram~\ref{diag:CentEq}). \begin{table} \centering \begin{tabular}{c@{\qquad\qquad}l} @@ -2095,26 +2721,32 @@ All of these arrows can point in whatever direction you choose; we used \verb"[r]" in the table just for readability. For an example of the use of invisible arrows: If you type \begin{verbatim} -\begin{displaymath} - \xymatrix{ - {A} \ar@{.>}[r] \ar@{.>}[d] \ar@{}[dr]|{=} - & {B} \ar[d]\\ - {C} \ar[r] - & {D} +\begin{equation} + \label{diag:CentEq} + \vcenter{ + \xymatrix{ + {A} \ar@{.>}[r] \ar@{.>}[d] \ar@{}[dr]|{=} + & {B} \ar[d]\\ + {C} \ar[r] + & {D} + } } -\end{displaymath} +\end{equation} \end{verbatim} then you'll get -\begin{displaymath} - \xymatrix{ - {A} \ar@{.>}[r] \ar@{.>}[d] \ar@{}[dr]|{=} - & {B} \ar[d]\\ - {C} \ar[r] - & {D} +\begin{equation} + \label{diag:CentEq} + \vcenter{ + \xymatrix{ + {A} \ar@{.>}[r] \ar@{.>}[d] \ar@{}[dr]|{=} + & {B} \ar[d]\\ + {C} \ar[r] + & {D} + } } -\end{displaymath} - - +\end{equation} +Note that the equals sign is inserted by having it break the middle of +the invisible arrow from the upper left node to the lower right node. %-------------------------------------------------------------------- \subsection{Curved arrows} @@ -2159,11 +2791,18 @@ then you'll get \end{displaymath} If you'd like to specify the amount of curve, you can specify a dimension following the \verb"^" or the \verb"_", as in -\verb"\ar@/^1ex/[target]". For example, if you type +\verb"\ar@/^1ex/[target]". (Although you can use whatever units you +like for \texttt{dimen} (e.g., inches (\texttt{in}), centimeters +(\texttt{cm}), points (\texttt{pt}), etc.), it's a good idea to +measure vertical distances in \texttt{ex} (roughly the height of an +upper case ``X'') and horizontal distances in \texttt{em} (roughly the +width of an upper case ``M''), so that the distance will be roughly +correct even if you change font sizes.) For example, if you type \begin{verbatim} \begin{displaymath} \xymatrix{ - {A} \ar@/^3ex/[drr]^{p} \ar@{.>}[dr]|{\exists!} \ar@/_3ex/[ddr]_{q}\\ + {A} \ar@/^3ex/[drr]^{p} \ar@{.>}[dr]|{\exists!} + \ar@/_3ex/[ddr]_{q}\\ & {B} \ar[r] \ar[d] & {C} \ar[d]\\ & {D} \ar[r] @@ -2174,7 +2813,8 @@ dimension following the \verb"^" or the \verb"_", as in then you'll get \begin{displaymath} \xymatrix{ - {A} \ar@/^3ex/[drr]^{p} \ar@{.>}[dr]|{\exists!} \ar@/_3ex/[ddr]_{q}\\ + {A} \ar@/^3ex/[drr]^{p} \ar@{.>}[dr]|{\exists!} + \ar@/_3ex/[ddr]_{q}\\ & {B} \ar[r] \ar[d] & {C} \ar[d]\\ & {D} \ar[r] @@ -2243,6 +2883,21 @@ then you'll get & {B} } \end{displaymath} +Since the current node is denoted \verb"[]" (i.e., a pair of square +brackets with nothing inside), if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar@(ur,dr)[] + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar@(ur,dr)[] + } +\end{displaymath} %-------------------------------------------------------------------- \subsection{Sliding arrows sideways; multiple arrows} @@ -2250,11 +2905,16 @@ then you'll get It's possible to slide arrows sideways, so that you can have more than one straight line arrow between a single pair of nodes. To do this, -you type \verb"\ar@<distance>" to move the arrow ``upwards'' by -\verb"distance" (a negative distance will move the arrow -``downwards''). - -For example, if you type +you type \verb"\ar@<dimen>" to move the arrow ``upwards'' by +\verb"dimen" (where ``upwards'' means when the paper is held so that +the arrow goes from left to right). (A negative \verb"dimen" will +move the arrow ``downwards''.) Although you can use whatever units +you like for \texttt{dimen} (e.g., inches (\texttt{in}), centimeters +(\texttt{cm}), points (\texttt{pt}), etc.), it's a good idea to +measure vertical distances in \texttt{ex} (roughly the height of an +upper case ``X'') and horizontal distances in \texttt{em} (roughly the +width of an upper case ``M''), so that the distance will be roughly +correct even if you change font sizes. For example, if you type \begin{verbatim} \begin{displaymath} \xymatrix{ @@ -2279,7 +2939,7 @@ For another example, if you type \begin{displaymath} \xymatrix{ {\coprod_{i \in I} A_{i}\quad} - \ar@<2ex>[r]^-{\phi} \ar@<+.6ex>[r]_-{\psi} + \ar@<+.7ex>[r]^-{\phi} \ar@<-.7ex>[r]_-{\psi} & {\quad\coprod_{i \in I} B_{i}} } \end{displaymath} @@ -2288,10 +2948,400 @@ then you'll get \begin{displaymath} \xymatrix{ {\coprod_{i \in I} A_{i}\quad} - \ar@<2ex>[r]^-{\phi} \ar@<+.6ex>[r]_-{\psi} + \ar@<+.7ex>[r]^-{\phi} \ar@<-.7ex>[r]_-{\psi} & {\quad\coprod_{i \in I} B_{i}} } \end{displaymath} +It's also possible to slide curved arrows sideways. For example, if +you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar@/^ 1ex/[r] \ar@/^ 1ex/@<1ex>[r] + & {B} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar@/^ 1ex/[r] \ar@/^ 1ex/@<1ex>[r] + & {B} + } +\end{displaymath} + + +%-------------------------------------------------------------------- +\subsection{Specifying both the source and the target of an arrow} +\label{sec:SrcTrgt} + +Up until now, all of our examples of arrows have gone from the current +node to a node specified in the code for the arrow. It's possible, +however, to specify both the source and the target of an arrow, rather +than letting the source be the current node. + +To draw an arrow who's source is not at the current node, you type +\begin{center} + \verb"[source];[target]" +\end{center} +where you would have typed just \verb"[target]". Since the current +node is denoted \verb"[]", typing ``\verb"\ar[target]"'' is the same +as typing ``\verb"\ar[];[target]"''. + +For example, if you +type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} + & {B}\\ + {C} + & {D} + \ar^{f}[ul];[u] + \ar_{g}[l];[] + \ar_{h}[ul];[l] + \ar^{k}[u];[] + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} + & {B}\\ + {C} + & {D} + \ar^{f}[ul];[u] + \ar_{g}[l];[] + \ar_{h}[ul];[l] + \ar^{k}[u];[] + } +\end{displaymath} +Note that when we drew the arrows the current node was $D$, and so the +target of, e.g., the arrow labelled $g$ was specified as \verb"[]" +(which denotes the current node). + +%-------------------------------------------------------------------- +\subsection{Text objects} +\label{sec:TextObj} + +You can insert a text object into a diagram by typing +\begin{center} + \verb"*\txt{Some text}"\quad or\quad \verb"*\txt<width>{Some text}" +\end{center} +In the first form you create linebreaks with a double backslash +``\verb"\\"'' and in the second form the lines are broken +automatically. Text objects by default don't have any blank space +around them, but you can add a bit of space by typing them as +\verb"*+\txt{Some text}", or even more space by typing them as +\verb"*++\txt{Some text}". + +For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + *+\txt{Roses are red,\\ Violets are blue.\\ + This is a contrived example,\\ And the rhyme is bad too.} + \ar@{=>}[r] + & *\txt<2in>{Four score and seven years ago our fathers brought + forth on this continent a new nation, conceived in liberty, + and dedicated to the proposition that all men are created + equal.} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + *+\txt{Roses are red,\\ Violets are blue.\\ + This is a contrived example,\\ And the rhyme is bad too.} + \ar@{=>}[r] + & *\txt<2in>{Four score and seven years ago our fathers brought + forth on this continent a new nation, conceived in liberty, + and dedicated to the proposition that all men are created + equal.} + } +\end{displaymath} +We typed that first one as \verb"*+\txt" so that the arrow wouldn't +start too close to the text. + +You can also shift a text object to the left (so that arrows to or +from the object will go to its right end instead of its center) by +typing it as +% +\verb"*+[l]\txt{Some text}" or to the right (so that arrows to or from +the object will go to its left end instead of its center) by typing it +as +% +\verb"*+[r]\txt{Some text}". For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + *+[l]\txt{Interior} \ar[r] \ar[d] + & *+[r]\txt{Exterior} \ar[d]\\ + {A} \ar[r] + & {B} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + *+[l]\txt{Interior} \ar[r] \ar[d] + & *+[r]\txt{Exterior} \ar[d]\\ + {A} \ar[r] + & {B} + } +\end{displaymath} + +Text objects are mostly used for adding annotations to a diagram (see +section~\ref{sec:Drop}). + +%-------------------------------------------------------------------- +\subsection{Arrows off of the grid} +\label{sec:OffGrid} + +It's possible to draw arrows that begin or end at points other than +nodes. To do this, you specify the point by choosing a node and then +adding a displacement vector ``\verb"+<Dx,Dy>"'' from that node (where +\verb"Dx" is the horizontal displacement and \verb"Dy" is the vertical +displacement). (Although you can use whatever units you like for the +displacements (e.g., inches (\texttt{in}), centimeters (\texttt{cm}), +points (\texttt{pt}), etc.), it's a good idea to measure vertical +distances in \texttt{ex} (roughly the height of an upper case ``X'') +and horizontal distances in \texttt{em} (roughly the width of an upper +case ``M''), so that the displacement will be roughly correct even if +you change font sizes.) For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar[d]+<4em,0ex>\\ + {B} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar[d]+<4em,0ex>\\ + {B} + } +\end{displaymath} +since the arrow is pointing to the spot 4em to the right of the $B$. + +For another example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} + & {B}\\ + {C} + & {D} + \ar[ul]+<-2em,0ex>;[]+<2em,0ex> + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} + & {B}\\ + {C} + & {D} + \ar[ul]+<-2em,0ex>;[]+<2em,0ex> + } +\end{displaymath} +(see section~\ref{sec:SrcTrgt}) because we specified the source as +being \verb"[ul]+<-2em,0ex>", i.e., 2em to the left of the node that's +one up and one to the left of the current node ($D$) and the target as +being \verb"[]+<2em,0ex>", i.e., 2em to the right of the current node +($D$). + +For an example that combines displacements of source and target along +with curving arrows and labelled arrows: if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar[r]+<0em,-3ex>^{f} + & {B} \ar@(ur,ur)[d]+<2em,0ex>^{g}\\ + {C} + & {D} \ar@/^ 2ex/[l];[]^{h} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar[r]+<0em,-3ex>^{f} + & {B} \ar@(ur,ur)[d]+<2em,0ex>^{g}\\ + {C} + & {D} \ar@/^ 2ex/[l];[]^{h} + } +\end{displaymath} + +Realistic examples of arrows off of the grid can be found in +section~\ref{sec:Drop}, where we show how to drop objects into a +diagram at either the source or the target of an arrow. + +%-------------------------------------------------------------------- +\subsection{Dropping objects into a diagram; annotations} +\label{sec:Drop} + +You can drop an object at an arbitrary point of a diagram (i.e., not +necessarily at a node) by drawing an arrow to or from that point (see +section~\ref{sec:OffGrid}) and dropping the object at one of the ends +of the arrow. The object can be either mathematics or a text object +(see section~\ref{sec:TextObj}). + +For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & {B} \ar[d] + \ar[]+<5em,-5ex>*+\txt{This space\\is compact.};[]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & {B} \ar[d] + \ar[]+<5em,-5ex>*+\txt{This space\\is compact.};[]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +Note that the text and the arrow from it was typed by first creating +the arrow +\begin{center} + \verb"\ar[]+<5em,-5ex>;[]" +\end{center} +whose source is displaced from the current node (see +sections~\ref{sec:SrcTrgt} and \ref{sec:OffGrid}) and whose target is +the current node, and then dropping the text object (see +section~\ref{sec:TextObj}) at the source by inserting +\begin{center} + \verb"*+\txt{This space\\is compact.}" +\end{center} +immediately after the specification of the source. + +Note that the arrows to or from a text object by default go to its +center, and if a text object is dropped at a specified point by +default it's the center of the text object that lands at that point. +Thus, if you're typing a wide text object, you should be sure either +to leave enough room so that it doesn't overlap other parts of the +diagram or to shift the text object sideways (as in +section~\ref{sec:ShiftSide}). For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & {B} \ar[d] + \ar[]+<5em,-5ex>*+\txt{This topological space is compact.};[]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & {B} \ar[d] + \ar[]+<5em,-5ex>*+\txt{This topological space is compact.};[]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +but if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & {B} \ar[d] + \ar[]+<10em,-5ex>*+\txt{This topological space is compact.};[]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +\end{verbatim} +(in which we increased the horizontal displacement to 10em) then +you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & {B} \ar[d] + \ar[]+<10em,-5ex>*+\txt{This topological space is compact.};[]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +and if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & {B} \ar[d] + \ar[]+<5em,-5ex>*+[r]\txt{This topological space is compact.};[]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +\end{verbatim} +(in which we typed +\begin{center} + \verb"*+[r]\txt{This topological space is compact.}" +\end{center} +to create the text object, i.e., we added ``\verb"[r]"'' to shift the +text object to the right; see section~\ref{sec:ShiftSide}) then you'll +get +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d] + & {B} \ar[d] + \ar[]+<5em,-5ex>*+[r]\txt{This topological space is compact.};[]\\ + {C} \ar[r] + & {D} + } +\end{displaymath} + +If you want to drop an object onto a spot other than at a node without +printing an arrow to or from that spot, you can draw an invisible +arrow going to that spot and drop the object at the end of the +invisible arrow. For example, if you type +\begin{verbatim} +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d]_{f} + & {B} \ar[d]^{g} + \ar@{}[]+<8em,-4ex>*+\txt{Both $f$ and $g$\\are fibrations.}\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +\end{verbatim} +then you'll get +\begin{displaymath} + \xymatrix{ + {A} \ar[r] \ar[d]_{f} + & {B} \ar[d]^{g} + \ar@{}[]+<8em,-4ex>*+\txt{Both $f$ and $g$\\are fibrations.}\\ + {C} \ar[r] + & {D} + } +\end{displaymath} +The arrow to the text object is invisible because we typed it starting +with \verb"\ar@{}" (see section~\ref{sec:arstyle} and +Diagram~\ref{diag:CentEq}). After that, we typed +\begin{center} + \verb"[]+<8em,-4ex>*+\txt{Both $f$ and $g$\\are fibrations.}" +\end{center} +so that the arrow would go to the point 8em to the right and 4ex below +the current node, and we dropped the text object at that point. %-------------------------------------------------------------------- @@ -2335,7 +3385,7 @@ number that the \verb"\label" command labels. You can also put the \begin{center} \verb"\caption{A pretty picture\label{fig:pretty}}" \end{center} -and some people find this less prone to error. +and some people find that this helps prevent errors. %-------------------------------------------------------------------- @@ -2353,16 +3403,24 @@ This can be confusing, because some installations of \LaTeX{} give you a \verb"latex" command that is actually running \verb"pdflatex". In particular, the standard installation of \TeX Shop for Mac OS X gives you a \verb"latex" command that actually runs \verb"pdflatex" and -produces a pdf file. \TeX Shop can be configured to produce dvi -files; for this, see the list of frequently asked questions at -\url{http://www.ams.org/authors/author-faq.html} and search that page -for ``texshop''. +produces a pdf file. \TeX Shop can be configured to run standard +\verb"latex" to produce dvi files and then convert them to pdf; for +this, see the list of frequently asked questions at +\begin{center} + \url{http://www.ams.org/authors/author-faq.html} +\end{center} +and search that page for ``texshop''. +On most systems, if you need to include encapsulated postscript +graphics and produce a pdf file, you can use plain old \verb"latex" to +produce a dvi file and then use \verb"dvipdf" to create the pdf file. +Another option is to use the \verb"epstopdf" program to create a +postscript file from your eps file. %--------------------------------------------------------------------- %--------------------------------------------------------------------- -\section{Macro definitions, a.k.a.\ \texttt{\char`\\newcommand}} +\section{Macro definitions, a.k.a.\ \texttt{\bs newcommand}} \label{sec:definitions} \LaTeX{} allows you to use the same \verb"\def" command that you use @@ -2373,12 +3431,12 @@ command \begin{center} \verb"\def\tensor{\otimes}" \end{center} -but in \LaTeX, the preferred form is +but in \LaTeX{} the preferred form is \begin{center} \verb"\newcommand{\tensor}{\otimes}" \end{center} The advantage of this is that \LaTeX{} will check to see if there -already is a command with the name \verb"\tensor", and give you an +already is a command with the name \verb"\tensor" and give you an error message if there is. If you know that there is a previous definition of \verb"\tensor" but you \emph{want} to override it, then you use the command @@ -2386,9 +3444,9 @@ then you use the command \verb"\renewcommand{\tensor}{\otimes}" \end{center} -If you want to use macros with replaceable parameters, the -\verb"newcommand" command allows this. For the equivalent of the -plain \TeX{} command +If you want to use macros with replaceable parameters, both +\verb"\newcommand" and \verb"\renewcommand" allow this. For the +equivalent of the plain \TeX{} command \begin{center} \verb"\def\pushout#1#2#3{#1\cup_{#2}#3}" \end{center} @@ -2404,22 +3462,26 @@ parameters is enclosed in square brackets. %--------------------------------------------------------------------- \section{Lists: \texttt{itemize, enumerate, and description}} -There are three list making environments: \texttt{itemize}, -\texttt{enumerate}, and \texttt{description}. The \texttt{itemize} -environment just lists the items with a marker in front of each one. -If you type +There are three list making environments: +\begin{itemize} +\item \texttt{itemize}, +\item \texttt{enumerate}, and +\item \texttt{description}. +\end{itemize} +The \texttt{itemize} environment just lists the items with a marker in +front of each one. If you type \begin{verbatim} \begin{itemize} -\item This is the first item in the list, which runs on long enough to - spill over onto a second line. +\item This is the first item in the list, which runs on long enough + to spill over onto a second line. \item This is the second item in the list, which is a bit shorter. \item This is the last item. \end{itemize} \end{verbatim} then you'll get \begin{itemize} -\item This is the first item in the list, which runs on long enough to - spill over onto a second line. +\item This is the first item in the list, which runs on long enough + to spill over onto a second line. \item This is the second item in the list, which is a bit shorter. \item This is the last item. \end{itemize} @@ -2428,16 +3490,16 @@ The \texttt{enumerate} environment looks the same, except that the items in the list are numbered. If you type \begin{verbatim} \begin{enumerate} -\item This is the first item in the list, which runs on long enough to - spill over onto a second line. +\item This is the first item in the list, which runs on long enough + to spill over onto a second line. \item This is the second item in the list, which is a bit shorter. \item This is the last item. \end{enumerate} \end{verbatim} then you'll get \begin{enumerate} -\item This is the first item in the list, which runs on long enough to - spill over onto a second line. +\item This is the first item in the list, which runs on long enough + to spill over onto a second line. \item This is the second item in the list, which is a bit shorter. \item This is the last item. \end{enumerate} @@ -2451,8 +3513,8 @@ item. If you type Sedges are often confused with grasses and rushes. \item[grass] A green plant, found in both wetlands and uplands. Grasses are often confused with sedges and rushes. -\item[rush] A green plant, found in both wetlands and uplands. Rushes - are often confused with sedges and grasses +\item[rush] A green plant, found in both wetlands and uplands. + Rushes are often confused with sedges and grasses \end{description} \end{verbatim} you'll get @@ -2461,8 +3523,8 @@ you'll get Sedges are often confused with grasses and rushes. \item[grass] A green plant, found in both wetlands and uplands. Grasses are often confused with sedges and rushes. -\item[rush] A green plant, found in both wetlands and uplands. Rushes - are often confused with sedges and grasses +\item[rush] A green plant, found in both wetlands and uplands. + Rushes are often confused with sedges and grasses \end{description} These environments can be inserted within each other, and the @@ -2498,7 +3560,7 @@ you'll get \label{sec:enumref} If you want to refer to an item in an enumerated list by item number, -then you need to label the section using the \verb"\label" command and +then you need to label the item using the \verb"\label" command and then refer to it using the \verb"\ref" command, just as you do for sections, subsections, theorems, etc.\ (see section~\ref{sec:xreferences}). For example, if you type @@ -2539,7 +3601,7 @@ creating a bibliography from a database of possible references uses Bib\TeX{}, which is a separate program that must be run in between the runs of \LaTeX. If you already have one or more BiB\TeX{} databases, \texttt{amsrefs} can make use of them through a special Bib\TeX{} -style file. +style file (see section~\ref{sec:bibtex}). If for some reason you want to avoid the use of \texttt{amsrefs} and of Bib\TeX, you can type and format the bibliography items any way you @@ -2584,12 +3646,12 @@ will be printed in between the heading for the list and the actual list. %-------------------------------------------------------------------- -\subsection{The \texttt{\char`\\bib} command} +\subsection{The \texttt{\bs bib} command} \label{sec:bib} -The information for each bibliography item is entered into the -argument of a \verb"\bib" command. The format of a \verb"\bib" -command is +The information for each bibliography item inside the \texttt{bibdiv} +environment (see section~\ref{sec:amsrefs}) is entered using a +\verb"\bib" command. The format of a \verb"\bib" command is \begin{verbatim} \bib{ReferenceKey}{ReferenceType}{ comma separated list of keyword={value} statements @@ -2686,6 +3748,26 @@ A description of the less obvious ones can be found in \cite[section~5.2]{amsrefsguide}. %-------------------------------------------------------------------- +\subsection{Obtaining bibliographic information from MathSciNet} +\label{sec:mathscinet} + +If you have access to MathSciNet (at +\url{http://www.ams.org/mathscinet}), then you can obtain a completely +filled out \verb"\bib" command (see section~\ref{sec:bib}) for any of +the publications listed there. To do this: +\begin{itemize} +\item Use MathSciNet to find the Mathematical Reviews review of the + publication. +\item Look near the upper left corner of the page for a pulldown menu + titled ``Select Alternative Format''. +\item Select ``AMSRefs'' from that menu; you'll get a new page showing + the \verb"\bib" command for the publication. +\item Copy that \verb"\bib" command and paste it into your \LaTeX{} + file. +\end{itemize} + + +%-------------------------------------------------------------------- \subsection{Using a database of possible references} \label{sec:refbase} @@ -2758,8 +3840,8 @@ can use that by combining Bib\TeX{} with \texttt{amsrefs}. If your references are in the Bib\TeX{} file \verb"myrefs.bib", then you would load the \texttt{amsrefs} package by putting the command \verb"\usepackage[lite]{amsrefs}" in your preamble (in the same way -that you load it if you're using \texttt{amsrefs} without Bib\TeX; see -section~\ref{sec:amsrefs}) and put the single line +that you would load it if you were using \texttt{amsrefs} without +Bib\TeX; see section~\ref{sec:amsrefs}) and put the single line \begin{center} \verb"\bibliography{myrefs}" \end{center} @@ -2856,7 +3938,7 @@ found in \cite[section~6]{amsrefsguide}. %-------------------------------------------------------------------- -\subsection{Avoiding \texttt{amsrefs}} +\subsection{Avoiding both \texttt{amsrefs} and Bib\TeX} \label{sec:thebibliography} If for some reason you don't want to use \texttt{amsrefs} or Bib\TeX, @@ -2933,7 +4015,7 @@ The following is the text of the file \verb"template.tex". \begin{verbatim} %%% template.tex %%% This is a template for making up an AMS-LaTeX file -%%% Version of May 14, 2009 +%%% Version of February 12, 2011 %%%--------------------------------------------------------- %%% The following command chooses the default 10 point type. %%% To choose 12 point, change it to @@ -3332,16 +4414,16 @@ The following is the text of the file \verb"template.tex". \bib{xyguide}{report}{ author={Rose, Kristoffer H.}, title={\Xy-pic User's Guide}, - edition={version 3.7}, - eprint={http://www.ctan.org/tex-archive/macros/generic/diagrams/xypic/xyguide.pdf} + edition={version 3.85}, + eprint={http://www.ctan.org/tex-archive/macros/generic/diagrams/xypic/xy-3.8.5/doc/xyguide.pdf} } \bib{xyrefer}{report}{ author={Rose, Kristoffer H.}, author={Moore, Ross}, title={\Xy-pic Reference Manual}, - edition={version 3.7}, - eprint={http://www.ctan.org/tex-archive/macros/generic/diagrams/xypic/xyrefer.pdf} + edition={version 3.85}, + eprint={http://www.ctan.org/tex-archive/macros/generic/diagrams/xypic/xy-3.8.5/doc/xyrefer.pdf} } \end{biblist} diff --git a/Master/texmf-dist/doc/latex/amslatex-primer/template.tex b/Master/texmf-dist/doc/latex/amslatex-primer/template.tex index 6762ee902f6..0e15df1f01c 100644 --- a/Master/texmf-dist/doc/latex/amslatex-primer/template.tex +++ b/Master/texmf-dist/doc/latex/amslatex-primer/template.tex @@ -1,6 +1,6 @@ %%% template.tex %%% This is a template for making up an AMS-LaTeX file -%%% Version of May 14, 2009 +%%% Version of February 12, 2011 %%%--------------------------------------------------------- %%% The following command chooses the default 10 point type. %%% To choose 12 point, change it to |