1

Basically, I am using an IoP template for my MPhys report, which for some reason is not keen on me using \align.

This is currently what I have;

equations 12 & 13 are aligned properly, but 14 & 15 are not aligned horizontally properly.

The code I have is;

\usepackage{iopams}     
\usepackage[breaklinks=true,colorlinks=true,linkcolor=blue,urlcolor=blue,citecolor=blue]{hyperref}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{tabularx}
\usepackage{xfrac}

\noindent\begin{tabularx}{\textwidth}{@{}XX@{}}
  \begin{equation}
\hspace{-1.5cm}  r = \frac{ r_{01} + r_{12}e^{2i \beta} }{{ 1 + r_{01}r_{12}e^{2i \beta}}}
    \label{eqn:ref}
  \end{equation} &
  \begin{equation}
\hspace{-1.5cm} t = \frac{ t_{01}t_{12}e^{2i \beta} }{{ 1 + r_{01}r_{12}e^{2i \beta}}} ,
    \label{eqn:trans}
  \end{equation}
\end{tabularx}

text

\noindent\begin{tabularx}{\textwidth}{@{}XXX@{}}
  \begin{eqnarray}
\hspace{-1.8cm}  R = |r|^2 
    \label{eqn:R}
  \end{eqnarray} &
  \begin{eqnarray}
 \hspace{-1.5cm} T = \frac{n_2 cos(\theta_2)}{n_1 cos(\theta_1)}|t|^2 ,
    \label{eqn:T}
  \end{eqnarray} 
\end{tabularx}

I was using \begin{equation} before, but that wasn't working so tried to use eqnarray. There do seem to be a few similar questions on Tex, but I can't seem to find one that allows me to do what I want without using \align.

2 Answers 2

1

I just figured out a workaround, which is to basically make both equations the same size, by using

\vphantom{\frac{n_2 cos(\theta_2)}{n_1 cos(\theta_1)}}

which creates a "phantom" fraction so both equations contain a fraction, so become aligned.

See How to align the the numbers horizontally?

1

column type m{...} from package array can be of help:

\documentclass{article}
\usepackage{array}

\begin{document}
\noindent%
\begin{tabular}{@{}*{2}{m{\dimexpr0.5\linewidth-2\tabcolsep\relax}}@{}}
  \begin{equation}
r = \frac{ r_{01} + r_{12}\exp^{2i \beta} }
         { 1 + r_{01}r_{12}e^{2i \beta}}
    \label{eqn:ref}
  \end{equation}
  &
  \begin{equation}
t = \frac{ t_{01}t_{12}e^{2i \beta} }
         { 1 + r_{01}r_{12}e^{2i \beta}} ,
    \label{eqn:trans}
  \end{equation}
\end{tabular}

and

\noindent%
\begin{tabular}{@{}*{2}{m{\dimexpr0.5\linewidth-2\tabcolsep\relax}}@{}}
  \begin{equation}
R = |r|^2
    \label{eqn:R}
  \end{equation}
  &
  \begin{equation}
T = \frac{n_2 cos(\theta_2)}{n_1 cos(\theta_1)}|t|^2 ,
    \label{eqn:T}
  \end{equation}
\end{tabular}
\end{document}

enter image description here

You must log in to answer this question.

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