好吧,我刚刚从 www.tablesgenerator.com 生成了一个表格,并将整个代码粘贴到我的文档中,但突然我遇到了“不在外部 par 模式”错误。此外,我已将相关包添加到我的文档序言中(usepackage{graphicx})。
我搜索了很多但找不到合适的解决方案。
您可以在下面的链接中找到我的项目。此外,您还可以进行任何更改:
https://www.overleaf.com/10878247fnsprqcsmfmy
您可以找到从第 153 行到第 168 行的表格代码。
相关代码如下:\section{Education}
\runsubsection{Bachelor of Engineer in Software Engineer}
\descript{ Department of Engineer + Azad University of Tehran-north}
\location{Grad June 2017 | IRAN, Tehran}
\location{Project: Implementation of e-commerce Web Application}
\location{Advisor: Dr.K.Layeghi}
\location{Last Year GPA: 3.79 or (18.60)}
\location{Last 2 Years GPA: 3.18 or (16.74)}
\descript{BE Project Summary}
\vspace{\topsep} % Hacky fix for awkward extra vertical space
\begin{tightitemize}
\item Implementation of e-commerce Web Application
\end{tightitemize}
\descript{Modules Included}
\vspace{\topsep} % Hacky fix for awkward extra vertical space
\begin{table}[]
\centering
\caption{My caption}
\label{my-label}
\resizebox{\textwidth}{!}{%
\begin{tabular}{llll}
Introduction to Computers and Programming & A & Algorithms Design
& A \\
Advanced Programing & A+ & Compiler Design and
Implementation & A+ \\
Internet Engineering & A & User Interface Design
& A \\
Computer Networks & A & Digital Logic Design
& A+ \\
Databases Lab & A & Technical Presentation
& A \\
Computer Lab & A+ & Software Projects Managment
& A+ \\
Analytics and Statistics & A+ & Entrepeneurship
& A+
\end{tabular}%
}
\end{table}
\sectionspace % Some whitespace after the section
答案1
只需删除行
\begin{table}[]
\centering
\caption{My caption}
\label{my-label}
\resizebox{\textwidth}{!}{%
以及结束语
}
\end{table}
您不希望此表浮动到文档的另一部分(并且也不允许它从内部浮动,minipage
因此会出现错误),所以您不希望\begin{table}
并且几乎从来不想将表放置在\resizebox
设计上会产生与文档其余部分不一致的字体大小的地方。