Text FormattingAlignment for Math Expressions in a List

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
Sawyier
Posts: 1
Joined: Sat Jan 26, 2013 11:35 pm

Alignment for Math Expressions in a List

Post by Sawyier »

I'm a rookie in LaTeX and programming in general, so I'm having quite some trouble. I looked after posts with requests similar to mine, but there just seemed to be a number of different ways of aligning things, so I'm confused on how to do it.

So basically I'm trying to write some mathematical statements:

Code: Select all

1) Assume: a_{1}\vec{v_{1}}+a_{2}\vec{v_{2}}+a_{3}\vec{v_{3}}+...+a_{n}\vec{v_{n}}=\vec{0}, a_{1}\neq 0
\\
2) Write: \vec{v_{1}}+\frac{a_{2}}{a_{1}}\vec{v_{2}}+\frac{a_{3}}{a_{1}}\vec{v_{3}}+...+\frac{a_{n}}{a_{1}}\vec{v_{n}}=\vec{0}
\\\\\\
\vec{v_{1}}=-\frac{a_{2}}{a_{1}}\vec{v_{2}}-\frac{a_{3}}{a_{1}}\vec{v_{3}}-...-\frac{a_{n}}{a_{1}}\vec{v_{n}}
But I'd like the "1) Assume" and "2) Write" to be aligned, like real topics. In addition to that, I'd like to know how to align the two equations I've written for the "2) Write" topic.

Thank you in advance.
Last edited by localghost on Sun Jan 27, 2013 1:19 pm, edited 2 times in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Alignment for Math Expressions in a List

Post by localghost »

For general application of LaTeX you should do some basic reading to learn how to format text. The desired output can be obtained by a list customized by enumitem and advanced math typesetting with amsmath. The below code shows possible approach.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}  % loads »amsmath«
\usepackage{enumitem}

\begin{document}
  \begin{enumerate}[label={\arabic*)}]
    \item Assume:
      \(
        a_1\vec{v}_1+a_2\vec{v}_2+a_3\vec{v}_3+\cdots+a_n\vec{v}_n=\vec{0},\ a_{1}\neq 0
      \)
    \item Write:
      \(
        \begin{aligned}[t]
          &\vec{v_{1}}+\frac{a_{2}}{a_{1}}\vec{v_{2}}+\frac{a_{3}}{a_{1}}\vec{v_{3}}+...+\frac{a_{n}}{a_{1}}\vec{v_{n}}=\vec{0} \\
          &\vec{v}_1=-\frac{a_2}{a_1}\vec{v}_2-\frac{a_3}{a_1}\vec{v}_3-\cdots-\frac{a_n}{a_1}\vec{v}_n
        \end{aligned}
      \)
  \end{enumerate}
\end{document}
Further reading:
  • The »Math mode« document
  • The manuals of the involved packages (see links above).

Best regards and welcome to the board
Thorsten
Post Reply