Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a better way to put points between a set of equations as follow:

\begin{equation}
\begin{split}
&y_1=y_0+hf_0\\
&y_2=y_0+2hf_1\\
.\\
.\\
.\\
&y_n=y_{n-1}+2hf_{n-1}
\end{split}
\label{eq: stoer method 2}
\end{equation}
share|improve this question
    
A quick comment, not related directly to your question but to the use of the & alignment points in a split environment: It's preferable to align the rows on a common element such as = instead of on the first character of each row. While the widths of y_1, y_2, and y_n happen to be fairly similar, the appearance of the system of equations risks becoming marred if you also have entries such as y_[m-1} to the left of the = symbol. –  Mico Jun 24 at 8:57

3 Answers 3

up vote 1 down vote accepted
\documentclass{article}
\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{split}
&y_1=y_0+hf_0\\
&y_2=y_0+2hf_1\\
&\vdots\\
&y_n=y_{n-1}+2hf_{n-1}
\end{split}
\label{eq: stoer method 2}
\end{equation}

But rather

\begin{equation}
\begin{array}{l}
y_1=y_0+hf_0\\
y_2=y_0+2hf_1\\
\multicolumn{1}{c}{\vdots}\\
y_n=y_{n-1}+2hf_{n-1}
\end{array}
\end{equation}

\end{document}

enter image description here

Certainly, the position of vertical dots can be changed.

share|improve this answer

The mathtools package offers the macros \vdotswithin and \shortvdotswithin for just this purpose.

enter image description here

\documentclass{article}
\usepackage{mathtools}
\usepackage{lmodern}
\setlength\textwidth{3in} % just for this example
\begin{document}
\begin{equation}
\begin{split}
y_1&=y_0+hf_0\\
y_2&=y_0+2hf_1\\
&\vdotswithin{=}\\  %% note the "\\" row terminator
y_m&=y_{m-1}+2hf_{m-1}\\
\shortvdotswithin{=}  %% note: no row terminator
y_n&=y_{n-1}+2hf_{n-1}
\end{split}
\label{eq: stoer method 2}
\end{equation}
\end{document}
share|improve this answer
    
Thanks. that works as well –  Maryam Jun 24 at 20:57

Try

\begin{equation}
\begin{split}
&y_1=y_0+hf_0\\
&y_2=y_0+2hf_1\\
\vdots\\    
&y_n=y_{n-1}+2hf_{n-1}
\end{split}
\label{eq: stoer method 2}
\end{equation}

Related question about the alignment of the vertical dots that you might want to look into: Centering \vdots in a system of many equations

share|improve this answer
    
Thanks. it works –  Maryam Jun 24 at 20:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.