5

enter image description here

I want write this in LaTeX. especially with the brace on the right-hand side, and the = signs aligned horizontally. so I used align.. This is how it looks like in the output:

enter image description here

I am so desperate right now. every single time, latex doesn't seem to work right and this digitalizing takes more time than it already takes. Here is my code and my packages:

\documentclass[a4paper,10pt]{scrartcl} %Wissenschaftliche längere Arbeit, wie {report} aber als KOMA-Script-Klasse, was erweiterte Funktionen bietet
\usepackage[T1]{fontenc} %führt bei der Kodierung Umlaute zu einem Zeichen zusammen
\usepackage{listings}
\usepackage[utf8]{inputenc} %Zur direkten Eingabe von Umlauten ohne Befehle wie \"a
\usepackage[ngerman]{babel} %Lädt Trennmuster nach neuer deutscher Rechtschreibung
\usepackage{graphicx} %Einbindung von Grafikdateien
\usepackage{amsmath} %Erweiterer Mathemodus
\usepackage{amssymb} %-"-
\usepackage{textcomp} % für µ etc. in Textumgebung
\usepackage{scrpage2} %Zur Einrichtung von Kopf- und Fußzeile
\usepackage{helvet} %Arial
\usepackage{wrapfig} %Für Textunmflossene Grafiken
\usepackage{siunitx} %Eingeben von SI-Einheiten in Textumgebungen
%\usepackage[locale=DE]{siunitx} %Stellt deutsche Ausgabe von SI-Einheiten für Textumgebung ein
\usepackage{hyperref} %Zum anzeigen von HTML-Links
%\usepackage{subfig} %Um mehrere Grafiken via {subfigure} in ein eine {figure}-Umgebung zu tun
\usepackage{caption}
      \usepackage{subcaption}
\usepackage{tikz}%für koordinatensystem zeichnen
\usepackage{mathtools, amssymb}
\usepackage{cancel}%fürs durchstreichen im mathemodus
\begin{document}

\begin{align*}
    g_1: \; \vec{r}(t) &= \vec{r}_1 + t\vec{a}\\
    g_2: \; \vec{r}(s) &= \vec{r}_2 + s\vec{v}\\
    \left \vec{a} \times \vec{b} &\neq 0\\\langle \vec{a} \; \vec{b} \; \overrightarrow{P_1P_2} \rangle &\neq 0 \right\} \Rightarrow (\textrm{windschief})
\end{align*}

\end{document}

I also tested it with an array, but it didn't work, the equation signs weren't among themselves..

  • 1
    A quick observation: \left \vec{a} ... \right\} can't be correct. You probably intended \left. ... \right\}. (Note the "dot" immediately after \left.) – Mico May 6 '18 at 2:22
6

I suggest you use an rcases environment, provided by the mathtools package, for lines 3 and 4. A separate comment: use \colon, not :, in rows 1 and 2.

enter image description here

\documentclass[a4paper,10pt]{scrartcl}
\usepackage{scrpage2}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{listings}
\usepackage{graphicx} 
\usepackage{mathtools, amssymb}
\usepackage{textcomp}
\usepackage{helvet}
\usepackage{wrapfig}
\usepackage{siunitx}
\usepackage{caption,subcaption}
\usepackage{tikz}
\usepackage{cancel}
\usepackage{hyperref} % load this package last
\begin{document}

\begin{align*}
  &\begin{aligned}
    g_1\colon \vec{r}(t) &= \vec{r}_1 + t\vec{a}\\
    g_2\colon \vec{r}(s) &= \vec{r}_2 + s\vec{v}
   \end{aligned} \\
  &\begin{rcases}
     \vec{a} \times \vec{b} \neq 0\\
     \big\langle \vec{a\mathstrut}\,\vec{b\mathstrut}\,
          \overrightarrow{P_1P_2} \big\rangle \neq 0 
   \end{rcases}\Rightarrow (\text{windschief})
\end{align*}
\end{document}

Addendum: If the material to the right of the curly brace on lines 3 and 4 should be typeset flush-right (also known as ragged-left), I suggest you employ an array environment instead of the rcases environment.

enter image description here

% preamble exactly the same as above
\begin{align*}
  &\begin{aligned}
    g_1\colon \vec{r}(t) &= \vec{r}_1 + t\vec{a}\\
    g_2\colon \vec{r}(s) &= \vec{r}_2 + s\vec{v}
   \end{aligned} \\
  &\renewcommand\arraystretch{1.3}
   \kern-2\nulldelimiterspace % adjust spacing at left-hand edge
   \left.\begin{array}{@{}>{\displaystyle}r@{}}
     \vec{a} \times \vec{b} \neq 0\\
     \big\langle \vec{a\mathstrut}\,\vec{b\mathstrut}\,
          \overrightarrow{P_1P_2} \big\rangle \neq 0 
   \end{array}\right\}
   \Rightarrow (\text{windschief})
\end{align*}
2

I suggest two other alignment possibilities. Also, you might be interested by the \vvcommand, from the esvect package, which has nicer arrow tips, in my opinion (7 variants!), and manages indices with \vv*. I used it in the second code:

\documentclass[a4paper,10pt, ngerman]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{textcomp, helvet, old-arrows}
\usepackage[b]{esvect} 
\usepackage{babel}
\usepackage{scrpage2}
\usepackage{listings}
\usepackage{graphicx}
\usepackage{mathtools, amssymb}
\usepackage{wrapfig}
\usepackage{siunitx}
\usepackage{caption,subcaption}
\usepackage{tikz}
\usepackage{cancel}
\usepackage{hyperref} % load this package last (exception: cleveref)

\begin{document}

\begin{align*}
    g_1\colon \vec{r}(t) &= \vec{r}_1 + t\vec{a} \\
    g_2\colon \vec{r}(s) &= \vec{r}_2 + s\vec{v} \\
  \begin{rcases}
     \begin{aligned}\vec{a} \times \vec{b} & \neq 0\\
     \big\langle \vec{a\mathstrut}\,\vec{b\mathstrut}\,
            \overrightarrow{P_1P_2} \big\rangle & \neq 0
\end{aligned}
   \end{rcases} & \Rightarrow (\text{windschief})
\end{align*}

\begin{gather*}
  \begin{aligned}
    g_1\colon \vv{r}(t) &= \vv*{r}{\!1} + t\vv{a}\\
    g_2\colon \vv{r}(s) &= \vv*{r}{\!2} + s\vv{v}
   \end{aligned} \\
  \begin{rcases}
     \begin{aligned}\vv{a} \times \vv{b} & \neq 0\\
     \bigl\langle \vv{a\vphantom{b}}\,\vv{b}\,
          \vv*{P_1P\,}{\mkern-5mu 2} \bigr\rangle & \neq 0
\end{aligned}
   \end{rcases}\Rightarrow (\text{windschief})
\end{gather*}

\end{document}

enter image description here

  • 1
    thanks! i used your solution. what does gather, aligned and rcases do? i dont know these, i use latex just since 4 weeks and i am still learning it – Lillien Sabrina Gluch May 6 '18 at 11:29
  • gather is for non-aligned multiline equations, each of them (or each group) being centred. aligned is to align a group of lines within a main multiline equation, and rcases is like cases, but with a right brace on the right of the group. – Bernard May 6 '18 at 11:33
  • @LillienSabrinaGluch Dear user according to my point of view you should take into account the ethic that is very important when writing in LaTeX. The very good Bernard and Mico gave you excellent answers. – Sebastiano May 6 '18 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.