5

I'm having an issue where my "Course Work" section, which is tabular, is offset by a space or two - whereas ever other section lines up perfectly. I've read up on the tabular environment but could only find information on adjusting spacing between columns and not before them.

This is my code and the output, with the red highlighting the undesired space:

enter image description here

\section{\textsc{Course Work}}
\begin{tabular}{lllll}
 Molecular Biomechanics                & \ \ & Stem Cell Biology      & \ \ & Bioinstrumentation \\ 
 Eukaryotic Molecular Biology          & \ \ & Infectious Diseases    & \ \ & Biochemistry       \\
 Graduate Bioinformatics Seminar       & \ \ & Differential Equations & \ \ & Genetics           \\
 Undergraduate Research in MCD Biology & \ \ & Computational Biology  & \ \ & Statistics         \\
\end{tabular}

Any ideas on how I can fix this?

I also apologize beforehand for using "blank columns" to adjust column spacing. I know it isn't the proper way to do that, but when my friend initially taught me some basic LaTeX that was how he did it and I just haven't felt the need to change it yet since learning more about the tabular environment.

7
  • Try \hspace{-10pt} before the tabular environment,
    – Jesse
    Commented Nov 13, 2013 at 8:34
  • 5
    Try \begin{tabular}{@{}lllll@{}}. The two @{} suppress the column separation space at the beginning and at the end.
    – nickie
    Commented Nov 13, 2013 at 8:48
  • 1
    Your question would be improved if you pasted your code directly instead of including an image of it. Read the help about including code blocks.
    – Dan
    Commented Nov 13, 2013 at 18:58
  • 1
    @Jesse - Rather than \hspace{-10pt}, it would be better to specify \hspace{-\tabcolsep}, as that's the amount of horizontal whitespace that's inserted to the left of the first column. (The default value of \tabcolsep is 6pt, not 10pt.) Even better, though, is to suppress the insertion of this amount of whitespace from the get-go, e.g., by following @nickie's suggestion to insert @{} before the specifier of the left-most column.
    – Mico
    Commented Mar 16, 2014 at 8:54
  • 1
    @Mico-- thanks for the insights :-)
    – Jesse
    Commented Mar 16, 2014 at 10:57

1 Answer 1

5

Try \begin{tabular}{@{}lllll@{}}. The two @{} suppress the column separation space at the beginning and at the end:

\begin{tabular}{@{}lllll@{}}
Molecular Biomechanics                & \ \ & Stem Cell Biology      & \ \ & Bioinstrumentation \\ 
Eukaryotic Molecular Biology          & \ \ & Infectious Diseases    & \ \ & Biochemistry       \\
Graduate Bioinformatics Seminar       & \ \ & Differential Equations & \ \ & Genetics           \\
Undergraduate Research in MCD Biology & \ \ & Computational Biology  & \ \ & Statistics         \\
\end{tabular}

result

BTW, instead of using empty columns for column spacing, you can use the same feature of tabular, e.g., add @{\ \ } or better @{\hspace{1.5em}} between your columns:

\begin{tabular}{@{}l@{\hspace{1.5em}}l@{\hspace{1.5em}}l@{}}
Molecular Biomechanics                & Stem Cell Biology      & Bioinstrumentation \\ 
Eukaryotic Molecular Biology          & Infectious Diseases    & Biochemistry       \\
Graduate Bioinformatics Seminar       & Differential Equations & Genetics           \\
Undergraduate Research in MCD Biology & Computational Biology  & Statistics         \\
\end{tabular}

You must log in to answer this question.

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