# mdframed and supertabular disagreeing on positioning (supertabular bug?)

Finding that a certain table in my document had to span several pages, and that longtable doesn't fit the bill because I have to change the running header mid-table, I turned to supertabular.

To get the vertical spacing right I use booktabs.

Since that broke the vertical lines surrounding the table, I thought about working around that by wrapping the whole table in mdframed.

So far about the history why anyone would want to wrap a supertabular with mdframed in the first place. ;-)

Now to the issue at hand: It appears that the two packages disagree on positioning by a couple of pt...?

Source:

\documentclass{article}

\usepackage{mdframed}
\usepackage{supertabular}

\begin{document}

\begin{mdframed}[innerleftmargin=0pt,innerrightmargin=0pt]
\begin{supertabular*}{\textwidth}{l@{\extracolsep{\fill}}l}
\hline
Foo & Bar\\
\hline
\end{supertabular*}
\end{mdframed}

\end{document}


Somewhat unexpected result:

Erm... huh?

EDIT: Further testing showed that it is supertabular's hline being pushed to the right (out of the text area), not mdframed pushed to the left. Testing also showed this to be specific to supertabular, as neither longtable, tabularx or tabular* displayed similar behaviour. Bug report mailed to supertabular maintainer, CC mdframed maintainer.

-
I read your e-mail. Thanks –  Marco Daniel Mar 2 '12 at 14:48
@MarcoDaniel: Problem resolved, thanks. –  DevSolar Mar 3 '12 at 12:12

You probably have some older libraries.

Using your code with TeXLive (updated today) and adding \usepacakge{showframe} I get:

Without the showframe package I get;

# Notes:

## Code:

\documentclass{article}

\usepackage{mdframed}
\usepackage{supertabular}
\usepackage{showframe}

\begin{document}
\begin{mdframed}[innerleftmargin=0pt,innerrightmargin=0pt]
\begin{supertabular*}{\textwidth}{l@{\extracolsep{\fill}}l}
\hline
Foo & Bar\\
\hline
\end{supertabular*}
\end{mdframed}
\end{document}

-
Indeed, a recent update seems to have solved the issue. Sorry for the fuzz. –  DevSolar Mar 3 '12 at 12:09