0

Minimum Working Example

\documentclass{article}
\usepackage[hmargin=1cm,vmargin={1.25cm,1cm},
            footskip=2\baselineskip]{geometry}

\usepackage{tabularray} \UseTblrLibrary{booktabs, varwidth}

\usepackage{enumitem} \newlist{tabitemize}{itemize}{1}% <-- defined new list \setlist[tabitemize]{nosep, % <-- new list setup leftmargin = *, label = $\bullet$, before = \begin{minipage}[t]{\linewidth}, % <--- after = \end{minipage} % <--- }

\usepackage{lipsum}

\begin{document} \begin{longtblr}[ caption = {My long table with caption}, label = {tab: }, ]{ colspec = {@{} Q[l, wd=6cm] Q[l, wd=8.5cm] @{}}, row {1} = {font=\large\bfseries}, rowhead = 1, measure = vbox, } \toprule Publications & Publications \ \midrule \begin{tabitemize} \item \textbf{\Large test text left:} \lipsum[1-1]\footnote{test footnote left} \end{tabitemize} & \textbf{\Large test text right:} \lipsum[5-5] \begin{tabitemize} \item \lipsum[1-1] \item \lipsum[1-1] \end{tabitemize} \ \bottomrule \end{longtblr} \end{document}

Outcome

A portion of the screenshot of the outcome is shown below:

Long table with itemize

Question

It can be seen that though the left and right columns are both aligned to the top, the level of their first lines is not matching. How to match them (text text left and right)?

Other questions

question 1

1 Answers1

4

You have two problems:

  • table body is set as last foot. Remove command \lastfoot or move it after \endhead command
  • itemize list insert some vertical space (\topsep) before lists, consequently in left column it is moved for this space down.

MWE below is suggestion for improving looks of your table. In it is resolved remedy of use \endfoot and for list used \enumitem package an defined new lists for use in tables.

\documentclass{article}
% Change the page layout if you need to
\usepackage[hmargin=1cm,vmargin={1.25cm,1cm},
            footskip=2\baselineskip]{geometry}
\usepackage{graphicx}
\usepackage{ragged2e}
\usepackage{array, booktabs, longtable, tabularx}
\renewcommand*{\arraystretch}{1.2}%... and increase the row height

\usepackage{enumitem} \newlist{tabitemize}{itemize}{1}% <-- defined new list \setlist[tabitemize]{nosep, % <-- new list setup leftmargin = *, label = $\bullet$, before = \begin{minipage}[t]{\linewidth}, % <--- after = \end{minipage} % <--- }

\usepackage{lipsum}

\begin{document} \begin{longtable}{@{} >{\RaggedRight}p{6cm}>{\RaggedRight}p{8.5cm} @{}} \toprule \textbf{{\large {Publications}}} & \textbf{{\large {Publications}}} \ \midrule \endfirsthead \endhead \begin{tabitemize} \item \textbf{\Large test text left:} \lipsum[1-1] \end{tabitemize} & \textbf{\Large test text right:} \lipsum[5-5] \begin{tabitemize} \item \lipsum[1-1] \item \lipsum[1-1] \end{tabitemize} \ \bottomrule \end{longtable}

enter image description here

Addendum: You may consider to use tabularray package for your tables. Code for your long table using it, is:

\documentclass{article}
\usepackage[hmargin=1cm,vmargin={1.25cm,1cm},
            footskip=2\baselineskip]{geometry}

\usepackage{tabularray} \UseTblrLibrary{booktabs, varwidth}

\usepackage{enumitem} \newlist{tabitemize}{itemize}{1}% <-- defined new list \setlist[tabitemize]{nosep, % <-- new list setup leftmargin = *, label = $\bullet$, before = \begin{minipage}[t]{\linewidth}, % <--- after = \end{minipage} % <--- }

\usepackage{lipsum}

\begin{document} \begin{longtblr}[ caption = {My long table with caption}, label = {tab: }, ]{ colspec = {@{} Q[l, wd=6cm] Q[l, wd=8.5cm] @{}}, row {1} = {font=\large\bfseries}, rowhead = 1, measure = vbox, } \toprule Publications & Publications \ \midrule \begin{tabitemize} \item \textbf{\Large test text left:} \lipsum[1-1] \end{tabitemize} & \textbf{\Large test text right:} \lipsum[5-5] \begin{tabitemize} \item \lipsum[1-1] \item \lipsum[1-1] \end{tabitemize} \ \bottomrule \end{longtblr} \end{document}

Result is similar (but a wee bit nicer) as before.

Zarko
  • 296,517
  • Is there any way to achieve this without minipage? I have some footnotes which get transported to the middle of the page, at the end of respective minipages (instead of the bottom) – Neeraj Hanumante Jan 24 '22 at 12:26
  • @NeerajHanumante, sorry, I do not understand your problem. In my answer each cell is treated as minipage, but this should not have any influence on footnotes. Please provide MWE which reproduce your problem. – Zarko Jan 24 '22 at 12:50
  • Thank you for consideration. I have edited the MWE in the question and also updated the outcome screenshot. – Neeraj Hanumante Jan 24 '22 at 13:00
  • @NeerajHanumante, if you like to have footnote text at bottom of page, than you need to use \footnotemark[<number>footnotetext[]{footnote text at bottom of package. If this text should be below of table, than you must switch to talltblr environment. This can be better clarified in the new answer (if you will ask new question) – Zarko Jan 24 '22 at 15:59