Chris Pollett > Students >
Namon

    ( Print View )

    [Bio]

    [CS297Proposal]

    [Del1VML]

    [Del1SVG]

    [Del2Latex]

    [Del2MML]

    [Del3]

    [Del4]

    [CS297Report-PDF]

    [CS298Proposal]

    [CS298FinalReport-PDF]

    [CS298Presentation-PDF]

    [DemoSquareroot]

    [DemoSubscript]

    [DemoFraction]

                           

























Deliverable 2 (Latex):
Pages 130 and 131 out of Latex manual as a Latex document.

Below is a Latex document I created to gain experience with using Latex:

Latex code

\documentclass[a4paper,12pt]{article}

%--- TITLE --%


\begin{document}

%-- \setlength{\topmargin}{0.5cm} --%

\title{The example using \LaTeX} \author{Namon Nuttayasakul} \date{\today} \maketitle
\newpage


%---------------------------------Begin Paragraph I ----------------------------------------------%

\indent Arrays are produced by means of the array environment, whose syntax and construction are 
described in Section 4.8.1 on tables. The array environment generates a table in math mode, that is
the column entries are interpreted as formula text. For example:


%-- example --%
	
\[ 
\begin{array}{*{3}{c@{\:+\:}}c@{\;=\;}c}
a_{11}x_1 & a_{12}x_2 & \cdots & a_{1n}x_n & b_1 \\
a_{22}x_1 & a_{22}x_2 & \cdots & a_{2n}x_n & b_2 \\
 \multicolumn{5}{c}{\dotfill}			 \\
a_{n1}x_1 & a_{n2}x_2 & \cdots & a_{nn}x_n & b_n
\end{array}   
\] \\

% -- Math Formula --%
	
\noindent $\backslash [ \quad \backslash$ begin $\{$array$\} \{*\{$3$\}\{$c@$\{ \backslash:+ 
\backslash: \}\}$c@$\{ \backslash ; = \backslash ; \}$c$\}$    \\
\hspace*{2cm} a\_$\{$11$\}$x\_1 \& a\_$\{$12$\}$x\_2 \& $\backslash$cdots \& a\_$\{$1n$\}$x\_n \& b\_1 $\backslash\backslash$  \\
\hspace*{2cm} a\_$\{$22$\}$x\_1 \& a\_$\{$22$\}$x\_2 \& $\backslash$cdots \& a\_$\{$2n$\}$x\_n \& b\_2 $\backslash\backslash$	 \\
\hspace*{2.5cm} $\backslash$multicolumn$\{$5$\}\{$c$\}\{ \backslash$dotfill$\}$  \\
\hspace*{2cm} a\_$\{$n1$\}$x\_1 \& a\_$\{$n2$\}$x\_2 \& $\backslash$cdots \& a\_$\{$nn$\}$x\_n \& b\_n $\backslash\backslash$	 \\
\hspace*{1.5cm} $\backslash$end$\{$array$\} \qquad \backslash ] $ \\

% -- Description --%
	
\indent As a reminder of the table construction elements (Section 4.8.1): $ @\{$t$\} $ inserts the contents 
of t between the adjacent columns. In the above example, this is $ \backslash:+\backslash:$ and 
$\backslash ;+\backslash ;$. The commands $\backslash:$ and $\backslash;$ HI THere!!!have not yet been introduced but they 
produce small horizontal spacing in math mode (section 5.5.1).
$\quad * \{$3$\}\{$c@$\{\backslash:$+$\backslash:\}\} $ is an abbreviation for three repetitions 
of the column definition c@$\{\backslash:$+$\backslash:\}.$ 
c defines the column to be one of centered text. $ \backslash $
multicolumn $\{$5$\} \{$c$\} $
says that the next five columns are to be merged and replaced by one with centered text. $\setminus$
dotfill fills the column with dots. The replaced by one with centered text. $\backslash$
dotfill fills the column with dots. The above system of equations could be produced somewhat 
more simply with.


\hspace*{1cm} $\backslash$begin$\{$array$\}\{$c@$\{\backslash:$+$\backslash:\}$c@$\{\backslash:$+
$\backslash$cdots$+ \backslash ;\}$c@$\{ \backslash ; = \backslash ; \}$c$\}  $ 




% ------------------------------ Begin Paragraph II -----------------------------------------------%

\indent It is possible to nest array environment: \\


% -- Example and Description (put in the Table)---%



% -- Description -- %
\indent The outermost array consists of one column with centered text (C).
The first entry in this column is also an array, with two centered columns. 
This array is surrounded left and right by vertical lines with adjusted sized.
\newpage





% ------------------------------ Begin Paragraph III ----------------------------------------------%

\indent The array environment is structurally the same as a vertical box. This
means that it treated as a single character within the surrounding environment,
so that it may be coupled with other symbols and construction elements. 


% -- Example -- %

\[ 
\sum_{p_1<p_2<\cdots<p_{n-k}}^{(1,2,\ldots,n)}
\Delta_{\begin{array}{l}
   p_1p_2\cdots p_{n-k} \\p_1p_2\cdots p_{n-k}
\end{array}}
\sum_{q_1<q_2<\cdots q_k} \left| \begin{array}{llcl}
a_{q_1q_1} & a_{q_1q_2} & \cdots & a_{q_1q_k} \\
a_{q_2q_1} & a_{q_2q_2} & \cdots & a_{q_2q_k} \\
\multicolumn{4}{c}\dotfill\\
a_{q_kq_1} & a_{q_kq_2} & \cdots & a_{q_kq_k}
\end{array} \right|
\]  

\noindent $\backslash[ \ \backslash$sum\_$\{$p\_1$<$p\_2$<\backslash$cdots$<$p\_$\{$n$-$k$\}\} \ \{$(1,2,$\backslash$ldots,n)$\}$ 

\hspace*{0.5cm} $\backslash$Delta\_$\{ \backslash$begin$\{$array$\}\{$llcl$\}$ 

\hspace*{2cm} p\_1p\_2$\backslash$cdots p\_$\{$n$-$k$\} \ \backslash\backslash$ p\_1p\_2 
$\backslash$cdots p\_$\{$n$-$k$\}$ 

\hspace*{1.5cm} $\backslash$end$\{$array$\}\}$ 

\hspace*{0.5cm} $\backslash$sum\_$\{$q\_1$<$q\_2$< \backslash$cdots q\_k$\} \ \backslash$left$| \ \backslash$
begin$\{$array$\}\{$llcl$\} $

\hspace*{2.25cm} a\_$\{$q\_1q\_1$\} \ \& $ a\_$\{$q\_1q\_2$\} \ \& \ \backslash$cdots $\&$ a\_
$\{$q\_1q\_k$\} \ \backslash \backslash $ 

\hspace*{2.25cm} a\_$\{$q\_2q\_1$\} \ \& $ a\_$\{$q\_2q\_2$\} \ \& \ \backslash$cdots $\&$ a\_
$\{$q\_2q\_k$\} \ \backslash\backslash$ 

\hspace*{2.50cm} $\backslash$multicolumn$\{$4$\}\{$c$\} \backslash$dotfill$\backslash \backslash$  

\hspace*{2.25cm} a\_$\{$q\_kq\_1$\} \ \& $ a\_$\{$q\_kq\_2$\} \ \& \ \backslash$cdots $\&$ a\_
$\{$q\_kq\_k$\}$ 

\hspace*{3cm} $\backslash$end$\{$array$\} \ \backslash$right$ | \qquad \backslash \} $ \newline


% -- Description -- %
\indent In this example, an array environment is used as an index on the 
$ \Delta$. However, the indices appear too large with respect to the rest of
the formula. Section 5.4.6 presents a better solution for array indices. 






% ------------------------- Begin Paragraph IV -----------------------------------------------%

\indent As for all table environments, an optional vertical positioning
parameter b or t may be included with the array environment. The syntax 
and results are described in sections 4.7.3 and 4.8.1. This argument is 
included only if the array is to be positioned vertically relative to its
top or bottom line rather than its center. 

% -- Example With description ( in the table) -------------- %


% -- Description --% 

\indent We suggest that the reader try to deduce how the various arrays are
structured with the help of the generating text on the right.  \newline


\newpage

% ------------------------ Begin Exercise 5.13 ---------------------------------------------%

{\bfseries \em Exercise 5.13:} The solution for the system of equations
\[
F(x,y)= 0 \quad \mbox{ and }\quad
\left| \begin{array}{ccc}
F''_{xx} & F''_{xy} & F''_x \\
F''_{yx} & F''_{yy} & F'_y  \\
F''_x & F'_y & 0
\end{array} \right| = 0
\]
yields the coordinates for the possible inflection points of $F(x,y)=0.$ \\
{\em Note: the above displayed formula consists of two sub-formulas, between which
the word 'and' plus extra spacing of amount $\backslash$quad are inserted. Instead of enclosing
the} {\slshape \ttfamily  array }
{\itshape environment within size-adjusted vertical lines with}
$\backslash{$\slshape \ttfamily left/...$\backslash$right/}
{\itshape ,one may use a formatting argument \{/.../\} (section 4.8.1) to produce the 
vertical lines. Such a structure is called a determinant in mathematics.} \newline






% ---------------------- Begin Exercise 5.14 ------------------------------------------------%



\noindent {\bfseries \em Exercise 5.14:} The shortest distance between two straight lines
represented by the equations

\[
\frac{x-{x_1}}{l_1} = \frac{y-{y_1}}{m_1} = \frac{z-{z_1}}{n_1} \quad
\frac{x-{x_2}}{l_2} = \frac{y-{y_2}}{m_2} = \frac{z-{z_2}}{m_2} = \frac{z-{z_2}}{n_2}
\]





\end{document}