I have a horizontal table, made with \longtable
, with two cells: in the left cell there is text, and the right cell contains an equation I implemented with the \alignat
command. If I use the attached code, a misalignment between the top sides of the left cell text and the right cell equation shows up:
\documentclass[11pt, a4paper, twoside, openright, titlepage]{book}
\usepackage[english]{babel}
\usepackage{amsmath,amssymb}
\usepackage{ltxtable}
\begin{document}
\newsavebox\try
\begin{lrbox}{\try}
\begin{minipage}{0.5\textwidth}
\begin{alignat}{3}
\rightarrow ~~~ & \qquad {y_i}^0 ~ = & f \tiny ~ ( \tiny ~ {\mathbf{x}_1}^0 \tiny ~ ) \\
~ & \qquad {\mathbf{y}_i}^0 ~ = & \mathbf{f} \tiny ~ ( \tiny ~ {\mathbf{x}_1}^0 \tiny ~ ) \\
~ & \qquad {s_i}^0 ~ = & ~~ F \tiny ~ ( \tiny ~ {y_i}^0, \mathbf{y}^0 \tiny ~ )
\end{alignat}
\end{minipage}
\end{lrbox}
\begin{longtable}{p{0.5\textwidth}p{0.5\textwidth}}
Objective - fitness evaluation for the first population: objective values and fitness indices, $ {y_i}^0 $ and $ {s_i}^0 $, for the first generation; & \usebox{\try}
\end{longtable}
\end{document}
I want the table to look like this second image (obviously I was able to make it in with LaTeX, I just edited the first screenshot with PhotoShop):
Don't care about the usage of the box and minipage objects, it is just to allow the usage of the \alignat
into the long table: I already found out that the trouble doesn't depend on these items. I tried to directly insert the equation into the table using the \aligned
environment and the situation is exactly the same. I also tried out sizing commands such as \strut
and \setlength
, again without any result.
I need to use the \longtable
command, as this table will be part of a longer table I have to separate in two pages.
Do you have any idea to solve this problem? I really don't know how to cope with it.
\raisebox{-.73\baselineskip}{\usebox{\try}}