Document Classesaligning formulas in displaymath

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
gates
Posts: 3
Joined: Wed Dec 03, 2008 11:22 pm

aligning formulas in displaymath

Post by gates »

Hei

I want to align formulas in math mode to left. By defult it aligns formulas in center.

Code: Select all

\begin{displaymath}(3+5i)\cdot(30-i)=90-3i+150i-5i^2=-5i^2+147i+90\end{displaymath}
Also I woluld like to create a list (enumerate) of formulas so, that there the formula is in the same line as list number. How can i accomplish this? Right now it is like:

Code: Select all

\begin{enumerate}
\item \begin{displaymath}(3+5i)+(-5-4i)=-2+i\end{displaymath}
\item \begin{displaymath}(3+5i)-(-5-4i)=8+9i\end{displaymath}
\end{enumerate}
And how can I input Slavic (Russian) letters?

Recommended reading 2024:

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

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

phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

aligning formulas in displaymath

Post by phi »

Hi,
for 1. and 2.: use the fleqn class option. For 3., use the babel and inputenc packages. Depending on your distribution, you'll perhaps need to install language support or hyphenation pattern.
Here is an example:

Code: Select all

\documentclass[russian, fleqn]{article}
\usepackage[utf8]{inputenc}
\usepackage{babel}

\begin{document}

\begin{displaymath}(3+5i)\cdot(30-i)=90-3i+150i-5i^2=-5i^2+147i+90\end{displaymath}

\begin{enumerate}
\item \begin{displaymath}(3+5i)+(-5-4i)=-2+i\end{displaymath}
\item \begin{displaymath}(3+5i)-(-5-4i)=8+9i\end{displaymath}
\end{enumerate}

АБВГДЕЖЗИЙКЛ

\end{document}
This uses UTF-8, but other input encodings are probably also supported.
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

aligning formulas in displaymath

Post by Juanjo »

Concerning the list of formulas, you can simply enter math in inline mode:

Code: Select all

\begin{enumerate}
\item $(3+5i)+(-5-4i)=-2+i$
\item $(3+5i)-(-5-4i)=8+9i$
\end{enumerate}
For more information about maths in LaTeX, have a careful look at the Mathmode document.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

aligning formulas in displaymath

Post by Stefan Kottwitz »

Hi gates,

welcome to the board!
Here you can find more math-related tutorials and documentation: Mathematics with LaTeX.

Stefan
LaTeX.org admin
gates
Posts: 3
Joined: Wed Dec 03, 2008 11:22 pm

aligning formulas in displaymath

Post by gates »

Hei, right now the my latex file starts as:

Code: Select all

\documentclass[a4paper,12pt,estonian,twocolumn]{report}
\usepackage[T1]{fontenc}
\usepackage[estonian]{babel}
...
...
...
I need to type only a few characters in russian. What exatly should I add and how do I type those characters? I can see, my latex .txt file is in iso 8859-1.

With my formula problem I desided to stay with inline mode. And thanks for those links/pdf!
Post Reply