Table LateX 没有出现在文档中

Table LateX doesn't show up in the document

出于某种原因,我的代码没有重现文档中我想要的 table。只显示一条粗线,但没有单元格或文本。我做错了什么?


\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}

\begin{table}[]
\resizebox{\textwidth}{!}{%
\begin{tabular}{|l|l|l|l|}
\hline
Date   & Luis Lacalle Pou                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 & Date & Alberto Fernandez                                                                                                                                                                                                                                                                                                                                                                                                                                             \ \hline
May 21  & \begin{tabular}[c]{@{}l@{}}Announces the return to in-person classes strategy... \ “We are taking this decision because we are convinced that the risk is minimal. We wouldn’t be doing it otherwise”(Infobae, 2020)\end{tabular}                                                                                                                                                                                        & April 25  & Announcement of the extension of the lockdown... (Casa Rosada, 2020a) \ \hline
June 25  & Press conference speech... (CED Uruguay, 2020)                           & June 20   & Speech during Argentina’s Flag Day...  (Casa Rosada, 2020b)                                                                                                                                                                                                           \ \hline
July 12  & Lacalle Pou justified ... (Lacalle Pou, 2020a) & July 18   & Press conference along with Buenos Aires’ ... (Casa Rosada, 2020c)                                                                                                                                             \ \hline
July 22      & Press conference ... (Lacalle Pou, 2020b)                                                                                                                                                                                                                                                                        & July 31   & Speech directed to ... (Casa Rosada, 2020d)   \ \hline
September 22 & \begin{tabular}[c]{@{}l@{}}Speech for the General Assembly in the UN.  “Our country’s answer to the pandemic (...) \ (Lacalle Pou, 2020c)\end{tabular}                                                                                                                            & August 28 & \begin{tabular}[c]{@{}l@{}}Announcement of the extension of the quarantine restrictions. \ “It has been almost 100 days ... . (Casa Rosada, 2020e)\end{tabular}             \ \hline
\end{tabular}%
}
\end{table}

\end{document}

这是我的 LaTeX 文档中的样子

这就是我想要的样子

这是我的 LaTeX 文档中的样子

这就是我想要的样子

这不是一条粗线,字面意思是您的 table ...只是缩小了 \resizebox 太多以至于您看不到它。这是您不应该对包含文本的元素使用 \resizebox 的众多原因之一。其他原因是字母形状的选择不理想,以及最终文档中所有不同字体大小的赎金字母外观。

其他问题:

  • \begin{document} 缺失

  • 通过为您的 table 使用 l 列,然后甚至将 verrrrrrrrrrrry 长行包装到带有 c 列的其他 table 中,您非常有效地告诉乳胶永远不要在你的 table 中断行。相反,您可以使用固定的列,或者 - 更简单 - 使用 tabularray 包和 X 列,它将自动计算宽度

  • 没有给出像 [htbp] 这样的浮动说明符


\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{tblr}{|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... “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... (Casa Rosada, 2020a) \ \hline
June 25  & Press conference speech... (CED Uruguay, 2020)                           & June 20   & Speech during Argentina’s Flag Day...  (Casa Rosada, 2020b)                                                                                                                                                                                                           \ \hline
July 12  & Lacalle Pou justified ... (Lacalle Pou, 2020a) & July 18   & Press conference along with Buenos Aires’ ... (Casa Rosada, 2020c)                                                                                                                                             \ \hline
July 22      & Press conference ... (Lacalle Pou, 2020b)                                                                                                                                                                                                                                                                        & July 31   & Speech directed to ... (Casa Rosada, 2020d) \ \hline
September 22 & Speech for the General Assembly in the UN.  “Our country’s answer to the pandemic (...)  (Lacalle Pou, 2020c)                                                                                                                       & August 28 & Announcement of the extension of the quarantine restrictions.  “It has been almost 100 days ... . (Casa Rosada, 2020e)          \ \hline
\end{tblr}%
%}
\end{table}

\end{document}