2

I have a question. My code looks like this:

\documentclass[12pt,a4paper]{report}
\usepackage[Glenn]{fncychap}
\usepackage[latin1]{inputenc}
\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}

\begin{document}
\begin{center}
  $\left\{ \begin{array}{cl} 
  \textrm{math stuff} & \\
  \textrm{in}&\\
  \textrm{here} &
  \end{array}\right\}\leftrightarrow 
  \left\{\begin{array}{cl}  
  \textrm{and} & \\
  \textrm{some stuff in here} &\\
  \end{array}\right\}.$
\end{center}
\begin{center}
  $\left\{\begin{array}{cl}  %
  \textrm{other stuff} & \\
  \textrm{in} &\\
  \textrm{right here} &
  \end{array}\right\}\leftrightarrow 
  \left\{\begin{array}{cl}
  \textrm{and} & \\
  \textrm{finally} &\\
  \textrm{here}\\
  \end{array}\right\}.$
\end{center}
\end{document}

What I'd like to have is, that the arrows are aligned. How do I do that?

  • 1
    Welcome to TeX.SX! You do not need to use \begin{center}.... If you put your math code in some equation environment, it will get centered automatically in a report. The $ $ is for inline math. The package should load all you need for typesetting math. Therefore I would remove the 4 ams packages (if it yields errors for you, try which one is actually needed) – LaRiFaRi Jul 9 '14 at 7:29
3

You could just put it in an align environment:

% arara: pdflatex

\documentclass[12pt,a4paper]{report}
\usepackage[latin1]{inputenc}
\usepackage{mathtools}

\begin{document}
\begin{align*}
  \left\{\begin{array}{cl} 
  \textrm{math stuff} & \\
  \textrm{in}&\\
  \textrm{here} &
  \end{array}\right\}&\leftrightarrow 
  \left\{\begin{array}{cl}  
  \textrm{and} & \\
  \textrm{some stuff in here} &\\
  \end{array}\right\}.\\
      \left\{\begin{array}{cl}  %
  \textrm{other stuff} & \\
  \textrm{in} &\\
  \textrm{right here} &
  \end{array}\right\}&\leftrightarrow 
  \left\{\begin{array}{cl}
  \textrm{and} & \\
  \textrm{finally} &\\
  \textrm{here}\\
  \end{array}\right\}.
\end{align*}
\end{document}

enter image description here

  • 1
    Nice, exactly what I wanted. – Dicen Jul 9 '14 at 7:28

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.