Latex 文档中的文本超出页面范围

Latex 文档中的文本超出页面范围

我希望有人能帮助我。成就部分的文本超出了页面范围,没有跳转到新页面。

\section {Achievements}
\begin{tabular}{rl}
Sep 2015 - Current:& 
\textsc Working alongside the University to encourage the participation in sporting activities within the schools of Computer Science and Mathematics
\end{tabular}

有什么解决方案可以防止这种情况发生?

谢谢

答案1

l默认情况下,在左对齐、r右对齐或c中间对齐的单元格中不会发生文本换行tabular。相反,您可以使用p字型对齐,或者tabularxX对齐方式:

在此处输入图片描述

\documentclass{article}

\usepackage{tabularx,ragged2e}

\begin{document}

\section{Achievements}

\noindent
\begin{tabular}{rl}
  Sep 2015 - Current: & 
    Working alongside the University to encourage the participation in sporting 
    activities within the schools of Computer Science and Mathematics
\end{tabular}

\noindent
\begin{tabularx}{\linewidth}{ @{} r X @{} }
  Sep 2015 - Current: & 
    Working alongside the University to encourage the participation in sporting 
    activities within the schools of Computer Science and Mathematics \\

  Sep 2015 - Current: & \raggedright\arraybackslash
    Working alongside the University to encourage the participation in sporting 
    activities within the schools of Computer Science and Mathematics \\

  Sep 2015 - Current: & \RaggedRight
    Working alongside the University to encourage the participation in sporting 
    activities within the schools of Computer Science and Mathematics
\end{tabularx}

\end{document}

相关内容