# Push table in a gb4e exe environment (almost?) to the margin

I use the package gb4e to number my (linguistic) examples in tabular format. In some of these tables, I add an extra letter counter to (some of) the rows.

When there is a letter counter in the first row, there needs to be space between gb4e's number and the letter counter, as in the first example below (but perhaps not as much space as the example has). But when I don't have a letter counter in the first row, as when I use table headers, the huge gap between the example number and the letter takes up unnecessary space. In such cases, I would like to push the entire table leftwards so that the letter counters a and b end up right under the example number (or at least a lot closer to the margin than is the case now).

Suggestions?

\documentclass{article}
\newcounter{mycounter}
\newcommand{\myletter}{
\refstepcounter{mycounter}
\themycounter)}
\renewcommand\themycounter{\alph{mycounter}}
\usepackage{gb4e}
\begin{document}

\begin{exe}
\ex
\begin{tabular}[t]{*3{l}}
\myletter & Word & Word\\
& Word & Word\\
\myletter & Word & Word\\
& Word & Word\\
\end{tabular}\setcounter{mycounter}{0}
\end{exe}

\begin{exe}
\ex
\begin{tabular}[t]{*3{l}}
\myletter & Word & Word\\
& Word & Word\\
\myletter & Word & Word\\
& Word & Word\\
\end{tabular}\setcounter{mycounter}{0}
\end{exe}
\end{document}


• Use something like \begin{tabular}[t]{@{\hspace{-1.5em}}*3{l}} which moves the tabular left by 1.5em. Nov 14 '13 at 20:57
• @Werner Is there a macro here that contains/sets the space from the margin to the first column? If so, could I use that to push the table to the margin instead of using magic numbers like -1.5em? Nov 15 '13 at 11:34
• No, this is comprised of a number of lengths, since exe sets a list. I guess one can play around with lengths like \leftmargin, \itemindent, \itemsep, \labelsep, \labelindent, \labelwidth and maybe a couple more... Nov 15 '13 at 16:56

You have two spurious spaces in the definition of \myletter that shift it to the right; you can also remove the padding LaTeX by default adds to the left of a tabular.

\documentclass{article}
\newcounter{mycounter}

\themycounter)}
\renewcommand\themycounter{\alph{mycounter}}
\usepackage{gb4e}
\begin{document}

\begin{exe}
\ex
\myletter & Word & Word\\
& Word & Word\\
\myletter & Word & Word\\
& Word & Word\\
\end{tabular}\setcounter{mycounter}{0}
\end{exe}

\begin{exe}
\ex
\begin{tabular}[t]{@{}*3{l}}

• In my real document preamble, I actually have those % symbols where you placed them, for the purpose of explaining to myself what those commands are doing. Didn't realize it mattered in this case, but it explains why the white space in my example here was so monstrous. Following on Werner's comment above, I assume there's a macro (or macros) created by LaTeX that sets the space from the margin to the first column here. If so, I could add \begin{tabular}[t]{@{\hspace{-\magicmacro}}*3{l}} or something to that effect? Nov 15 '13 at 11:33
• @Sverre I'd simply use \hspace{-.5em} (or so) in front of \begin{tabular}. Nov 15 '13 at 11:42