0

I'm typesetting a subsection of exercises using array environment. However, the vertical centers of exercise numbers do not align with the display style fraction bars (see the following figure). Other methods not using array are welcome, but please take into account that the vertical space between different rows can be changed (e.g. \renewcommand{\arraystretch}{0.5} in my code). I would appreciate any help with this situation.

enter image description here

\documentclass[a5paper,12pt]{book}
\usepackage[top=1.5cm,bottom=2cm,includehead=true,inner=2cm,outer=1.8cm]{geometry}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{array}


\begin{document}

\chapter{Chap}

\section{Sec}

text text text text text text text text text text text text text text text text text text text text text text text text text 

\subsection{Exercise}

\begin{equation*}
\renewcommand{\arraystretch}{0.5}
\begin{array}{r@{\enspace } >{$\displaystyle}m{4.4cm}<{$} r@{\enspace } >{$\displaystyle}m{4.4cm}<{$}}
1.  & {\frac{1}{2}}+{\frac{1}{5}}=       & 2.   & {\frac{3}{4}}+{\frac{5}{8}}=              \\
    &                                    &      &                                           \\
3.  & {\frac{7}{9}}+{\frac{16}{21}}=     & 4.   & {\frac{5}{6}}+{\frac{11}{14}}=            \\
    &                                    &      &                                           \\
5.  & {\frac{15}{22}}+{\frac{11}{26}}=   & 6.   & {\frac{103}{10}}+8{\frac{5}{16}}=         \\
\end{array}
\end{equation*}

\end{document}

2 Answers 2

1

Why not going for simplicity?

\documentclass[a4paper,12pt]{book}
\usepackage{amsmath}
\usepackage{array}

\begin{document}

\chapter{Chap}

\section{Sec}

Some text for the section.
Some text for the section.
Some text for the section.
Some text for the section.
Some text for the section.

\subsection{Exercises}

\begingroup
\renewcommand{\arraystretch}{2.5}
\setlength{\arraycolsep}{0.5em}
\begin{tabular}{
  @{}
  l
  >{$\displaystyle}l<{$}
  @{\hspace{4em}}
  r
  >{$\displaystyle}l<{$}
  @{}
}
1.  & {\frac{1}{2}}+{\frac{1}{5}}=       & 2.   & {\frac{3}{4}}+{\frac{5}{8}}=              \\
3.  & {\frac{7}{9}}+{\frac{16}{21}}=     & 4.   & {\frac{5}{6}}+{\frac{11}{14}}=            \\
5.  & {\frac{15}{22}}+{\frac{11}{26}}=   & 6.   & {\frac{103}{10}}+8{\frac{5}{16}}=         \\
\end{tabular}
\endgroup

\end{document}

enter image description here

2

Anyway, the exercise numbers are typed on the base line, whereas the fraction bars are on the math axis.

If you absolutely want to align them, here is a way, using a simpler code, based on the tasks package:

\documentclass[a5paper,12pt]{book}
\usepackage[top=1.5cm,bottom=2cm,includehead=true,inner=2cm,outer=1.8cm]{geometry}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{tasks}

\begin{document}

\chapter{Chap}

\section{Sec}

text text text text text text text text text text text text text text text text text text text text text text text text text

\subsection{Exercise}

\begin{tasks}[label=\raisebox{0.5ex}{\arabic*.} ](2)
\task $\dfrac{1}{2}+\dfrac{1}{5}= $
\task $ \dfrac{3}{4}+\dfrac{5}{8}= $
\task $ \dfrac{7}{9} + \dfrac{16}{21} = $
\task $ \dfrac{5}{6} + \dfrac{11}{14} = $
\task $ \dfrac{15}{22} + \dfrac{11}{26}= $
\task $ \dfrac{103}{10}+8\,\dfrac{5}{16} = $
\end{tasks}

\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 .