Math & Science ⇒ can't automatically align text in align environment
can't automatically align text in align environment
Also I wanted to number each one of the three equations in my array environment but could not find the relevant help.
Please somebody?
My (halfbacked and time consuming solution - I also like to have these equations framed):
\begin{framed}
Summary of PPMA time-dependent trajectories
\begin{align}
x = x(t) = & \, x_i+{v_i}_x t \hspace{38mm} \text{(All regions)}\label{eqxt}\\
y = y(t) = & \left\{ \begin{array}{llll}
& \hspace{-5mm} \phantom{-}y_i+{v_i}_y t & (\text{region I: } t \leq t_2 = -y_i/{v_i}_y) \\
& \hspace{-5mm} \phantom{-}{v_i}_y (t-t_2) + \frac{1}{2} a (t-t_2)^2 & (\text{region II: } t_2 \leq t \leq t_3)\\
& \hspace{-5mm} -{v_i}_y(t-t_3) & (\text{region III: } t \geq t_3 = -y_i/{v_i}_y-2{v_i}_y/a )\\
\end{array}
\right.\label{eqyt}\\
z = z(t) = & \, z_i+{v_i}_z t \hspace{38mm} \text{(All regions)} & \label{eqzt}
\intertext{with}
a = & \, a_y = -(q/m) V_d/d < 0 \hspace{13mm} \text{(acceleration in II)} \label{eqa}\\
y(t_2) = & \, y(t_3) = 0 \hspace{36.5mm}\text{(ground plate of PPMA)} \label{eqyplate}
\end{align}
\end{framed}
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
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
can't automatically align text in align environment
Code: Select all
\documentclass[10pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{geometry}
\usepackage{mathtools}
\begin{document}
\begin{alignat}{3}
x &= x(t) &&= x_i+{v_i}_x t &&\quad \text{(All regions)}\label{eqxt}\\
y &= y(t) &&= \left\{
\begin{array}{@{}l@{}}
\phantom{\mathrel{-}}y_i+{v_i}_y t \\
\phantom{\mathrel{-}}{v_i}_y (t-t_2) + \frac{1}{2} a (t-t_2)^2 \\
-{v_i}_y(t-t_3) \\
\end{array}\right. &&\quad
\begin{array}{@{}l@{}}
(\text{region I: } t \leq t_2 = -y_i/{v_i}_y) \\
(\text{region II: } t_2 \leq t \leq t_3) \\
(\text{region III: } t \geq t_3 = -y_i/{v_i}_y-2{v_i}_y/a )\\
\end{array} \label{eqyt} \\
z &= z(t) &&= z_i+{v_i}_z t &&\quad \text{(All regions)} \label{eqzt}
\intertext{with}
a &= a_y &&= -(q/m) V_d/d < 0 &&\quad \text{(acceleration in II)} \label{eqa}\\
y(t_2) &= y(t_3) &&= 0 &&\quad \text{(ground plate of PPMA)} \label{eqyplate}
\end{alignat}
\end{document}
- Please always check your examples for completeness and functionality. They must be compilable for others as provided.
- The forum software offers a »Code« tag for formatting code thus better recognition. It can be found among others in the button list right above the input window.
Best regards and welcome to the board
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10