2

I have two different formulas where the first one doesn't aligned with the second one. I first tried align but it gave me an equation number for each line. Then I did

\begin{equation}\begin{aligned} .... \end{aligned}\end{equation} 

Here is the code that I have:

\begin{equation}
\label{eq:chInput:deviceExample}
\begin{aligned}
 Touch & = & &  \\
 < & Manipulation: &  \{T_{x},T_{y}\} &, \\
   &  InputDomain:  & \{[0,X_{max}],[0,Y_{max}]\} &, \\
   &  State: &  \{X,Y,Action\} &, \\
   &  ResolutionFN: &  I &, \\
   &  OutputDomain: & \{[0,X_{max}],[0,Y_{max}]\} &, \\
   &  Works: & \{\} &> 
\end{aligned}
\end{equation}

\begin{equation}
\label{eq:chInput:deviceExampleI}
\begin{aligned}
  I & :=  & &\\
    &T_{x}: & \{[0,X_{max}]\} \rightarrow \{[0,X_{max}]\}&, \\
    &T_{y}: & \{[0,Y_{max}]\} \rightarrow \{[0,Y_{max}]\}& 
\end{aligned}
\end{equation}

And the problems is that I would like to see Touch and I aligned but it didn't work.

Here is the screenshot

enter image description here

3
  • Do you want see aligned 'T' with 'I' or by equal symbols?
    – skpblack
    Jan 9, 2015 at 2:13
  • I would like to see the I aligned with Touch and Tx and Ty aligned with < from the first equation.
    – Blues76
    Jan 9, 2015 at 2:14
  • Try {align} or use \nonumber to suppress equation number on a given line. Jan 9, 2015 at 6:48

2 Answers 2

2

Like this:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align}
&\textit{Touch} = \notag\\
\label{eq:chInput:deviceExample}
&\qquad\begin{aligned}
 < & \textit{Manipulation:} &  \{T_{x},T_{y}\} &, \\
   &  \textit{InputDomain:}  & \{[0,X_{\textit{max}}],[0,Y_{\textit{max}}]\} &, \\
   &  \textit{State:} &  \{X,Y,\textit{Action}\} &, \\
   &  \textit{ResolutionFN:} &  I &, \\
   &  \textit{OutputDomain:} & \{[0,X_{\textit{max}}],[0,Y_{\textit{max}}]\} &, \\
   &  \textit{Works:} & \{\} &> 
\end{aligned}\\
&I = \notag\\
\label{eq:chInput:deviceExampleI}
&\qquad\begin{aligned}
    &T_{x}: & \{[0,X_{\textit{max}}]\} \rightarrow \{[0,X_{\textit{max}}]\}&, \\
    &T_{y}: & \{[0,Y_{\textit{max}}]\} \rightarrow \{[0,Y_{\textit{max}}]\}& 
\end{aligned}
\end{align}
\end{document}

enter image description here

Note:

I put \textit because text must be treated as text. Otherwise the letters are treated as math variables (in a product) producing an inadequate spacing.

2
  • It is very interesting the way you did it... Thank you so much
    – Blues76
    Jan 9, 2015 at 2:31
  • 1
    Normally max and min would be upright in such an equation, using \mathrm or as Mico has done \max/\min.
    – Joseph Wright
    Jan 9, 2015 at 7:25
4

Here's a solution that uses align as the outer environment, split in the middle, and array in the innermost positions. The outhermost alignment is performed on the = symbols, as I thinks that doing so makes it easier to see which elements are being aligned.

enter image description here

\documentclass{article}
\usepackage{amsmath,array}
\begin{document}
\begin{align}
\begin{split}
\label{eq:chInput:deviceExample}
 Touch &=  \\
       &{\quad}< 
       \begin{array}[t]{@{} >{$\em}l<{$\;:} r @{\;} c@{}}
       Manipulation &  \{T_{x},T_{y}\}, \\
       InputDomain  &  \{[0,X_{\max}],[0,Y_{\max}]\} , \\
       State        &  \{X,Y,\textit{Action}\} , \\
       ResolutionFN &  I , \\
       OutputDomain & \{[0,X_{\max}],[0,Y_{\max}]\} , \\
       Works        & \{\}\phantom{,} &> \\
       \end{array}
\end{split}\\
\begin{split}\label{eq:chInput:deviceExampleI}
  I &= \\
    &{\qquad}
     \begin{array}[t]{@{} l<{:} r @{}}
     T_{x} & \{[0,X_{\max}]\} \rightarrow \{[0,X_{\max}]\}, \\
     T_{y} & \{[0,Y_{\max}]\} \rightarrow \{[0,Y_{\max}]\} \\
     \end{array} 
\end{split}
\end{align}
\end{document}
3
  • 1
    Most likely < and > should be \langle and \rangle.
    – egreg
    Jan 9, 2015 at 10:06
  • @egreg - I was wondering about the purpose/meaning of the symbols < and > as well. If they're supposed to stand for \langle and \rsngle, they should maybe encase the entire array.
    – Mico
    Jan 9, 2015 at 10:21
  • No, they're just delimiters and the contents is displayed on several lines because one couldn't fit them.
    – egreg
    Jan 9, 2015 at 10:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .