![Latex 文档中的文本超出页面范围](https://linux22.com/image/342718/Latex%20%E6%96%87%E6%A1%A3%E4%B8%AD%E7%9A%84%E6%96%87%E6%9C%AC%E8%B6%85%E5%87%BA%E9%A1%B5%E9%9D%A2%E8%8C%83%E5%9B%B4.png)
我希望有人能帮助我。成就部分的文本超出了页面范围,没有跳转到新页面。
\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
字型对齐,或者tabularx
的X
对齐方式:
\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}