Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
ghostanime2001
Posts: 402 Joined: Fri May 20, 2011 9:41 am
Post
by ghostanime2001 » Sat Jul 30, 2011 9:28 am
How can I left-indent the last two lines in this document so that the equal signs are aligned BUT the top line of Question 4 is left-indented by itself as it is?
Code: Select all
\documentclass[fleqn]{article}
\usepackage{fullpage}
\usepackage[inline]{enumitem}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage[parfill]{parskip}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{siunitx}
\pagestyle{empty}
\setlength{\mathindent}{0in}
\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{\alph{enumii})}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0cm}
\begin{document}
\begin{enumerate}[leftmargin=0cm]
\item
$\begin{aligned}[t]
&\lambda=\text{0.5 m} \\
&f=\text{20 Hz}
\end{aligned}$
\qquad
$\begin{aligned}[t]
&v=\lambda f \\
&v=10
\end{aligned}$
\item
$\begin{aligned}[t]
&v=340 \\
&f=\text{1000 Hz}
\end{aligned}$
\qquad
$\begin{aligned}[t]
&\dfrac{v}{f}=\lambda \\
&0.34=\lambda
\end{aligned}$
\item
$\begin{aligned}[t]
y(x,t)=0.015\sin(25-1200t)
\end{aligned}$
\begin{enumerate}[leftmargin=*,labelsep=0cm,labelwidth=0cm,labelindent=0cm]
\item
$\begin{aligned}[t]
y(x,t)=0.015\sin(25-1200t)
\end{aligned}$
\item
$\begin{aligned}[t]
v=\lambda f
\end{aligned}$
\hspace{1.2in}
\smash{$\begin{aligned}[t]
&v=(0.25)(191) \\
&v=47.75
\end{aligned}$}
\end{enumerate}
\begin{minipage}[t]{2in}
$\begin{aligned}[t]
&k=\dfrac{2\pi}{\lambda} \\
&\lambda k=2\pi \\
&\lambda=\dfrac{2\pi}{k} \\
&\lambda=\dfrac{2\pi}{25} \\
&\lambda=0.25
\end{aligned}$
\qquad
$\begin{aligned}[t]
&\omega=2\pi f \\
&\dfrac{\omega}{2\pi}=f \\
&\dfrac{1200}{2\pi}=f \\
&191=f
\end{aligned}$
\end{minipage}
\item
$\begin{aligned}[t]
y(x,t)=0.12\sin(3x-15t) \\
y(0.6,0.2)&=0.12\sin(3(0.6)-15(0.2)) \\
&=-\text{0.11 m}
\end{aligned}$
\end{enumerate}
\end{document}
Last edited by
ghostanime2001 on Sun Aug 07, 2011 7:16 am, edited 1 time in total.
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide : 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook : 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ : the first book about TikZ for perfect drawings in your LaTeX thesis
Stefan Kottwitz
Site Admin
Posts: 10359 Joined: Mon Mar 10, 2008 9:44 pm
Post
by Stefan Kottwitz » Sat Jul 30, 2011 10:47 am
Since you already load the mathtools package, you can use its command \mathllap:
Code: Select all
\item
$\begin{aligned}[t]
y(x,t)&=0.12\sin(3x-15t) \\
\mathllap{y(0.6,0.2)}&=0.12\sin(3(0.6)-15(0.2)) \\
&=-\text{0.11 m}
\end{aligned}$
As desired, all equations are aligned at the equal signs and the top line stays at its previous position. As result the second line goes a bit far to the left.
Stefan
LaTeX.org admin
ghostanime2001
Posts: 402 Joined: Fri May 20, 2011 9:41 am
Post
by ghostanime2001 » Sat Jul 30, 2011 7:51 pm
I want something like this except the top line should be left-aligned and the second and third lines to be how they are unchanged.
Code: Select all
\item
$\begin{aligned}[t]
\mathrlap{y(x,t)=0.12\sin(3x-15t)} \\
y(0.6,0.2)&=0.12\sin(3(0.6)-15(0.2)) \\
&=-\text{0.11 m}
\end{aligned}$