1

I am a very beginner of LaTeX and I do not have any kind of experience with it.

How can I make formulas start at the same position such that they are aligned exactly underneath each other.

\documentclass[oneside,12pt]{scrartcl}    
\usepackage[ngerman]{babel}
\usepackage[fixamsmath,disallowspaces]{mathtools}
\begin{document}

\underline{Verschiebare Ger{\"a}te}

\begin{equation*}    
P_j(t,s_j) = 
\begin{cases} 
 0 & \text{f"ur } t < s_j \ Q_j(t-s_j) & \text{f"ur } s_j \leq t \leq s_j + p_j \ 0 & \text{f"ur } t \textgreater s_j + p_j    
\end{cases}    
mit s_j = r_j + \Delta t \ \Delta t \leq tDoF    
\end{equation*}    
\end{document}

My problem refers to the last two formulars. I want the \Delta t to start exactly underneath the s_j, so the equality signs of those two formulars should start at the same position, but underneath each other.

5
  • 3
    Perhaps the documentclass option fleqn is what you are searching for?
    – Juri Robl
    Feb 8, 2015 at 12:40
  • Hi and welcome, instead of shooting into the blue, a bit of scientific preparation might be a good idea. If you want to know more about typesetting maths, please have a look at Mathmode.
    – Johannes_B
    Feb 8, 2015 at 12:43
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. A suggestion: Do us a favour and change your username to something more telling than "user1234". Feb 8, 2015 at 15:40
  • You might be interested in TeXwelt.de, agerman site with the same Question and Anwer format and goLaTeX, a classical german discussion forum.
    – Johannes_B
    Feb 8, 2015 at 15:51
  • 1
    Remember to accept one of the answers if you find it useful. Feb 8, 2015 at 17:22

3 Answers 3

2

I'm not sure I've guessed what you want but here is a try:

\documentclass{scrartcl}

\usepackage[showframe]{geometry} % used to show page width
\usepackage{mathtools}

\begin{document}

\begin{equation*}
P_{j}(t, s_{j}) =
\begin{cases}
0                & \text{f{\"u}r $t < s_{j}$,}\\
Q_{j}(t - s_{j}) & \text{f{\"u}r $s_{j} \leq t \leq s_{j} + p_{j}$,}\\
0                & \text{f{\"u}r $t > s_{j} + p_{j}$,}
\end{cases}
\end{equation*}
mit $s_{j} = r_{j} + \Delta t$ f{\"u}r $\Delta t \leq tDoF$.

\end{document}

output

1

You can use the align environment to align math at specific parts:

\documentclass[oneside,12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage[fixamsmath,disallowspaces]{mathtools}
\begin{document}

\begin{align*}
P_j(t,s_j) &= \begin{cases}
    0 &  \text{f"ur  } t < s_j   \\
        Q_j(t-s_j) & \text{f"ur  } s_j  \leq t \leq  s_j  + p_j  \\
        0 & \text{f"ur  } t \textgreater s_j + p_j
   \end{cases}\\
%\intertext{mit}\\
\text{mit }&s_j = r_j +  \Delta t  \\
&\Delta t \leq tDoF
\end{align*}
\end{document}

To add text on it's own line you can use intertext or if you want it inline use text as you already did.

enter image description here

Or if you want the equation symbols directly underneath each other:

\text{mit }s_j &= r_j +  \Delta t  \\
\Delta t &\leq tDoF

enter image description here

1

You can use the alignenvironment. Be careful to use \\ to break lines.

\documentclass[oneside,12pt]{scrartcl} 
\usepackage[ngerman]{babel} 
\usepackage{amsmath} 
\usepackage[fixamsmath,disallowspaces]{mathtools} 

\begin{document}

\underline{Verschiebare Ger{\"a}te}
\begin{align*}
P_j(t,s_j) &= \begin{cases} 0 & \text{f"ur } t < s_j \\
   Q_j(t-s_j) & \text{f"ur } s_j \leq t \leq s_j + p_j \\
   0 & \text{f"ur } t \textgreater s_j + p_j \end{cases} \\
\text{mit } s_j& = r_j + \Delta t \ \Delta t \leq tDoF
\end{align*}

\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .