0

Is there a way to use longtable that can create table spanning multiple pages with tabbing? It seems using tabular inside tabbing works, like

\begin{tabbing}
xxxx\=xxxxxxxx\=xxxxxxxx\=xxxxxxxx\=\kill
\>\begin{tabular*}{0.9\linewidth}{l@{\extracolsep{\fill}}r}
foo & bar \\
\end{tabular*}
\end{tabbing}

but changing \>\begin{tabular*}{0.9\linewidth}{l@{\extracolsep{\fill}}r} to \>\begin{longtable}{0.9\linewidth}{l@{\extracolsep{\fill}}r} will lead to the error

Missing \endgroup inserted.

Using longtblr from package tabularray, or using tabularx with package ltablex does not seem to work either.

3
  • No this is not possible and seems a weird thing to want?? Whatever alignments you would put in an outer tabbing could be part of the longtable. (I have used latex for over 30 years and don't think I have ever found need to use tabbing:-) Nov 8, 2022 at 10:05
  • Thanks David! I am trying to use this template. yuba.stanford.edu/~sundaes/OLDAPPMATERIALS/2003FACULTYAPP/CV
    – JQK
    Nov 8, 2022 at 10:34
  • I would think the OLDAPPMATERIALS in that link would be a discouragement to use it. If you want to make a CV (Résume) there are newer LaTeX templates to use. Nov 8, 2022 at 11:14

1 Answer 1

1

I looked into the file, and actually, in the code that is not commented out, the tabbing is only used to shift one of the tabulars a bit to the right. If you replace the only \> that is not commented out by \hspace{2em} you get approximately the same effect. You can then remove all the \begin{tabbing} and \end{tabbing} lines and the corresponding line following the \begin{tabbing} with the \kill command at the end.

The only difference will then be that the vertical spacing is a bit difference, as the tabbing environment adds some vertical space before and after. If that bothers you you can add some \vspace commands.

Once you have removed the tabbing environments you can use longtable instead of tabular.

But as I said in my comment, there are better CV slasses/styles available in LaTeX, for example moderncv, or if you want to be swamped with all the possibilities, see https://www.ctan.org/topic/cv

4
  • Thanks a lot Pieter for your answer and comment! When I change as you recommended by using longtable, I find I am not able to make the width the same as the file, say to \linewidth. I tried to search on this but seems there is no very simple solution. Do you have any idea on this? Also, tabularx does not seem to support changing the width. I will also try to check the packages you mentioned.
    – JQK
    Nov 8, 2022 at 17:01
  • Using the method provided here (stackoverflow.com/questions/38577082/…) and adding an extra empty column along with tuning the width of each column, I am able to produce the desired effect, although very tricky. Maybe there can be some more elegant solutions.
    – JQK
    Nov 8, 2022 at 17:27
  • \setlength\LTleft{0pt} \setlength\LTright{0pt} \begin{longtable}{@{\extracolsep{\fill}}...} should make your longtable as wide as the text. Nov 8, 2022 at 18:18
  • \setlength\LTleft and \setlength\LTright work well. Thanks a lot!
    – JQK
    Nov 8, 2022 at 21:10

You must log in to answer this question.

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