'If my LaTeX table extends beyond my page, how can I use the longtable package to make the table continue in the next page? [closed]
Here is my code, I had problems fitting it horizontally but I got help in a previous questions. The problem is that when I added all the text I needed, the table extended out of the page vertically. I try looking for ways to split it between 2 pages and I found the longtable packages but it works really oddly in my code. Perhaps I am missing something?
\documentclass[12pt,oneside,final]{article}
%\doctype{Thesis}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{layout}
\usepackage[algo2e, ruled, vlined]{algorithm2e}
\usepackage{tabularray}
\usepackage{makecell}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{tabularray}
\usepackage{geometry}
%\geometry{hmargin=1cm}
\begin{document}
\begin{table}[htbp]
%\resizebox{\textwidth}{!}{%
\begin{longtblr}{|l|X[l]|l|X[l]|}
\hline
Date & Luis Lacalle Pou & Date & Alberto Fernandez \\ \hline
May 21 & Announces the return to in-person classes strategy. The return was meant to be undertaken voluntarily and in three stages by the month of June. “We are taking this decision because we are convinced that the risk is minimal. We wouldn’t be doing it otherwise”(Infobae, 2020) & April 25 & Announcement of the extension of the lockdown. The president did not make explicit mention of the school closing but thanked “the little ones” for staying at home, protecting the health of the elder. “Keep trying to train yourselves at home (...)” he recommended to the youth. The specific word choice of train as opposed to educate, seems to hint at an awareness of the diminished educational processes during the lockdown. (Casa Rosada, 2020a)
\\ \hline
June 25 & Press conference speech. He qualified the lockdown as “the easy response” and pointed that it was “against his beliefs of individual freedom”. He highlighted the success of returning to in-person learning, especially for rural schools where the digital divide was a great concern. He denounced the “false dichotomy between health and the economy” expressing his concern for “mental health” and the increase in mental issues during the quarantine period. (CED Uruguay, 2020) & June 20 & Speech during Argentina’s Flag Day. On this holiday, 4th grade students across the country pledge allegiance to the flag. The speech does not address the school closing situation, the learning crisis or a possible return. (Casa Rosada, 2020b)
\\ \hline
July 12 & Lacalle Pou justified the enactment of the Urgent Consideration Law by explaining the positive changes it would bring to education among other factors he presented in a Twitter thread. He promotes the enactment of the law because it will “strengthen educational establishments, legally back up the Teacher Education Council, and create a system of national scholarships for universities. The law received huge backlashes from the popular sectors, criticized as “neoliberal”. (Lacalle Pou, 2020a) & July 18 & Press conference along with Buenos Aires’ governor and the Autonomous City of Buenos Aires’ mayor. Fernandez speaks about the “new normalcy”, praises the lockdown, comparing Argentina's situation with the crisis in the Basque Countries. He makes no mention about the education system. (Casa Rosada, 2020c) \\ \hline
July 22 & Press conference about the increase of COVID-19 cases in different infection focuses. He claimed that even though the contagion was increasing the re-opening guarantees achieved until then, were not going to change. (Lacalle Pou, 2020b)
& July 31 & Speech directed to the argentinean youth asking them to avoid social interactions. He based his request on the “solidarity” they should display to the elder that have a greater fatality rate from COVID-19. He “summoned” all argentinians to “avoid spreading the virus as well as getting infected with the virus” He expressed that it was not a matter of “civic liberty” but rather of solidarity. (Casa Rosada, 2020d)
\\ \hline
September 22 & Speech for the General Assembly in the UN. “Our country’s answer to the pandemic (...) was based on our citizens' use of their liberty with responsibility, solidarity and generosity, which in addition to a robust and resilient health system has allowed us to return to work, educational and cultural activities.”(Lacalle Pou, 2020c)
& August 28 & Announcement of the extension of the quarantine restrictions. “It has been almost 100 days of quarantine, I know it is tough (...) for those of us who cannot send their children to school and the kids that stay at home, it is hard for all. Yet I am convinced that the quarantine avoided a sanitary collapse like happened in many countries and cities around the world” . (Casa Rosada, 2020e))
\\ \hline
\end{longtblr}%
%}
\caption{A sample long table.}
\label{tab:long}
\end{table}
\end{document}
This is how it currently looks:
Solution 1:[1]
A table is a floating object, which is restricted to a single page. If you want the longtblr to break between pages, don't wrap it into a table environment:
\documentclass[12pt,oneside,final]{article}
%\doctype{Thesis}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{layout}
\usepackage[algo2e, ruled, vlined]{algorithm2e}
\usepackage{tabularray}
\usepackage{makecell}
\usepackage{algorithm}
\usepackage{algorithmic}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{tabularray}
\usepackage{geometry}
%\geometry{hmargin=1cm}
\begin{document}
\begin{longtblr}[
caption = {A sample long table.},
label = {tab:long}
]{|l|X[l]|l|X[l]|}
\hline
Date & Luis Lacalle Pou & Date & Alberto Fernandez \\ \hline
May 21 & Announces the return to in-person classes strategy. The return was meant to be undertaken voluntarily and in three stages by the month of June. “We are taking this decision because we are convinced that the risk is minimal. We wouldn’t be doing it otherwise”(Infobae, 2020) & April 25 & Announcement of the extension of the lockdown. The president did not make explicit mention of the school closing but thanked “the little ones” for staying at home, protecting the health of the elder. “Keep trying to train yourselves at home (...)” he recommended to the youth. The specific word choice of train as opposed to educate, seems to hint at an awareness of the diminished educational processes during the lockdown. (Casa Rosada, 2020a)
\\ \hline
June 25 & Press conference speech. He qualified the lockdown as “the easy response” and pointed that it was “against his beliefs of individual freedom”. He highlighted the success of returning to in-person learning, especially for rural schools where the digital divide was a great concern. He denounced the “false dichotomy between health and the economy” expressing his concern for “mental health” and the increase in mental issues during the quarantine period. (CED Uruguay, 2020) & June 20 & Speech during Argentina’s Flag Day. On this holiday, 4th grade students across the country pledge allegiance to the flag. The speech does not address the school closing situation, the learning crisis or a possible return. (Casa Rosada, 2020b)
\\ \hline
July 12 & Lacalle Pou justified the enactment of the Urgent Consideration Law by explaining the positive changes it would bring to education among other factors he presented in a Twitter thread. He promotes the enactment of the law because it will “strengthen educational establishments, legally back up the Teacher Education Council, and create a system of national scholarships for universities. The law received huge backlashes from the popular sectors, criticized as “neoliberal”. (Lacalle Pou, 2020a) & July 18 & Press conference along with Buenos Aires’ governor and the Autonomous City of Buenos Aires’ mayor. Fernandez speaks about the “new normalcy”, praises the lockdown, comparing Argentina's situation with the crisis in the Basque Countries. He makes no mention about the education system. (Casa Rosada, 2020c) \\ \hline
July 22 & Press conference about the increase of COVID-19 cases in different infection focuses. He claimed that even though the contagion was increasing the re-opening guarantees achieved until then, were not going to change. (Lacalle Pou, 2020b)
& July 31 & Speech directed to the argentinean youth asking them to avoid social interactions. He based his request on the “solidarity” they should display to the elder that have a greater fatality rate from COVID-19. He “summoned” all argentinians to “avoid spreading the virus as well as getting infected with the virus” He expressed that it was not a matter of “civic liberty” but rather of solidarity. (Casa Rosada, 2020d)
\\ \hline
September 22 & Speech for the General Assembly in the UN. “Our country’s answer to the pandemic (...) was based on our citizens' use of their liberty with responsibility, solidarity and generosity, which in addition to a robust and resilient health system has allowed us to return to work, educational and cultural activities.”(Lacalle Pou, 2020c)
& August 28 & Announcement of the extension of the quarantine restrictions. “It has been almost 100 days of quarantine, I know it is tough (...) for those of us who cannot send their children to school and the kids that stay at home, it is hard for all. Yet I am convinced that the quarantine avoided a sanitary collapse like happened in many countries and cities around the world” . (Casa Rosada, 2020e))
\\ \hline
\end{longtblr}%
\end{document}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | samcarter_is_at_topanswers.xyz |

