Graphics, Figures & TablesSpacing Within A Table

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
dward1996
Posts: 16
Joined: Thu Nov 25, 2010 2:32 pm

Spacing Within A Table

Post by dward1996 »

Hi

I am currently trying to write a table of notation for a project I am working on, and as such want to construct a table with three coumns. One for the notawtion, one for the description, and one for a pare reference. However, I cannot seem to get the final column flush right against the right hand side of the page. I am currently using the tabular* environment:

Code: Select all

\begin{tabular}{clr}
$Aut(G)$ & The automorphism group of $G$ & (\pageref{auto})\\
\end{tabular}
Is there a simple way to addapt this to get the column with the page number in flush agains the right hand side of the page (or at least virtually flush).
Last edited by dward1996 on Mon Nov 29, 2010 12:06 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Spacing Within A Table

Post by localghost »

Obviously you are trying to create a glossary. And that's definitely a job for the excellent glossaries package.

Nevertheless you can get what you want with only a few modifications to your example.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage{mathtools}    % loads »amsmath«
\usepackage{blindtext}

\DeclareMathOperator*{\aut}{Aut}

\begin{document}
  \blindtext

  \medskip
  \noindent
  \begin{tabular*}{\linewidth}{@{}cl@{\extracolsep\fill}r@{}}
    $\aut(G)$ & The automorphism group of $G$ & (\pageref{auto})\\
  \end{tabular*}
\end{document}
The blindtext package is only for producing dummy text thus not part of the solution. Another approach would involve the tabularx package.


Thorsten
dward1996
Posts: 16
Joined: Thu Nov 25, 2010 2:32 pm

Re: Spacing Within A Table

Post by dward1996 »

Thank you for an extremely quick and very helpful response.
Post Reply