2

I want text on both sides of a vertical line, that expands over several rows. Until now it worked for me using this code. But apparently that works only if the text with more than one row is on the right side. Now that I want to have several rows and the left side, latex doesn't make a new row, only a bigger spacing. What do I need to change to fix this problem?

\documentclass[11pt]{article}

\usepackage[ngerman]{babel}
\usepackage[a4paper, text={16.5cm, 25.2cm}, centering]{geometry}
\usepackage[sfdefault]{ClearSans}
\usepackage[utf8]{inputenc}
\setlength{\parskip}{1.2ex}
\setlength{\parindent}{0em}


\usepackage{amsmath, nccmath}

\begin{document}

\begin{fleqn}
\[ 
 \text{Si + présent }  
  \left| \begin{array}{l}   
\text{+ présent}  \\
\text{+ futur}  \\
\text{+ impératif} \\
\text{+ conditionnel présent}
\end{array}\right.
\]
\end{fleqn}


\begin{fleqn}
\[ 
 \text{je } \\
 \text{tu}\\
  \text{il/elle/on}\\
   \text{ils/elles}
  \left| \begin{array}{l}   
 \text{boivent}
\end{array}\right.
\]
\end{fleqn}

\end{document}

enter image description here

1

You need the array for line breaks, so you should swap things around to have

\[ 
\left.\begin{array}{l} 
 \text{je } \\
 \text{tu}\\
 \text{il/elle/on}\\
 \text{ils/elles}
\end{array}\right|
\text{boivent}
\]

enter image description here

Alternatively, use a tabular which switches to text mode, so all the \text inside the array is not needed:

\[
\begin{tabular}{l|}
je \\
tu \\
il/elle/on \\
ils/elles
\end{tabular}\quad
\text{boivent}
\]

enter image description here

But do you need the math enviroments at all? What about something like this?

\documentclass[11pt]{article}

\usepackage[ngerman]{babel}
\usepackage[a4paper, text={16.5cm, 25.2cm}, centering]{geometry}
%\usepackage[sfdefault]{ClearSans}
\usepackage[utf8]{inputenc}
\setlength{\parskip}{1.2ex}
\setlength{\parindent}{0em}


\usepackage{amsmath, nccmath}

\begin{document}

Si + présent
\begin{tabular}{|l}
+ présent  \\
+ futur  \\
+ impératif \\
+ conditionnel présent
\end{tabular}


\begin{tabular}{l|}
je \\
tu \\
il/elle/on \\
ils/elles
\end{tabular}
boivent

\end{document} 
  • Thank you the \tabular version is so much easier... I didn't knew how to put the single word in the middle of the rows... so I used the complicated version in math mode but your version with tabular is much better. – Katharina Apr 11 '18 at 14:41

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.