Reputation: 2701
I am suffering with this LaTeX document. I am trying to left align the block of equations inside a proof. There is a famous question about this on stack overflow:
However, I tried using \documentclass[fleqn]{article}
. It didn't work. I also tried using \begin{flalign}
, it didn't work.
The math in my text looks ugly. I wish it was centralized or left aligned.
That's how it looks: appearance of the text
This is the code:
\documentclass[fleqn]{article}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp}
\usepackage{gensymb}
\usepackage{titling}
\usepackage{lipsum}
\usepackage{url}
\usepackage{graphicx}
\usepackage{color}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\usepackage{amsmath}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amssymb}
\graphicspath{{images/}}
\begin{document}
\newpage
\begin{proof}
\begin{align*}
\text{Seja: } \gamma(t) = (r \cos t,r\sin t, a\sin t + b\cos t +c) \\
\text{Primeira derivada: }\gamma'(t) = (-r\sin t,r\cos t, a\cos t - b\sin t) \\
\text{Segunda derivada: }\gamma''(t) = (-r\cos t,-r\sin t, -a\sin t - b\cos t) \\
\text{Terceira derivada: }\gamma'''(t) = (r\sin t,-r\cos t, -a\cos t + b\sin t) \\
\text{A torção pode ser expressa por: }\tau = {{\left( {r' \times r''} \right) \cdot r'''} \over {\left\| {r' \times r''} \right\|^2}}\\
\text{A fórmula acima não exige que a curva esteja parametrizada pelo cumprimento de arco} \\
\text{Desenvolvendo os cálculos do numerador} \\
\text{O produto vetorial das duas primeiras derivadas é: } {\gamma'(t) \times \gamma''(t)= (-rb, - ra, r²)}\\
\text{O produto escalar é o produto vetorial vezes a terceira derivada: } \\
(-rb, -ra, r²)\cdot \gamma'''(t) \\
(-rb, -ra, r²)\cdot (r\sin t,-r\cos t, -a\cos t + b\sin t) = 0 \\
\text{O numerador é zero. Logo, a torção é zero. } \\
\tau = 0 \\
\text{Se a torção é zero, a curva é plana.}
\end{align*}
\end{proof}
Upvotes: 0
Views: 6081
Reputation: 2701
This is the answer:
Align expects a two-part entry (or multiples of two parts) on each line, with the first part right-aligned and the second part (usually after a sign of relation) left-aligned. the alignment point is marked by &. you haven't entered any alignment points. if you place a & before each line, all the lines will be aligned on the left.
\begin{proof}
\begin{align*}
& \text{Seja: } \gamma(t) = (r \cos t,r\sin t, a\sin t + b\cos t +c) \\
& \text{Primeira derivada: }\gamma'(t) = (-r\sin t,r\cos t, a\cos t - b\sin t) \\
& \text{Segunda derivada: }\gamma''(t) = (-r\cos t,-r\sin t, -a\sin t - b\cos t) \\
& \text{Terceira derivada: }\gamma'''(t) = (r\sin t,-r\cos t, -a\cos t + b\sin t) \\
& \text{A torção pode ser expressa por: }\tau = {{\left( {r' \times r''} \right) \cdot r'''} \over {\left\| {r' \times r''} \right\|^2}}\\
& \text{A fórmula acima não exige que a curva esteja parametrizada pelo cumprimento de arco} \\
& \text{Desenvolvendo os cálculos do numerador} \\
& \text{O produto vetorial das duas primeiras derivadas é: } {\gamma'(t) \times \gamma''(t)= (-rb, - ra, r²)}\\
& \text{O produto escalar é o produto vetorial vezes a terceira derivada: } \\
& (-rb, -ra, r²)\cdot \gamma'''(t) \\
& (-rb, -ra, r²)\cdot (r\sin t,-r\cos t, -a\cos t + b\sin t) = 0 \\
& \text{O numerador é zero. Logo, a torção é zero. } \\
& \tau = 0 \\
& \text{Se a torção é zero, a curva é plana.}
\end{align*}
\end{proof}
Upvotes: 2
Reputation: 3112
Try to put an & before each = sign to get the alignment at the equal signs.
Of course you can align how you prefer. Every line is aligned at the position where you place the &
Upvotes: 1