0

I have a page reference to a source text that I'd like to align to the bottom of a centered table. Here is an illustration what I currently have:

Not the correct result

Note that the page reference ("[p. 74]") appears on a separate line below the table. I would like to have it appear aligned with the bottom of the table (keeping the table centered and the reference at the right of the page).

I understand why what I'm doing is wrong:

\documentclass[varwidth, border = 6pt]{standalone}
\usepackage{array}
\usepackage{booktabs}
\newcommand\Sthree{%
  \begin{tabular}{>$c<$ | *{6}{>$c<$}}
    \times  & 1 & a & b & c & d & e \\
    \specialrule{\lightrulewidth}{0pt}{0pt}\rule{0pt}{10pt}
    1 & 1 & a & b & c & d & e \\
    a & a & 1 & c & b & e & d \\
    b & b & e & d & a & 1 & c \\
    c & c & d & e & 1 & a & b \\
    d & d & c & 1 & e & b & a \\
    e & e & b & a & d & c & 1
  \end{tabular}%
}

\begin{document}
The student should check the following table, which is the table of the
group $S_3$:
\begin{center}
  \Sthree
\end{center}
\hfill[p.~74]
\end{document}

Clearly, I'm centering the table, starting a new line, and right-aligning the reference. What I haven't been able to figure out is how do the right thing. I have tried various combinations of \vbox, \makebox, \minipage and so on, but I have done nothing but create a lot of junk.

I think this is likely to be not hard, but I haven't been able to sort out a solution.

1 Answer 1

0

You can remove the vertical space added by \end{center} by adding \unskip and then go up one line using \vspace{-\baselineskip}.

Code:

\documentclass[varwidth, border = 6pt]{standalone}
\usepackage{booktabs, array}
\newcommand\Sthree{%
  \begin{tabular}{>$c<$ | *{6}{>$c<$}}
    \times  & 1 & a & b & c & d & e \\
    \specialrule{\lightrulewidth}{0pt}{0pt}\rule{0pt}{10pt}
    1 & 1 & a & b & c & d & e \\
    a & a & 1 & c & b & e & d \\
    b & b & e & d & a & 1 & c \\
    c & c & d & e & 1 & a & b \\
    d & d & c & 1 & e & b & a \\
    e & e & b & a & d & c & 1
  \end{tabular}%
}

\begin{document}

The student should check the following table, which is the table of the
group $S_3$:
\begin{center}
  \Sthree
\end{center}
\unskip\vspace{-\baselineskip}\hfill[p.~74]


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