ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Align
@ 1999-09-08 19:57 David Arnold
  1999-09-09 10:02 ` Align Taco Hoekwater
  0 siblings, 1 reply; 3+ messages in thread
From: David Arnold @ 1999-09-08 19:57 UTC (permalink / raw)
  Cc: ntg-context

[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]

Hans,

A second example for today. This file shows the concern that members of the
AMS have for spacing around equal signs in aligned environments. Contrast
the align with the standard eqnarray from latex2e.

\documentclass{article}
\usepackage{amsmath}
\newcommand{\norm}[1]{\left\Vert#1\right\Vert}
\newcommand{\eps}{\varepsilon}
\DeclareMathOperator{\RE}{Re} \DeclareMathOperator{\IM}{Im}\begin{document}
\newcommand{\seq}[1]{\left<#1\right>}

\begin{align*}
  \norm{f_0 - (I+\eps A)f}^2
  &= \norm{f_0-f - \eps A f}^2 \\
  &= \norm{f_0-f}^2 - 2\eps\RE\seq{A{f},f_0-f} + \eps^2\norm{A{f}}^2 \\
  &< \norm{f_0-f}^2 - 2\eps\delta + \eps^2 4\norm{A}^2 \\
  &= \norm{f_0-f}^2 - 2\eps(\delta - \eps 2\norm{A}^2) \\
  &< \norm{f_0-f}^2.
\end{align*}

\begin{eqnarray*}
  \norm{f_0 - (I+\eps A)f}^2
  &=& \norm{f_0-f - \eps A f}^2 \\
  &=& \norm{f_0-f}^2 - 2\eps\RE\seq{A{f},f_0-f} + \eps^2\norm{A{f}}^2 \\
  &<& \norm{f_0-f}^2 - 2\eps\delta + \eps^2 4\norm{A}^2 \\
  &=& \norm{f_0-f}^2 - 2\eps(\delta - \eps 2\norm{A}^2) \\
  &<& \norm{f_0-f}^2.
\end{eqnarray*}

\end{document}

[-- Attachment #2: align.dvi --]
[-- Type: application/octet-stream, Size: 1816 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Align
  1999-09-08 19:57 Align David Arnold
@ 1999-09-09 10:02 ` Taco Hoekwater
  0 siblings, 0 replies; 3+ messages in thread
From: Taco Hoekwater @ 1999-09-09 10:02 UTC (permalink / raw)


>>>>> "David" == David Arnold <darnold@northcoast.com> writes:

    David> Hans, A second example for today. This file shows the
    David> concern that members of the AMS have for spacing around
    David> equal signs in aligned environments. Contrast the align
    David> with the standard eqnarray from latex2e.

'Standard' eqnarray is very ugly indeed.

Taco

-- 
Taco Hoekwater                                 taco.hoekwater@wkap.nl
Kluwer Academic Publishers                            -- Pre Press --
Achterom 119, 3311 KB Dordrecht, The Netherlands  tel.  31-78-6392550
---------------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* align
@ 2004-10-27  4:47 David Arnold
  0 siblings, 0 replies; 3+ messages in thread
From: David Arnold @ 2004-10-27  4:47 UTC (permalink / raw)


All,

In ams math, the default behavior of align is to align each equation on the
&. By default, each equation is numbered. Individual equations can be
labeled and referenced. Try:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align}
F(x)&=\int_0^x f(t)\, dt\label{eq:1}\\
F'(x)&=f(x)\label{eq:2}
\end{align}

In equation~(\eqref{eq:1}) and equation~(\eqref{eq:2}), we see\ldots
\end{document}

To suppress number of equations, we use the align* environment. Try:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{align*}
F(x)&=\int_0^x f(t)\, dt\\
F'(x)&=f(x)
\end{align*}

\end{document}

When one wants to number an aligned environment as a group, we use aligned
instead of align. This requires that we be in math mode. Try:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}\label{fundthm}
\begin{aligned}
F(x)&=\int_0^x f(t)\, dt\\
F'(x)&=f(x)
\end{aligned}
\end{equation}

\end{document}

I can get this with amsl, with:

\usemodule[amsl]

\starttext

\placeformula[fundthm]
\startalign
F(x)&=\int_0^x f(t)\, dt\\
F'(x)&=f(x)
\stopalign

We see in the \in{Fundamental Theorem}[fundthm] \ldots

\stoptext

I'm not sure how to label and reference individual equations in the align
environment, however.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-27  4:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-08 19:57 Align David Arnold
1999-09-09 10:02 ` Align Taco Hoekwater
2004-10-27  4:47 align David Arnold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).