4

I'm trying to make a partial list of symbols in my thesis. So far, I have written this code

\documentclass[12pt,a4paper,openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[left=1in, right=1in, top=1in, bottom=0.85in,headsep=22pt]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\begin{document}
\chapter*{A Partial List of Symbols} 
\begin{tabular}{l l}
 $+$ & Addition Operator\\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo
\end{tabular}
\end{document}

But unfortunately this is not precisely what I need. I need to make a bigger distance between the two columns (e.g., make a larger distance between $+$ and its description 'Addition Operator'). I tried adding \setlength{\tabcolsep}{3em} before \begin{tabular}{l l}. This seems to be a solution of the problem but, unfortunately, the whole table moves to the right whenever the distance (3em or whatever) increases. I need to keep the indentation of whole table so that the indentation of the table agrees with the indentation of the title of the chapter.

I also need to keep the two columns left aligned.

Can this be fixed? I need any help. Also I will be grateful if one can give me the easiest and shortest solution for this problem.

1
  • Try using the tabularray package, which will give you a lot more control over how your tables are laid out. Commented Jul 7 at 16:40

2 Answers 2

4

Try something like this:

\documentclass[12pt,a4paper,openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[left=1in, right=1in, top=1in, bottom=0.85in,headsep=22pt]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\begin{document}
\chapter*{A Partial List of Symbols} 
\begin{tabular}{@{}l@{\extracolsep{3em}} l}
 $+$ & Addition Operator\\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo
\end{tabular}
\end{document}

Output:

enter image description here

Explanation:

First @{} is used to eliminate the initial column separation so that you will get the desired align with the chapter title.

The second @{} contains the extra skip appropriate command (\extracolsep{3em}). Keep in mind it will affect following possible columns too.

EDIT:

Solution with pagebreaks (supertabular):

\documentclass[12pt,a4paper,openany]{book}
\usepackage[utf8]{inputenc}
\usepackage[left=1in, right=1in, top=1in, bottom=0.85in,headsep=22pt]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{supertabular}
\begin{document}
\chapter*{A Partial List of Symbols}

\begin{supertabular}{@{}l@{\extracolsep{3em}} l}
 $+$ & Addition Operator \\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo\\
  $+$ & Addition Operator \\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo\\
  $+$ & Addition Operator \\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo\\
  $+$ & Addition Operator \\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo\\
  $+$ & Addition Operator \\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo\\
  $+$ & Addition Operator \\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo\\
  $+$ & Addition Operator \\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo\\
  $\mathbb{Z}_n (n>1)$ & Bar Foo\\
  $+$ & Addition Operator \\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo\\
\end{supertabular}
\end{document}
6
  • This is a good answer. Why the table does not break into two pages (or more) if it does not fit one page? Commented Jul 7 at 20:36
  • You need to use longtable or supertabular or other similar solutions for this. tabular is not breakable (automatically by default).
    – koleygr
    Commented Jul 7 at 20:37
  • Ok. I tried to replace tabular by longtable but this broke the indentation!!!! Commented Jul 7 at 20:38
  • @HusseinEid ... See edit with supertabular that is easier. longtable needs some more changes (is actually somehow easy but has its own rules -not needed in your case I suppose-)
    – koleygr
    Commented Jul 7 at 20:42
  • 1
    Welcome @HusseinEid ... Happy TeXing!
    – koleygr
    Commented Jul 7 at 21:06
3

Assuming that the descriptions don't need to be broken across lines, you can use a tabular when the list fits a single page or longtable otherwise.

Instead of @{\quad} you can use @{\hspace{<length>}} with the length you prefer.

Table fits in one page

\documentclass[12pt,a4paper,openany]{book}
\usepackage[left=1in, right=1in, top=1in, bottom=0.85in,headsep=22pt]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm}

\begin{document}

\chapter*{A Partial List of Symbols}

\noindent% for safety
\begin{tabular}{@{} l @{\qquad} l @{}}
 $+$ & Addition Operator\\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo
\end{tabular}

\end{document}

Table needs more than one page

\documentclass[12pt,a4paper,openany]{book}
\usepackage[left=1in, right=1in, top=1in, bottom=0.85in,headsep=22pt]{geometry}
\usepackage{amsmath,amsfonts,amssymb,amsthm}
\usepackage{longtable}

\begin{document}

\chapter*{A Partial List of Symbols}

\begingroup
\setlength{\LTleft}{0pt}
\setlength{\LTpre}{0pt}
\begin{longtable}{@{} l @{\qquad} l @{}}
 $+$ & Addition Operator\\
 $-$ & Subtraction Operator\\
 $\times$ & Multiplication Operator\\
 $\sqrt{x}$ & Square Root of $x$\\
 $\odot$ & Foo Bar\\
 $\mathbb{Z}_n (n>1)$ & Bar Foo
\end{longtable}
\endgroup

\end{document}

Output

enter image description here

1
  • Thanks @egreg. This is also a nice solution. Commented Jul 8 at 12:22

You must log in to answer this question.

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