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.

  • Try \hspace{-10pt} before the tabular environment, – Jesse Nov 13 '13 at 8:34
  • 5
    Try \begin{tabular}{@{}lllll@{}}. The two @{} suppress the column separation space at the beginning and at the end. – nickie Nov 13 '13 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 Nov 13 '13 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 Mar 16 '14 at 8:54
  • 1
    @Mico-- thanks for the insights :-) – Jesse Mar 16 '14 at 10:57
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}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.